Branches & hgk

Russell Suter maverick at simlogix.com
Tue Nov 14 08:30:28 CST 2006


Thomas,

Thomas Arendsen Hein wrote:
> * Russell Suter <russell at simlogix.com> [20061110 22:40]:
>   
>> Thomas Arendsen Hein wrote:
>>     
>>> * Russell Suter <maverick at simlogix.com> [20061109 20:14]:
>>>       
>>>> Russell Suter wrote:
>>>> Here's a sample branchpoint from the log file:
>>>>
>>>> changeset:   6:24aff8ebfdcc
>>>> branch:      bali
>>>> parent:      -1:000000000000
>>>> user:        <Username>
>>>> date:        Thu Nov 09 10:04:10 2006 -0700
>>>> summary:     <Summary>
>>>>
>>>> Is that parent right?  Could that be the problem?
>>>> I'm using an hourly snapshot from Tuesday morning.
>>>>         
>>> Uhm, this doesn't look like branches, but like completely unrelated
>>> changes. That -1:0000 thing is the nullid, which is the only parent
>>> of the first changeset and of every other completely unrelated
>>> set of changes.
>>>
>>> What you have is not a branch, but a second tree in the same
>>> repository. But you can merge these tree later if you want.
>>>  
>>>       
>> So, are you saying that this is normal behavior for the "branch"
>> command?
>>     
>
> No, I said that this doesn't look like branches, even if you used
> the branch command.
>
> For me it looks like you have a second completely unrelated tree,
> which just happens to have a branch name set pulled into another
> repo.
>   
Sorry if I seem clueless here.  Is this considered a bug or a side effect
of me doing something stupid (which is highly probable).
> Can you tell us how you create such a situation?
> Maybe something like this?
>   
Unfortunately, I can't seem to get it into a reasonably small example
to send on.  I'm writing a script to convert from Arch (including all
branches) to Mercurial.  There are 12 branches and thousands of
patches.  I am using cloned repositories to manage the Arch branches
and doing pushes to a central repository.  I'm not using the --force
option as you have in your example below.

> # BAD EXAMPLE, don't try at home:
> for branch in foo bar; do
>   hg init $branch
>   cd $branch
>   hg branch $branch
>   hg commit -m "marked branch $branch"
>   echo "a change in branch $branch" > file-$branch
>   hg commit -Am "added a file in $branch" file-$branch
>   cd ..
> done
> cd foo
> hg pull --force ../bar
> hg log
>
> changeset:   3:7757a4226b57
> branch:      bar
> tag:         tip
> user:        Thomas Arendsen Hein <thomas at intevation.de>
> date:        Sat Nov 11 08:05:41 2006 +0100
> summary:     added a file in bar
>
> changeset:   2:df1fdb376ea2
> branch:      bar
> parent:      -1:000000000000
> user:        Thomas Arendsen Hein <thomas at intevation.de>
> date:        Sat Nov 11 08:05:41 2006 +0100
> summary:     marked branch bar
>
> changeset:   1:14689884ae02
> branch:      foo
> user:        Thomas Arendsen Hein <thomas at intevation.de>
> date:        Sat Nov 11 08:05:41 2006 +0100
> summary:     added a file in foo
>
> changeset:   0:fbc527be6cda
> branch:      foo
> user:        Thomas Arendsen Hein <thomas at intevation.de>
> date:        Sat Nov 11 08:05:41 2006 +0100
> summary:     marked branch foo
>
>
> Thomas
>
>   
I appreciate your time with this...

Thanks

--
Russ


More information about the Mercurial mailing list