changeset 24063:c98fa0ca4678

cmdutil: have walkchangerevs utilize common function to build revs
author Yuya Nishihara <yuya@tcha.org>
date Fri, 06 Feb 2015 00:22:20 +0900
parents f576addb5b77
children c260887cdbcd
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Feb 06 00:15:35 2015 +0900
+++ b/mercurial/cmdutil.py	Fri Feb 06 00:22:20 2015 +0900
@@ -1473,14 +1473,7 @@
     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()