Branches & hgk

Thomas Arendsen Hein thomas at intevation.de
Sat Nov 11 01:09:27 CST 2006


* 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.

Can you tell us how you create such a situation?
Maybe something like this?

# 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

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list