[PATCH [RFC]] push: propagate --new_branch option when pushing subrepos

Greg Ward greg-hg at gerg.ca
Thu Sep 29 22:05:00 CDT 2011

On Thu, Sep 29, 2011 at 2:26 PM, Martin Geisler <mg at lazybytes.net> wrote:
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -4077,7 +4077,7 @@
>>          c = repo['']
>>          subs = c.substate # only repos that are committed
>>          for s in sorted(subs):
>> -            if not c.sub(s).push(opts.get('force')):
>> +            if not c.sub(s).push(opts.get('force'), opts.get('new_branch')):
> I think it would make sense to propagate the entire opts dictionary
> instead. That would be a bigger chance, but it would mean that things
> like --ssh and --remotecmd are also propagated.

As I just posted because I didn't notice that Angel had sent a patch:
I disagree! I think it does make sense to construct a new dict of
options that should propagate, but a blind copy is risky. My take:

  * yes: --new-branch, --ssh
  * maybe: --force, --remotecmd, --insecure
  * no way: --rev, --bookmark, --branch


More information about the Mercurial-devel mailing list