Mercurial > public > mercurial-scm > hg-stable
diff tests/test-bookmarks.t @ 13663:d16c99f16f00
bundle: update current bookmark to most recent revision on current branch
We check if the current bookmark is set to the first parent of the
dirstate. Is this the case we move the bookmark to most recent revision
on the current branch (where hg update will update you to).
author | David Soria Parra <dsp@php.net> |
---|---|
date | Mon, 14 Mar 2011 23:03:56 +0100 |
parents | 3f6a4579f803 |
children | 6bc340940c18 |
line wrap: on
line diff
--- a/tests/test-bookmarks.t Mon Mar 14 20:53:55 2011 +0100 +++ b/tests/test-bookmarks.t Mon Mar 14 23:03:56 2011 +0100 @@ -288,3 +288,36 @@ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R cloned-bookmarks-rev bookmarks X2 1:925d80f479bb + +create bundle with two heads + + $ hg clone . tobundle + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo x > tobundle/x + $ hg -R tobundle add tobundle/x + $ hg -R tobundle commit -m'x' + $ hg -R tobundle update -r -2 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ echo y > tobundle/y + $ hg -R tobundle branch test + marked working directory as branch test + $ hg -R tobundle add tobundle/y + $ hg -R tobundle commit -m'y' + $ hg -R tobundle bundle tobundle.hg + searching for changes + 2 changesets found + $ hg unbundle tobundle.hg + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg update + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg bookmarks + X2 1:925d80f479bb + Y 2:db815d6d32e6 + * Z 3:125c9a1d6df6 + x y 2:db815d6d32e6 +