[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: Add a small mercurial repository as a sub-directory of a larger one - how?
From:       Arne Babenhauserheide <arne_bab () web ! de>
Date:       2018-08-25 22:22:13
Message-ID: 87wose3x4a.fsf () web ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Chris Green <cl@isbd.net> writes:

> On Sat, Aug 25, 2018 at 06:17:12PM +0200, Arne Babenhauserheide wrote:
>> 
>> Chris Green <cl@isbd.net> writes:
>> 
>> > On Sat, Aug 25, 2018 at 12:08:08PM +0200, Arne Babenhauserheide wrote:
>> >> Hi Chris,
>> >> 
>> >> Chris Green <cl@isbd.net> writes:
>> >> 
>> >> > I have a small mercurial repository (a bin directory on a host called
>> >> > odin) that I want to add in to my main 'keep all my configuration
>> >> > files and scripts' repository.
>> >> >
>> >> > The files from odin's bin directory will live at <root>/odin/bin in
>> >> > the main repository, this will be a new sub-directory.
>> >> >
>> >> > How do I add in this sub-directory and keep the history?
>> >> 
>> >> You can simply copy it there and add it to .hgsub; see
>> >> https://www.mercurial-scm.org/wiki/Subrepository
>> >> 
>> > That doesn't really do what I want, or at least I don't think it does.
>> >
>> > It looks as if I'd forever need to know that it was a sub-repository
>> > within my main repository for Mercurial to work properly with the
>> > files there.  It's also a "feature of last resort" and I really don't
>> > see any reason to use it in my situation.
>> 
>> 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

>> 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!


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic