Mercurial > public > mercurial-scm > hg-stable
diff hgext/histedit.py @ 21950:af44c7a1e55e stable
histedit: respect revsetalias entries (issue4311)
We now expand user-provided revsets before using repo.revs() to locate
the root(s) of the user-specified set.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 28 Jul 2014 19:20:13 -0400 |
parents | 50fd3a36d166 |
children | a44b7b6f3cd7 9ac98c2aa95c |
line wrap: on
line diff
--- a/hgext/histedit.py Mon Jul 28 10:05:17 2014 +0200 +++ b/hgext/histedit.py Mon Jul 28 19:20:13 2014 -0400 @@ -158,6 +158,7 @@ from mercurial import hg from mercurial import node from mercurial import repair +from mercurial import scmutil from mercurial import util from mercurial import obsolete from mercurial import merge as mergemod @@ -567,11 +568,11 @@ remote = None root = findoutgoing(ui, repo, remote, force, opts) else: - rootrevs = list(repo.set('roots(%lr)', revs)) - if len(rootrevs) != 1: + rr = list(repo.set('roots(%ld)', scmutil.revrange(repo, revs))) + if len(rr) != 1: raise util.Abort(_('The specified revisions must have ' 'exactly one common root')) - root = rootrevs[0].node() + root = rr[0].node() keep = opts.get('keep', False) revs = between(repo, root, topmost, keep)