diff mercurial/cmdutil.py @ 24534:1925769b4ff8

log: prefer 'wctx' over 'pctx' for working context
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 18 Mar 2015 21:44:25 -0700
parents 914caae9a86a
children 6e73c66a6919
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue Mar 31 08:31:42 2015 -0500
+++ b/mercurial/cmdutil.py	Wed Mar 18 21:44:25 2015 -0700
@@ -1918,12 +1918,12 @@
     # _matchfiles() revset but walkchangerevs() builds its matcher with
     # scmutil.match(). The difference is input pats are globbed on
     # platforms without shell expansion (windows).
-    pctx = repo[None]
-    match, pats = scmutil.matchandpats(pctx, pats, opts)
+    wctx = repo[None]
+    match, pats = scmutil.matchandpats(wctx, pats, opts)
     slowpath = match.anypats() or (match.files() and opts.get('removed'))
     if not slowpath:
         for f in match.files():
-            if follow and f not in pctx:
+            if follow and f not in wctx:
                 # If the file exists, it may be a directory, so let it
                 # take the slow path.
                 if os.path.exists(repo.wjoin(f)):