sub-tree configuration ?
John Coomes
John.Coomes at oracle.com
Mon Apr 7 22:36:48 UTC 2014
David Holmes (david.holmes at oracle.com) wrote:
> On 5/04/2014 4:22 AM, Alejandro E Murillo wrote:
> >
> > On 4/3/2014 6:14 AM, David Holmes wrote:
> >> If I tclone a complete forest all the tree subcommands work as
> >> expected from the top-level repo.
> >>
> >> But if I cd into a repo that is itself a "tree" the trees extension
> >> doesn't recognize it unless I use tconfig to define that sub-tree.
> > What I do, as recommended by John Coomes, is to have local copies of the
> > master repos
> > I usually clone. Then I configure those so that they have the tree conf
> > in the "sub-trees"
> > (hotpot and jdk). So when cloning, I tclone from the local master repo
> > (that already has
> > the proper conf in the sub-trees), instead of tcloning from the http
> > master, so the clone will also have that info in the subtree.
>
> Sure, but it is this initial step that I'd like to see automated. :) If
> tclone can generate the config for the top-level, it could probably
> generate the config for sub-trees too.
If the top-most repo already has the desired subtrees configured
(e.g., after a tclone), use tconfig with the --depth option:
$ hg tconfig --set --depth
That will take the existing configured subtrees and rewrite the
configuration depth-most (i.e., each subtree is defined in the nearest
enclosing repo). FWIW, I regularly use this.
If the top-most repo does not have the desired subtrees configured
(e.g., after using getsource.sh), add the --walk option to the above
to walk the filesystem and discover subtrees:
$ hg tconfig --set --depth --walk
There are still a few changes necessary on the server for the
configuration to be written depth-most during a tclone. But once
those are done, tclone will do what you (and I) want, and the separate
"tconfig --set --depth" step will be unnecessary.
-John
> > caveat: you need to make sure your local repos are synched with the
> > master before cloning them.
> >
> > Note that this indicates, that, if the http master repos would have the
> > tree info for the sub-trees, then it
> > would also solve that problem when tcloning from those, but I suspect
> > that info is not there, because
> > that would be closed info in the open repo
> >
> > hth
> > Alejandro
> >>
> >> Is there a way to automate this so that the subtrees don't need to be
> >> manually configured?
> >>
> >> Thanks,
> >> David
> >
--
John Coomes Oracle, MS USCA22-3??
john.coomes at oracle.com 4220 Network Circle
408-276-7048 Santa Clara, CA 95054-1778
*** Support GreenPeace and we'll all breathe easier. ***
More information about the hg-tools-dev
mailing list