Patchwork [1,of,4,resend,revset,log] cmdutil: changed _makegraphlogrevset to _makelogrevset

login
register
mail settings
Submitter Mads Kiilerich
Date April 15, 2014, 12:23 a.m.
Message ID <f8b2d6a610555885c276.1397521436@mk-desktop>
Download mbox | patch
Permalink /patch/4348/
State Accepted
Commit e5ad36a845af6fcc5c7d43fa2265c74c9e82c625
Headers show

Comments

Mads Kiilerich - April 15, 2014, 12:23 a.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1393353604 28800
#      Tue Feb 25 10:40:04 2014 -0800
# Node ID f8b2d6a610555885c27649ddf6b665a7b15882af
# Parent  bd4cc41234760cb1fc9a822eada1c37e5852c2b7
cmdutil: changed _makegraphlogrevset to _makelogrevset

This method will now be used to build both graphlog and log revset after this
series of patches.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1457,7 +1457,7 @@  def walkchangerevs(repo, match, opts, pr
 
     return iterate()
 
-def _makegraphfilematcher(repo, pats, followfirst):
+def _makelogfilematcher(repo, pats, 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
@@ -1485,7 +1485,7 @@  def _makegraphfilematcher(repo, pats, fo
 
     return filematcher
 
-def _makegraphlogrevset(repo, pats, opts, revs):
+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
     are not passed filematcher is None. Otherwise it is a callable
@@ -1596,7 +1596,7 @@  def _makegraphlogrevset(repo, pats, opts
     filematcher = None
     if opts.get('patch') or opts.get('stat'):
         if follow:
-            filematcher = _makegraphfilematcher(repo, pats, followfirst)
+            filematcher = _makelogfilematcher(repo, pats, followfirst)
         else:
             filematcher = lambda rev: match
 
@@ -1639,7 +1639,7 @@  def getgraphlogrevs(repo, pats, opts):
     possiblyunsorted = False # whether revs might need sorting
     if opts.get('rev'):
         revs = scmutil.revrange(repo, opts['rev'])
-        # Don't sort here because _makegraphlogrevset might depend on the
+        # Don't sort here because _makelogrevset might depend on the
         # order of revs
         possiblyunsorted = True
     else:
@@ -1650,7 +1650,7 @@  def getgraphlogrevs(repo, pats, opts):
             revs.reverse()
     if not revs:
         return revset.baseset(), None, None
-    expr, filematcher = _makegraphlogrevset(repo, pats, opts, revs)
+    expr, filematcher = _makelogrevset(repo, pats, opts, revs)
     if possiblyunsorted:
         revs.sort(reverse=True)
     if expr: