Mercurial > hg-stable
changeset 36304:53be14874ee8
rebase: sort roots by revision
Previously we were sorting them by whatever implicit sort order we got
between changectx instances. Sorting by rev at least makes some sense,
so I chose that.
Differential Revision: https://phab.mercurial-scm.org/D2301
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 17 Feb 2018 21:47:26 -0500 |
parents | 2d513ab7ce94 |
children | 164ed6d54fdf |
files | hgext/rebase.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Feb 17 21:25:14 2018 -0500 +++ b/hgext/rebase.py Sat Feb 17 21:47:26 2018 -0500 @@ -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: