bookmarks and branches again: files

Uwe Brauer oub at mat.ucm.es
Tue Jul 12 13:31:46 UTC 2016


Hello

Sorry to bother. I think I understand branches which I use most of the
times, but I still have not understood bookmarks.

Here is an example

hg init                
echo one > test1.txt    
hg add test1.txt        
hg commit -m "0"       
hg branch master       
echo two >> test2.txt   
hg add test2.txt        
hg commit -m "1"       
echo three >> test2.txt 
hg commit -m "2"       
hg update default      

Now file test2.tex has been deleted because it belongs to the branch
master but I am now in the default branch, so this behavior is  *very* logical.

Now I try to do something similar with bookmarks

 hg init                
 echo one > test1.txt    
 hg add test1.txt        
 hg commit -m "0"       
 hg bookmark master     
 hg update master       
 echo two >> test2.txt   
 hg add test2.txt        
 hg commit -m "1"       
 echo three >> test1.txt 
 hg commit -m "2"       
 hg update default
 echo four >> test1.txt 
 hg commit -m "3"       


But now test2.tex which «belongs» to the bookmark master has not been
deleted, which I find odd.

Any comments?

Thanks

Uwe Brauer 


More information about the Mercurial mailing list