changeset 37390:b95992605ef1

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
author Boris Feld <boris.feld@octobus.net>
date Thu, 05 Apr 2018 18:02:42 +0200
parents bef863a09acd
children 3198d5a2514e
files mercurial/destutil.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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