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

Arne Babenhauserheide arne_bab at web.de
Sat Aug 25 10:08:08 UTC 2018


Hi Chris,

Chris Green <cl at 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

To ease evolution, you’d likely be best advised to use a shell
repository: Init a repo at <root> to which you add both odin and bin as
subrepositories. See 
https://www.mercurial-scm.org/wiki/Subrepository#Use_a_thin_shell_repository_to_manage_your_subrepositories

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1076 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20180825/588bd4b6/attachment.asc>


More information about the Mercurial mailing list