How to combine several small repositories into separate subdirectories of a single repository?

Chris Green cl at isbd.net
Tue Apr 28 19:30:20 UTC 2020


On Tue, Apr 28, 2020 at 06:27:32PM +0200, Malcolm Matalka wrote:
> 
> Chris Green <cl at isbd.net> writes:
> 
> > I have a number of separate small projects maintained using mercurial,
> > since they all relate to Dokuwiki and could probably, in the long
> > term, share some code it would see sensible to combine them into a
> > single repository.
> >
> > So, given a set of separate projects each with its own .hg as follows:-
> >
> >     ./dokuwiki/plugins/servlog/.hg
> >     ./dokuwiki/plugins/tagentry/.hg
> >     ./dokuwiki/plugins/trip/.hg
> >     ./dokuwiki/plugins/showmail/.hg
> >     ./dokuwiki/tpl/roundbox/.hg
> >     ./dokuwiki/tpl/dokucms/.hg
> >
> > How do I combine them into a single mercurial repository with its data
> > stored in ./dokuwiki/.hg ?
> 
> You can pick one of those repos or make a new one, and then just do hg
> pull -f path/to/other/repo
> 
If I'm in ~/dokuwiki and do 'hg pull -f plugins/blog' then all blog's
files end up in ~/dokuwiki which isn't what I want.  I want the files
to be in the same sub-directory relative to ~/dokuwiki.  Do I have to
do an 'hg move <all the files>' as well?

I maybe didn't explain my requirement very well, I want exactly the
directory structure I have now but with a single mercurial repository
based in ~/dokuwiki.

-- 
Chris Green



More information about the Mercurial mailing list