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.
--- 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.