> > I believe that push warns you only for unmerged heads. > > It warns if a push creates more heads, i.e. if there were 2 heads > already in the push destination, and the push would spawn a third it > will warn. If no new heads are created it doesn't.
Ah I see. Yes I tried this # Create main repo rm -rf main local_a local_b hg init main cd main echo file > file hg ci --addremove -m file cd .. # now there are two clones hg clone main local_a hg clone main local_b # clone a creates branch (no new head created, so no warning) cd local_a hg branch my_branch hg ci -m my-branch hg push # clone b just tries to push to default branch (he does not know that # clone b created his own branch). Now he is yelled at that he's trying # to create new head cd ../local_b echo a > a hg ci --addremove -m a hg push pushing to /store/rcs/test/main searching for changes abort: push creates new remote branches! (did you forget to merge? use push -f to force) I agree that this is a bit constructed example. It will boil down to the fact that you have to trust your commiters to some degree. The local_b should then pull, update, merge (in the correct direction) and push. This would inactivate the branch created by local_a. My original question was if it would be possible to stop local_b from creating new branch. If I would in a hook test output of 'hg branches' and rollback if there is something new, it should work. Thank you -- Vlad
pgpqQWgSbeU8F.pgp
Description: PGP signature
_______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org