Mercurial > public > mercurial-scm > hg-stable
diff hgext/histedit.py @ 17771:dcfa526b180b
histedit: create obsolescence markers in deterministic order
I arbitrary use the revnum of the precursor because it sound a right order.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 16 Oct 2012 16:56:14 +0200 |
parents | 8672e615d81c |
children | 7f5dab94e48c e819c12a8bd0 |
line wrap: on
line diff
--- a/hgext/histedit.py Mon Oct 15 23:54:54 2012 -0400 +++ b/hgext/histedit.py Tue Oct 16 16:56:14 2012 +0200 @@ -514,7 +514,9 @@ # TODO update mq state if obsolete._enabled: markers = [] - for prec, succs in mapping.iteritems(): + # sort by revision number because it sound "right" + for prec in sorted(mapping, key=repo.changelog.rev): + succs = mapping[prec] markers.append((repo[prec], tuple(repo[s] for s in succs))) if markers: