Access command line arguments from In-Process Python hook

Steve Hoelzer shoelzer at gmail.com
Thu Jun 19 19:24:51 UTC 2014


On Thu, Jun 19, 2014 at 1:27 PM,  <durwin at mgtsciences.com> wrote:
> Steve Hoelzer <shoelzer at gmail.com> wrote on 06/19/2014 12:04:35 PM:
>
>> From: Steve Hoelzer <shoelzer at gmail.com>
>> To: durwin at mgtsciences.com
>> Cc: Matt Mackall <mpm at selenic.com>, Mercurial List <mercurial at selenic.com>
>> Date: 06/19/2014 12:04 PM
>> Subject: Re: Access command line arguments from In-Process Python hook
>>
>> On Thu, Jun 19, 2014 at 10:33 AM,  <durwin at mgtsciences.com> wrote:
>> > Normally when a new branch is pushed the option
>> > --new-branch is specified. So using the force option for both normal and
>> > branch pushes is an acceptable method for what I am doing?  The
>> > repository
>> > will handle the forced push appropriately for both branch and
>> > non-branches?
>>
>> The force option "will push all new heads on all branches" according to:
>>
>>
> http://www.selenic.com/mercurial/hg.1.html
>
>>
>> That sounds like what you want.
>>
>> Steve
>
> Thank you.  I've done some testing and it looks like it does the job.  What
> has me a little concerned is the last part of the sentence,  "...an action
> which will almost always cause confusion for collaborators".

The wording is not clear, but I think it is warning about getting
multiple heads on a branch in a public or shared repo, a situation
"which will almost always cause confusion for collaborators". Regular
pushes (non forced) prevent that from happening, so these repos will
never end up in that situation. (Well, unless someone has multiple
heads in a private repo and does push -f.)

Using push -f for syncing simply makes the repos mirrors of each other
with all heads, and therefore all branches. If users don't push
multiple heads per branch, the synched repos will never have multiple
heads per branch.

Steve



More information about the Mercurial mailing list