[PATCH 1 of 1] push: add --new-branch option to allow intial push of new branches

Matt Mackall mpm at selenic.com
Mon May 10 17:08:36 CDT 2010


On Mon, 2010-05-10 at 20:03 +0200, Sune Foldager wrote:
> To summarize and make sure we're all agreeing, I have a working version
> of the --new-branch patch in my queue (against crew/stable and default)
> which implements the following changes to the prepush logic:
> 
> BEFORE:
> 1. If --force or empty remote, allow with no further checks.
> 2. Otherwise, if new branches are pushed, fail.
> 3. Otherwise, fail if head count increases on any pushed branch.
> 4. Otherwise, allow.
> 
> AFTER, step 2 and 3 change to:
> 2'. Otherwise, if new branches are pushed, fail unless --new-branch is
> given.
> 3'. Otherwise, for pushed branches which exist on the remote, fail if
> head count increases.
> 
> The option is currently called --new-branch with no short option. It's,
> I think, a bit unfortunate that we have a short option for --force and
> not for this one (it should rather be the other way around), but it's
> not a show-stopper.
> 
> Otherwise, we could use -n (although might smell like --test), or -N if
> we want one. Are people ok with the above, so I can push it to crew?

Sounds ok. Let's wait on the short option.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list