[PATCH 0 of 9] improvements for named branches

Paul Franz theandromedan at gmail.com
Tue Mar 4 21:16:17 CST 2008



Patrick Mézard wrote:
> Paul Franz a écrit :
>   
>> I am not sure how a branch can have multiple heads.
>>     
>
> Here is a repository made of a single named branch "foo" with 2 heads. You can obviously plug this named branch in any existing repository :
>
> $ hg init t
> $ cd t
> $ hg branch foo
> marked working directory as branch foo
> $ echo a > a
> $ hg ci -Am adda
> adding a
> $ echo b > b
> $ hg ci -Am addb
> adding b
> $ hg up -C 0
> 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
> $ echo c > c
> $ hg ci -Am addc
> adding c
>   
What is the use case where this should be valid? In my mind this should 
force you to merge changes into the head of the branch. But that is 
probably just my previous version control experience speaking. Could 
somebody give a reason that this is allowed?
> $ hg glog
> @  changeset:   2:f2bb7b077333
> |  branch:      foo
> |  tag:         tip
> |  parent:      0:a260d8b9e97b
> |  user:        Patrick Mezard <pmezard at gmail.com>
> |  date:        Tue Mar 04 09:41:00 2008 +0100
> |  summary:     addc
> |
> | o  changeset:   1:6080b678133f
> |/   branch:      foo
> |    user:        Patrick Mezard <pmezard at gmail.com>
> |    date:        Tue Mar 04 09:40:52 2008 +0100
> |    summary:     addb
> |
> o  changeset:   0:a260d8b9e97b
>    branch:      foo
>    user:        Patrick Mezard <pmezard at gmail.com>
>    date:        Tue Mar 04 09:40:45 2008 +0100
>    summary:     adda
>
> --
> Patrick Mézard
>
>   

Paul Franz


More information about the Mercurial-devel mailing list