[PATCH] subrepo: pull subrepos recursively, and support pull from clones (issue2024)

Pradeepkumar Gayam in3xes at gmail.com
Mon Jul 12 21:32:05 CDT 2010


On Mon, Jul 12, 2010 at 11:56 PM, Martin Geisler <mg at lazybytes.net> wrote:

> Pradeepkumar Gayam <in3xes at gmail.com> writes:
>
> > # HG changeset patch
> > # User Pradeepkumar Gayam <in3xes at gmail.com>
> > # Date 1278801299 -19800
> > # Node ID ed3ea5d08f64b0b4ea94353ca42cfa6f07e8f38f
> > # Parent  f4eddec324b755a45ea71570c7c8dc63bcbdfc1a
> > subrepo: pull subrepos recursively, and support pull from clones
> (issue2024)
> >
> > diff -r f4eddec324b7 -r ed3ea5d08f64 mercurial/commands.py
> > --- a/mercurial/commands.py   Fri Jul 09 14:21:45 2010 +0200
> > +++ b/mercurial/commands.py   Sun Jul 11 04:04:59 2010 +0530
> > @@ -2798,6 +2798,19 @@
> >              raise util.Abort(err)
> >
> >      modheads = repo.pull(other, heads=revs, force=opts.get('force'))
> > +
> > +    if opts.get('subrepo'):
> > +        c = repo[repo.changelog.node(len(repo)-1)]
>
> I guess this means that you suggest we pull all the subrepositories
> present in tip? Would it not be more logical to pull those present in
> the current working directory?
>
> Yes, that makes sense.

I think you are working on subrepos. So, shall I resend the patch or you
already have something similar to this?

> That way, I can do
>
>  hg pull --subrepos
>
> when I want to update all subrepositories in my working copy to their
> newest version.
>
> > +        if '.hgsubstate' in c.manifest():
> > +            subrepos = c.substate
> > +            for s in sorted(subrepos):
> > +                try:
> > +                    c.sub(s).pull(opts.get('force'), source)
> > +                except:
> > +                    pass
> > +        else:
> > +            ui.status(_('No subrepos present'))
>
> We don't capitalize such messages.
>
>
--
> Martin Geisler
>
> Mercurial links: http://mercurial.ch/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100713/c41ba3ff/attachment.htm>


More information about the Mercurial-devel mailing list