Propagating push arguments to subrepos

Didly didlybom at gmail.com
Thu Sep 29 03:57:25 CDT 2011


On Thu, Sep 29, 2011 at 10:37 AM, Isaac Jurado <diptongo at gmail.com> wrote:
> On Thu, Sep 29, 2011 at 8:09 AM, Didly <didlybom at gmail.com> wrote:
>> Hi,
>>
>> it seems that when you push a repo that contains subrepos, when the
>> subrepos are pushed they do not use the arguments that are passed to
>> the push command. This means that if you have a new branch on a
>> subrepo the push action will always fail even if you use is the
>> --new-branch argument. This is quite annoying and is something that I
>> face quite often.
>>
>> Is there a way to pass down the push arguments to the subrepos? If not
>> I may be interested in trying to add that functionality (perhaps by
>> adding a -S flag to push), as long as you guys think it is a good
>> idea.
>
> The simplest solution is to work INSIDE the subrepo for any case that
> requires special attention.
>
> --
> Isaac Jurado
>
> "The noblest pleasure is the joy of understanding"
> Leonardo da Vinci
>

Of course that would work, but depending on the number of subrepos it
may be a bit unpractical, or may require using the onsub extension,
etc. In addition, I believe that push is supposed to only push those
subrepo revisions that are used on the top repo (and their ancestors),
although I am not 100% that is the case. If it was, it would be quite
hard to replicate that behaviour by manually pushing the subrepos.

In any case, ignoring the arguments provided to push when pushing
subrepos seems quite odd to me. It seems natural to at least have a
way to tell hg to use those arguments when pushing subrepos.

Angel


More information about the Mercurial-devel mailing list