hg push imagines remote heads
Henrik Stuart
hg at hstuart.dk
Thu Oct 1 14:22:51 CDT 2009
Matt Mackall wrote:
> On Wed, 2009-09-30 at 21:33 -0700, Peter Hosey wrote:
>> I'm using hg 1.3.1 on Python 2.6.1 (came with the OS) on Mac OS X
>> 10.6.1. I have tested this with no extensions enabled (no ~/.hgrc).
>>
>> If I attempt to push from the source to the destination, I get this:
>>
>> pushing to ../growl-boredzo-dst
>> searching for changes
>> abort: push creates new remote heads!
>>
>> If I attempt to pull in the reverse direction, hg pulls nothing.
> ...
>> I've uploaded both my source repository and a fresh clone of the
>> destination for your inspection/reproduction:
>>
>> <http://dl.getdropbox.com/u/2162518/growl-hgpush-BrokenRemoteHeadDetection.zip
>> >
>
> Indeed, it is broken, both in 1.3.1 and in -stable. Does the right thing
> in 1.2.1 though. cc:ing Henrik and Sune.
Hey, it is actually working as intended. The prepush logic works on a
per named branch basis and you are trying to push a new named branch
(future-1.2.1), and despite the fact that it has been merged into
default, it still counts as a separate branch head. Indeed, it is the
first changeset on that named branch so you will need to force-push it
as Mercurial works now.
We have proposed a patch that makes the user interface experience a tad
better in this case by push aborting with a message that a new named
branch will be created on the remote and that you should use
--new-branch to push to push this through (without forcing the push so
you risk creating multiple heads on another branch). The patch is
pending acceptance by Matt, so until it's accepted, you will have to use
--force in this scenario.
--
Kind regards,
Henrik Stuart
More information about the Mercurial
mailing list