histedit: simplify desthistedit
Instead of sorting the revset and take the first one, take the minimum
revision.
Differential Revision: https://phab.mercurial-scm.org/D3137
--- a/mercurial/destutil.py Thu Apr 05 17:58:58 2018 +0200
+++ b/mercurial/destutil.py Thu Apr 05 18:02:42 2018 +0200
@@ -350,10 +350,8 @@
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.
- revs.sort()
- return revs.first()
+ # Take the first revision of the revset as the root
+ return revs.min()
return None