Submitter | phabricator |
---|---|
Date | June 12, 2018, 12:26 p.m. |
Message ID | <2758ad9afb6d1c407ed55943e029c54c@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/32074/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3333,7 +3333,13 @@ badfn=lambda x, y: False) ui.pager('locate') - for abs in ctx.matches(m): + if ctx.rev() is None: + # When run on the working copy, "locate" includes removed files, so + # we get the list of files from the dirstate. + filesgen = sorted(repo.dirstate.matches(m)) + else: + filesgen = ctx.matches(m) + for abs in filesgen: if opts.get('fullpath'): ui.write(repo.wjoin(abs), end) else: