Submitter | Siddharth Agarwal |
---|---|
Date | Aug. 2, 2014, 5:19 a.m. |
Message ID | <bc2877c860bb8bbb689d.1406956775@dev1738.prn1.facebook.com> |
Download | mbox | patch |
Permalink | /patch/5224/ |
State | Accepted |
Headers | show |
Comments
On Fri, 2014-08-01 at 22:19 -0700, Siddharth Agarwal wrote: > # HG changeset patch > # User Siddharth Agarwal <sid0@fb.com> > # Date 1406956614 25200 > # Fri Aug 01 22:16:54 2014 -0700 > # Node ID bc2877c860bb8bbb689d488869fdab1ee5232f97 > # Parent 5e4d9c7cfc107374e85f8ca69746801257e322fa > locate: use ctx.matches instead of ctx.walk These are queued for default, thanks.
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4040,11 +4040,11 @@ rev = scmutil.revsingle(repo, opts.get('rev'), None).node() ret = 1 - m = scmutil.match(repo[rev], pats, opts, default='relglob') + ctx = repo[rev] + m = scmutil.match(ctx, pats, opts, default='relglob') m.bad = lambda x, y: False - for abs in repo[rev].walk(m): - if not rev and abs not in repo.dirstate: - continue + + for abs in ctx.matches(m): if opts.get('fullpath'): ui.write(repo.wjoin(abs), end) else: