##// END OF EJS Templates
log: prefer 'wctx' over 'pctx' for working context
Martin von Zweigbergk -
r24534:1925769b default
parent child Browse files
Show More
@@ -376,8 +376,8 b' def overridelog(orig, ui, repo, *pats, *'
376 # The magic matchandpats override should be used for case (1) but not for
376 # The magic matchandpats override should be used for case (1) but not for
377 # case (2).
377 # case (2).
378 def overridemakelogfilematcher(repo, pats, opts):
378 def overridemakelogfilematcher(repo, pats, opts):
379 pctx = repo[None]
379 wctx = repo[None]
380 match, pats = oldmatchandpats(pctx, pats, opts)
380 match, pats = oldmatchandpats(wctx, pats, opts)
381 return lambda rev: match
381 return lambda rev: match
382
382
383 oldmatchandpats = installmatchandpatsfn(overridematchandpats)
383 oldmatchandpats = installmatchandpatsfn(overridematchandpats)
@@ -1918,12 +1918,12 b' def _makelogrevset(repo, pats, opts, rev'
1918 # _matchfiles() revset but walkchangerevs() builds its matcher with
1918 # _matchfiles() revset but walkchangerevs() builds its matcher with
1919 # scmutil.match(). The difference is input pats are globbed on
1919 # scmutil.match(). The difference is input pats are globbed on
1920 # platforms without shell expansion (windows).
1920 # platforms without shell expansion (windows).
1921 pctx = repo[None]
1921 wctx = repo[None]
1922 match, pats = scmutil.matchandpats(pctx, pats, opts)
1922 match, pats = scmutil.matchandpats(wctx, pats, opts)
1923 slowpath = match.anypats() or (match.files() and opts.get('removed'))
1923 slowpath = match.anypats() or (match.files() and opts.get('removed'))
1924 if not slowpath:
1924 if not slowpath:
1925 for f in match.files():
1925 for f in match.files():
1926 if follow and f not in pctx:
1926 if follow and f not in wctx:
1927 # If the file exists, it may be a directory, so let it
1927 # If the file exists, it may be a directory, so let it
1928 # take the slow path.
1928 # take the slow path.
1929 if os.path.exists(repo.wjoin(f)):
1929 if os.path.exists(repo.wjoin(f)):
General Comments 0
You need to be logged in to leave comments. Login now