Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 22173:d3702a822241
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 14 Aug 2014 16:25:47 -0500 |
parents | 03a45eff9d2b d4bc38f6eab7 |
children | afead12e724b |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Aug 14 15:21:48 2014 -0500 +++ b/mercurial/cmdutil.py Thu Aug 14 16:25:47 2014 -0500 @@ -1500,7 +1500,7 @@ return iterate() -def _makelogfilematcher(repo, files, followfirst): +def _makefollowlogfilematcher(repo, files, followfirst): # When displaying a revision with --patch --follow FILE, we have # to know which file of the revision must be diffed. With # --follow, we want the names of the ancestors of FILE in the @@ -1527,6 +1527,10 @@ return filematcher +def _makenofollowlogfilematcher(repo, pats, opts): + '''hook for extensions to override the filematcher for non-follow cases''' + return None + def _makelogrevset(repo, pats, opts, revs): """Return (expr, filematcher) where expr is a revset string built from log options and file patterns or None. If --stat or --patch @@ -1646,9 +1650,12 @@ if follow and not match.always() and not slowpath: # _makelogfilematcher expects its files argument to be relative to # the repo root, so use match.files(), not pats. - filematcher = _makelogfilematcher(repo, match.files(), followfirst) + filematcher = _makefollowlogfilematcher(repo, match.files(), + followfirst) else: - filematcher = lambda rev: match + filematcher = _makenofollowlogfilematcher(repo, pats, opts) + if filematcher is None: + filematcher = lambda rev: match expr = [] for op, val in opts.iteritems():