Patchwork D2301: rebase: sort roots by revision

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 12:46 p.m.
Message ID <c33fd2ea751a19d2f20e807ab55e4613@localhost.localdomain>
Download mbox | patch
Permalink /patch/28063/
State Not Applicable
Headers show

Comments

phabricator - Feb. 18, 2018, 12:46 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG53be14874ee8: rebase: sort roots by revision (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2301?vs=5819&id=5838

REVISION DETAIL
  https://phab.mercurial-scm.org/D2301

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1650,7 +1650,9 @@ 
     roots = list(repo.set('roots(%ld)', sortedsrc[0]))
     if not roots:
         raise error.Abort(_('no matching revisions'))
-    roots.sort()
+    def revof(r):
+        return r.rev()
+    roots = sorted(roots, key=revof)
     state = dict.fromkeys(rebaseset, revtodo)
     emptyrebase = (len(sortedsrc) == 1)
     for root in roots: