[PATCH 2 of 6 V3] histedit: update bookmark movement notice
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Wed Oct 10 08:59:55 UTC 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1349841278 -7200
# Node ID f89b7782c9d111cc6b9e8266f101c2ebb4004b17
# Parent 992a1a4a3922298d5b05497a96fe61ea2fd8b151
histedit: update bookmark movement notice
New format is:
histedit:moving bookmarks <bookmark> from <old> to <new>
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -693,18 +693,16 @@ def movebookmarks(ui, repo, replacemap,
if old in tmpnodes or old in created:
# can't have any metadata we'd want to update
return
while new in replacemap:
new = replacemap[new]
- ui.note(_('histedit: %s to %s\n') % (node.short(old),
- node.short(new)))
octx = repo[old]
marks = octx.bookmarks()
if marks:
- ui.note(_('histedit: moving bookmarks %s\n') %
- ', '.join(marks))
for mark in marks:
+ ui.note(_('histedit: moving bookmarks %s from %s to %s\n')
+ % (mark, octx, node.short(new)))
repo._bookmarks[mark] = new
bookmarks.write(repo)
# We assume that bookmarks on the tip should remain
# tipmost, but bookmarks on non-tip changesets should go
diff --git a/tests/test-histedit-bookmark-motion.t b/tests/test-histedit-bookmark-motion.t
--- a/tests/test-histedit-bookmark-motion.t
+++ b/tests/test-histedit-bookmark-motion.t
@@ -83,20 +83,16 @@
> fold e860deea161a 4 e
> pick 652413bf663e 5 f
> EOF
$ hg histedit 1 --commands commands.txt --verbose | grep histedit
histedit: Should update metadata for the following changes:
- histedit: 055a42cdd887 to ae467701c500
- histedit: moving bookmarks three
- histedit: 177f92b77385 to d36c0562f908
- histedit: moving bookmarks also-two, two
- histedit: 652413bf663e to 0efacef7cb48
- histedit: moving bookmarks five
- histedit: d2ae7f538514 to cb9a9f314b8b
- histedit: moving bookmarks will-move-backwards
- histedit: e860deea161a to ae467701c500
- histedit: moving bookmarks four
+ histedit: moving bookmarks three from 055a42cdd887 to ae467701c500
+ histedit: moving bookmarks also-two from 177f92b77385 to d36c0562f908
+ histedit: moving bookmarks two from 177f92b77385 to d36c0562f908
+ histedit: moving bookmarks five from 652413bf663e to 0efacef7cb48
+ histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b
+ histedit: moving bookmarks four from e860deea161a to ae467701c500
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
@ changeset: 3:0efacef7cb48
| bookmark: five
@@ -145,15 +141,13 @@
> pick 0efacef7cb48 3 f
> pick ae467701c500 2 d
> EOF
$ hg histedit 1 --commands commands.txt --verbose | grep histedit
histedit: Should update metadata for the following changes:
- histedit: 0efacef7cb48 to 1be9c35b4cb2
- histedit: moving bookmarks five
- histedit: 0efacef7cb48 to 7c044e3e33a9
- histedit: ae467701c500 to 1be9c35b4cb2
- histedit: moving bookmarks four, three
+ histedit: moving bookmarks five from 0efacef7cb48 to 1be9c35b4cb2
+ histedit: moving bookmarks four from ae467701c500 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
likely the useful signal.
More information about the Mercurial-devel
mailing list