[PATCH 1 of 8 V3] scmutil: pass a matcher to scmutil.addremove() instead of a list of patterns
Martin von Zweigbergk
martinvonz at google.com
Fri Dec 12 11:59:04 CST 2014
On Thu Dec 11 2014 at 7:35:41 PM Matt Harbison <mharbison72 at gmail.com>
wrote:
> --- a/hgext/largefiles/overrides.py
> +++ b/hgext/largefiles/overrides.py
> @@ -1101,13 +1102,12 @@
> removelargefiles(repo.ui, repo, True, *m, **opts)
> # Call into the normal add code, and any files that *should* be added
> as
> # largefiles will be
> - addlargefiles(repo.ui, repo, *pats, **opts)
> + addlargefiles(repo.ui, repo, matcher, **opts)
> # Now that we've handled largefiles, hand off to the original
> addremove
> # function to take care of the rest. Make sure it doesn't do
> anything with
> - # largefiles by installing a matcher that will ignore them.
> - installnormalfilesmatchfn(repo[None].manifest())
> - result = orig(repo, pats, opts, dry_run, similarity)
> - restorematchfn()
> + # largefiles by passing a matcher that will ignore them.
> + matcher = composenormalfilematcher(matcher, repo[None].manifest())
> + result = orig(repo, matcher, opts, dry_run, similarity)
> return result
>
Nit: I'd inline 'result' now that there is nothing between the two lines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20141212/b4d953e6/attachment.html>
More information about the Mercurial-devel
mailing list