Mercurial > hg
diff tests/test-histedit-bookmark-motion.t @ 17758:5863f0e4cd3a
histedit: replace various nodes lists with replacement graph (and issue3582)
This changeset rewrites the change tracking logic of histedit to record every
operation it does. Tracked operations record the full list of "old" node that
will eventually be removed to the list of new nodes that replace it. Operations
on temporary nodes are tracked too. Dropped changesets are also recorded as an
"old" node replacement by nothing. This logic is similar to the obsolescence
marker one and will be used for this purpose in later commit.
This new logic implies a big amount of change in the histedit code base.
histedit action functions now always return a tuple of
(new-ctx, [list of rewriting operations])
The old `created`, `replaced` and `tmpnodes` are no longer returned and stored
during histedit operation. When such information is necessary it is computed
from the replacement graph. This computation is done in the `processreplacement`
function.
The `replacemap` is also dropped. It is computed at the end of the command from the
graph. The `bootstrapcontinue` methods are altered to compute this different kind of
information.
This new mechanism requires much less information to be written on disk.
Note:
This changes allows a more accurate bookmark movement. bookmark on dropped
changeset are now move of their parent (or replacement of their parent)
instead of their children.
This fix issue3582
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 11 Oct 2012 08:36:50 +0200 |
parents | bb6149f1db83 |
children | c605e12dd622 |
line wrap: on
line diff
--- a/tests/test-histedit-bookmark-motion.t Fri Oct 12 15:52:59 2012 -0500 +++ b/tests/test-histedit-bookmark-motion.t Thu Oct 11 08:36:50 2012 +0200 @@ -84,13 +84,12 @@ > pick 652413bf663e 5 f > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: Should update metadata for the following changes: + histedit: moving bookmarks two from 177f92b77385 to d36c0562f908 histedit: moving bookmarks three from 055a42cdd887 to ae467701c500 + histedit: moving bookmarks four from e860deea161a to ae467701c500 histedit: moving bookmarks also-two from 177f92b77385 to d36c0562f908 - 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 - 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 @@ -142,10 +141,9 @@ > pick ae467701c500 2 d > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: Should update metadata for the following changes: + histedit: moving bookmarks three from ae467701c500 to 1be9c35b4cb2 + histedit: moving bookmarks four from ae467701c500 to 1be9c35b4cb2 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