branch - Mercurial, "Branching with bookmarks" -


i read document: a guide branching mercurial, section titled branching bookmarks.

it says:

now you’ve got 2 bookmarks (essentially tag) 2 branches @ current changeset.

to switch 1 of these branches can use hg update feature update tip changeset of branch , mark working on branch. when commit, move bookmark newly created changeset.

i tried this, ended moving both bookmarks @ same time.

is guide wrong, outdated, or did wrong? note know having bookmarks on separate branches moves bookmark related branch i'm working on, guide (which lot of people says definite guide this) says above text, indicates should've worked "telling" mercurial bookmark (branch) i'm working on.

testing shows otherwise though.

any ideas?

example:

 > hg init > echo 1 >test.txt > hg commit -m "initial" --addremove adding test.txt  > hg bookmark main > hg bookmark feature > hg log changeset:   0:c56ceb49ee20 tag:         feature tag:         main tag:         tip user:        lasse v. karlsen <lasse@vkarlsen.no> date:        tue nov 30 23:06:16 2010 +0100 summary:     initial  > hg update feature 0 files updated, 0 files merged, 0 files removed, 0 files unresolved  > echo 2 >test2.txt > hg commit -m "feature 1" --addremove adding test2.txt  > hg log changeset:   1:9f2f5869b57b tag:         feature                             <---- both moved tag:         main                                <---- tag:         tip user:        lasse v. karlsen <lasse@vkarlsen.no> date:        tue nov 30 23:06:45 2010 +0100 summary:     feature 1  changeset:   0:c56ceb49ee20 user:        lasse v. karlsen <lasse@vkarlsen.no> date:        tue nov 30 23:06:16 2010 +0100 summary:     initial

if got right, want only bookmark you've updated move on next commit. purpose bookmarks extensions has track.current option.

from bookmarksextension:

by default, when several bookmarks point same changeset, move forward together. possible obtain more git-like experience adding following configuration option .hgrc

[bookmarks] track.current = true 

in example, keep main bookmark @ revision 0.

if track.current option enabled, active bookmark annotated asterisk in output of hg bookmarks.

update: since mercurial 1.8 default behavior move current bookmark, i.e. above mentioned option not needed anymore [1].


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -