push does not abort when creating new remote head

Fabian project+google at fabian-kreutz.de
Wed Jan 20 05:58:16 CST 2010


Saluton!

An "hg push" usually aborts if it would create new remote heads,
unless the --force flag is set.
Here is a testcase for which it also does not abort, although no force
is used.
I guess it has something to do with the fact that the pushed new head
is a merge which removes a head.

mkdir merctest
cd merctest
hg init base
cd base
touch a
hg branch base
hg commit -A -m add_a
cd ..
hg clone base apply
cd apply
hg up null
hg branch default
touch b
hg commit -A -m add_b
hg merge base
hg commit -m merge
hg clone . ../workc
touch c
hg commit -A -m add_c
cd ../base
touch d
hg commit -A -m add_d
hg push ../workc
cd ../workc
hg merge base
hg commit -m merge_base
hg push

Ĝis, Fabian


More information about the Mercurial-devel mailing list