[PATCH] log: prefer 'wctx' over 'pctx' for working context
Martin von Zweigbergk
martinvonz at google.com
Thu Mar 19 16:19:49 UTC 2015
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1426740265 25200
# Wed Mar 18 21:44:25 2015 -0700
# Node ID ef0698d6c3bb363ec4d7face69409f6555d0e7c2
# Parent 5cb459dc32d209653a3e5d77749cf989ab9a51e4
log: prefer 'wctx' over 'pctx' for working context
diff -r 5cb459dc32d2 -r ef0698d6c3bb hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py Tue Oct 28 22:32:18 2014 -0700
+++ b/hgext/largefiles/overrides.py Wed Mar 18 21:44:25 2015 -0700
@@ -376,8 +376,8 @@
# The magic matchandpats override should be used for case (1) but not for
# case (2).
def overridemakelogfilematcher(repo, pats, opts):
- pctx = repo[None]
- match, pats = oldmatchandpats(pctx, pats, opts)
+ wctx = repo[None]
+ match, pats = oldmatchandpats(wctx, pats, opts)
return lambda rev: match
oldmatchandpats = installmatchandpatsfn(overridematchandpats)
diff -r 5cb459dc32d2 -r ef0698d6c3bb mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Tue Oct 28 22:32:18 2014 -0700
+++ b/mercurial/cmdutil.py Wed Mar 18 21:44:25 2015 -0700
@@ -1924,12 +1924,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)):
More information about the Mercurial-devel
mailing list