Patchwork [5,of,6] cmdutil: have walkchangerevs utilize common function to build revs

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 6, 2015, 2:41 p.m.
Message ID <6395a12bd90b4318639a.1423233661@mimosa>
Download mbox | patch
Permalink /patch/7713/
State Accepted
Commit c98fa0ca46787b533b9bb9690bc24daaa7819264
Headers show

Comments

Yuya Nishihara - Feb. 6, 2015, 2:41 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1423149740 -32400
#      Fri Feb 06 00:22:20 2015 +0900
# Node ID 6395a12bd90b4318639a413fd99521c7277d8b7d
# Parent  0bd4619d187669a31547539dd975011afda5c85d
cmdutil: have walkchangerevs utilize common function to build revs

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1473,14 +1473,7 @@  def walkchangerevs(repo, match, opts, pr
     function on each context in the window in forward order.'''
 
     follow = opts.get('follow') or opts.get('follow_first')
-
-    if opts.get('rev'):
-        revs = scmutil.revrange(repo, opts.get('rev'))
-    elif follow:
-        revs = repo.revs('reverse(:.)')
-    else:
-        revs = revset.spanset(repo)
-        revs.reverse()
+    revs = _logrevs(repo, opts)
     if not revs:
         return []
     wanted = set()