From patchwork Fri Feb 6 14:41:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5, of, 6] cmdutil: have walkchangerevs utilize common function to build revs From: Yuya Nishihara X-Patchwork-Id: 7713 Message-Id: <6395a12bd90b4318639a.1423233661@mimosa> To: mercurial-devel@selenic.com Date: Fri, 06 Feb 2015 23:41:01 +0900 # HG changeset patch # User Yuya Nishihara # 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 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()