hg heads command inconsistant?

Alexander Schatten ml_alexanderschatten at gmx.at
Fri Jan 8 04:42:43 CST 2010


Thanks for the fast reply:

> >  hg ci --close-branch -m "closing message"
>
> Closing branches works only on named branches.
>

Hm, this does not make so much sense *to me*; plus the help says otherwise:

  --close-branch  mark a branch as closed, hiding it from the branch list


> > ok; when I call "hg merge" I get the (in my understanding) correct
> feedback:
> >
> >  "abort: branch 'default' has one head - please merge with an explicit
> rev"
> >
> > Exactly, there is only one (active) branch. Now, still "hg heads" shows
> two heads, and what is disturbing, even when called with "hg heads
> --active".
>
> This is after you've committed your merge?


Well, I try to make a committ, but it fails. I send you a script that can be executed on a bash commandline to illustrate the thing. From my point of view this looks like a bug.


thanks



Alex

----------------------------------

echo ""
echo "*** Creating Repo and Branches"
mkdir branchtest
cd branchtest
hg init
touch a.txt
hg add
hg ci -m "added a.txt"
touch b.txt
hg add
hg ci -m "added b.txt"
echo 'one line' >> a.txt
hg ci -m "added one line to a.txt"
hg update 1
echo 'a different line' >> a.txt
hg ci -m "added a different line to a.txt"
echo ""
echo "*** Heads after unnamed branch creation"
echo ""
hg heads
echo ""
echo "*** Log after branch creation"
echo ""
hg glog
echo ""
echo "*** Closing branch"
echo ""
hg ci --close-branch -m "close branche"
echo ""
echo "*** Heads command after close"
echo ""
hg heads
echo ""
echo "*** Merge command after close"
echo ""
hg merge


More information about the Mercurial mailing list