Push silently accepts new anonymous head? (note: unsynced remote changes!)

Mads Kiilerich mads at kiilerich.com
Thu Oct 21 15:40:23 UTC 2010


On 10/21/2010 04:50 PM, Fredrik Jonson wrote:
> Hi all,
>
> We're using named branches at work and push our changes to a server over
> ssh.  Occasionally we've inadvertently pushed new anonymous head withouth
> using 'push --force'. The only hint seen is a message after the fact stating
> that there are unsynced  remote changes and that a new branch has been
> added:
>
>   $ hg push
>   pushing to ssh://foo/bar
>   searching for changes
>   note: unsynced remote changes!
>   remote: adding changesets
>   remote: adding manifests
>   remote: adding file changes
>   remote: added 1 changesets with 2 changes to 2 files (+1 heads)

What hg version is that?

> What we expect is for hg to fail the push and ask us to use '--force' as it
> normally does.
>
> Now some of my colleagues still use mercurial 1.3.1, so this might be a
> known and fixed bug. If it isn't, is there any reason hg behaves this way?

There are lots of corner cases for branches and heads, so it is hard for 
us to tell if your issue is a known/fixed bug - unless you can come up 
with a test case.

There has been some fixes in this area, so first of all try the latest 
version and see if it works as expected.

/Mads



More information about the Mercurial mailing list