Mercurial > public > mercurial-scm > hg-stable
diff mercurial/destutil.py @ 27559:d13bcc9fd656
destutil: use scmutil.revrange for desthistedit (issue5001)
This allows user aliases to be expanded. It also prevents the
user-provided revset from being treated as a revset expression.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 24 Dec 2015 10:16:30 -0800 |
parents | 2c60b4b2a0de |
children | 72072cfc7e91 |
line wrap: on
line diff
--- a/mercurial/destutil.py Fri Dec 18 13:53:50 2015 -0600 +++ b/mercurial/destutil.py Thu Dec 24 10:16:30 2015 -0800 @@ -205,9 +205,12 @@ def desthistedit(ui, repo): """Default base revision to edit for `hg histedit`.""" + # Avoid cycle: scmutil -> revset -> destutil + from . import scmutil + default = ui.config('histedit', 'defaultrev', histeditdefaultrevset) if default: - revs = repo.revs(default) + revs = scmutil.revrange(repo, [default]) if revs: # The revset supplied by the user may not be in ascending order nor # take the first revision. So do this manually.