Mercurial > hg-stable
changeset 18370:c605e12dd622
histedit: process bookmarks in sorted order
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 12 Dec 2012 02:38:14 +0100 |
parents | 2150e70c0ee1 |
children | ff2c89ebf5d4 |
files | hgext/histedit.py tests/test-histedit-bookmark-motion.t |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Dec 12 02:38:14 2012 +0100 +++ b/hgext/histedit.py Wed Dec 12 02:38:14 2012 +0100 @@ -720,7 +720,7 @@ # if nothing got rewritten there is not purpose for this function return moves = [] - for bk, old in repo._bookmarks.iteritems(): + for bk, old in sorted(repo._bookmarks.iteritems()): if old == oldtopmost: # special case ensure bookmark stay on tip. #
--- a/tests/test-histedit-bookmark-motion.t Wed Dec 12 02:38:14 2012 +0100 +++ b/tests/test-histedit-bookmark-motion.t Wed Dec 12 02:38:14 2012 +0100 @@ -84,12 +84,12 @@ > pick 652413bf663e 5 f > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: moving bookmarks two from 177f92b77385 to d36c0562f908 - histedit: moving bookmarks three from 055a42cdd887 to ae467701c500 + histedit: moving bookmarks also-two from 177f92b77385 to d36c0562f908 + histedit: moving bookmarks five from 652413bf663e to 0efacef7cb48 histedit: moving bookmarks four from e860deea161a to ae467701c500 - histedit: moving bookmarks also-two from 177f92b77385 to d36c0562f908 + histedit: moving bookmarks three from 055a42cdd887 to ae467701c500 + histedit: moving bookmarks two from 177f92b77385 to d36c0562f908 histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b - histedit: moving bookmarks five from 652413bf663e to 0efacef7cb48 saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-backup.hg (glob) saved backup bundle to $TESTTMP/r/.hg/strip-backup/34a9919932c1-backup.hg (glob) $ hg log --graph @@ -141,9 +141,9 @@ > pick ae467701c500 2 d > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: moving bookmarks three from ae467701c500 to 1be9c35b4cb2 + histedit: moving bookmarks five from 0efacef7cb48 to 1be9c35b4cb2 histedit: moving bookmarks four from ae467701c500 to 1be9c35b4cb2 - histedit: moving bookmarks five from 0efacef7cb48 to 1be9c35b4cb2 + histedit: moving bookmarks three from ae467701c500 to 1be9c35b4cb2 saved backup bundle to $TESTTMP/r/.hg/strip-backup/ae467701c500-backup.hg (glob) We expect 'five' to stay at tip, since the tipmost bookmark is most