Propagating push arguments to subrepos

Greg Ward greg-hg at
Thu Sep 29 22:01:37 CDT 2011

On Thu, Sep 29, 2011 at 4:57 AM, Didly <didlybom at> wrote:
> 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.

But many arguments to push don't make sense for subrepos. The URL? -r?
--branch and --bookmark may or may not work, depending on your branch
naming policy and how tightly connected your parent repo and subrepos

I would say that passing --new-branch makes sense. Maaaaybe --force.
Most likely --ssh. Possibly --remotecmd, but if you are pushing to
different servers (ie. using absolute URLs for subrepos), that might
be a bad idea.


More information about the Mercurial-devel mailing list