# HG changeset patch # User Boris Feld # Date 1522944162 -7200 # Node ID b95992605ef17569b1df207a3da5cc25431c9b90 # Parent bef863a09acd89ec974f7b4e735aacb99cdae4e9 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 diff -r bef863a09acd -r b95992605ef1 mercurial/destutil.py --- 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