Add a small mercurial repository as a sub-directory of a larger one - how?

Chris Green cl at isbd.net
Sun Aug 26 10:16:47 UTC 2018


On Sun, Aug 26, 2018 at 12:22:13AM +0200, Arne Babenhauserheide wrote:
> >> Ah, so you don’t actually want a subrepo, you just want to keep the
> >> history?
> >> 
> > Absolutely!  :-)
> >
> >> Then:
> >> 
> > Take any responses with a pinch of salt, I've had a *liitle* bit too
> > much to drink - not an ideal approach to software technicalities.
> >
> >
> >> cd path/to/bin/
> >> hg mv * bin/
> >
> > Whatever I do I seem to always get the response:-
> >
> > abort: with multiple sources, destination must be an existing directory
> 
> before you use hg mv, just do 
> 
>     mkdir bin
> 
Of course (I was a bit sillier than I thought last night!).

> >> hg ci -m "move to subrepo"
> >> cd path/to/odin
> >> hg pull --force path/to/bin
> >> hg merge
> >> hg ci -m "merge bin subfolder into odin"
> >> 
> >> This becomes somewhat cleaner with the convert extension:
> >> - replace the hg mv by a convert with a rename filemap
> >> - otherwise follow the steps above
> >> 
> > I think maybe tomorrow would be a good idea!  :-)
> >
> > Thanks for all your help Arne and I'm sorry I'm not at my brightest
> > and best just now!
> 
However in the cool light of day I seem to have got eveything sorted
out as it should be, thanks again Sven.

-- 
Chris Green



More information about the Mercurial mailing list