[PATCH RESEND2] bookmarks: allow push to create a new remote head if it is about to be bookmarked via -B

Stephen Lee sphen.lee at gmail.com
Tue Nov 26 17:33:49 CST 2013


On Wed, Nov 27, 2013 at 1:12 AM, FUJIWARA Katsunori
<foozy at lares.dti.ne.jp> wrote:
> At Mon, 25 Nov 2013 00:05:52 +1100,
> Stephen Lee wrote:
>>
>> # HG changeset patch
>> # User Stephen Lee <sphen.lee at gmail.com>
>> # Date 1384165014 -39600
>> #      Mon Nov 11 21:16:54 2013 +1100
>> # Node ID fc00a55e05989147ca622b44129c3b9cbbf250eb
>> # Parent  1c46b18b0e1c47fa4cecf21b78c083a54ae9903f
>> bookmarks: allow push to create a new remote head if it is about to be bookmarked via -B
>>
>> Push is currently allowed to create a new head if there is a remote bookmark that will
>> be updated to point to the new head.  If the bookmark is not known remotely then
>> push aborts, even if a -B argument is about to push the bookmark. This change allows
>> push to continue in this case.  This does not require a wireproto force.
>
> I like this allowing push itself.
>
> But, in the other hand, I also worry that there is no way to examine
> whether newly added head is bookmarked or not in "pretxnchangegroup"
> (or any other pre-transaction) hooks on the remote repository side.

This has been a problem for us too.
In particular we want to:
 * include bookmarks names in email notifications - the notify
extension can't do this because bookmarks arrive after changesets.
 * reject pushes that advance certain bookmarks (ie, only integrator
can advance @), we can reject the bookmark update, but the changesets
are already in the repo

Unfortunately I think we will have to wait for bundle2 to fix this.

>
> As far as I confirmed, "pushkey" hook can examine newly added (or
> updated) bookmarks, but it can't know what changesets are brought from
> another repository, and can't cancel already committed "changegroup".
>


More information about the Mercurial-devel mailing list