diff mercurial/cmdutil.py @ 35548:b14c8bcfbad9

log: drop unused expr from return value of getlogrevs() Future patches will move some processing of the --follow option out of _makelogrevset(), where the returned 'expr' value will be less consistent with the 'revs'. So let's remove it from the public interface.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 22 Oct 2017 22:49:11 +0900
parents b6dbc860570d
children e64baf32782a
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Jan 04 12:00:18 2018 +0900
+++ b/mercurial/cmdutil.py	Sun Oct 22 22:49:11 2017 +0900
@@ -2505,17 +2505,16 @@
     return revs
 
 def getlogrevs(repo, pats, opts):
-    """Return (revs, expr, filematcher) where revs is an iterable of
-    revision numbers, expr is a revset string built from log options
-    and file patterns or None, and used to filter 'revs'. If --stat or
-    --patch are not passed filematcher is None. Otherwise it is a
-    callable taking a revision number and returning a match objects
+    """Return (revs, filematcher) where revs is a smartset
+
+    If --stat or --patch is not passed, filematcher is None. Otherwise it
+    is a callable taking a revision number and returning a match objects
     filtering the files to be detailed when displaying the revision.
     """
     limit = loglimit(opts)
     revs = _logrevs(repo, opts)
     if not revs:
-        return smartset.baseset(), None, None
+        return smartset.baseset(), None
     expr, filematcher = _makelogrevset(repo, pats, opts, revs)
     if opts.get('graph') and opts.get('rev'):
         # User-specified revs might be unsorted, but don't sort before
@@ -2527,7 +2526,7 @@
         revs = matcher(repo, revs)
     if limit is not None:
         revs = revs.slice(0, limit)
-    return revs, expr, filematcher
+    return revs, filematcher
 
 def _parselinerangelogopt(repo, opts):
     """Parse --line-range log option and return a list of tuples (filename,