# HG changeset patch # User Martin von Zweigbergk # Date 1426740265 25200 # Node ID 1925769b4ff831a91325601a8a2cccdf7d3183ea # Parent 888dcab69ca3fe817786a7078bb1f66afa203c8b log: prefer 'wctx' over 'pctx' for working context diff -r 888dcab69ca3 -r 1925769b4ff8 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Tue Mar 31 08:31:42 2015 -0500 +++ 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 888dcab69ca3 -r 1925769b4ff8 mercurial/cmdutil.py --- 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)):