how to share a file between 2 repositories? Hardlinks?

Dr. Arne Babenhauserheide arne_bab at web.de
Thu Oct 9 21:31:52 UTC 2025


Uwe Brauer <oub at mat.ucm.es> writes:
> This is also quite large.

Did you convert with a filemap?

⇒ https://wiki.mercurial-scm.org/ConvertExtension#A--filemap

you need

include "path/to/bibtex.bib"

ANd then hg convert --filemap repo bibtex-repo

Then you can hg branch bibtex in the bibtex-repo.

> I came up with the following «bright» idea
>
> In the bibtex repo:
>  hg up 0
>  hg branch bibtex
>  hg revert bibtex -r 409 (which is tip)
>  hg commit -m "Start the bibtex branch"
>
> Then in the latex repository I run
>
>  hg pull /home/user/bib -b bibtex --force
>
> But then in my latex repository I see 
> hg log -G
>
> ○  changeset:     1994:6d3d9467e443
> │  tag:           tip
> │  Remote_Branch: /home/oub/tmp4/bib2/bibtex
> │  Branch:        bibtex
> │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │  Date:          Thu, 09 Oct 2025 21:52:06 +0200
> │  Phase:         public
> │  Summary:       Start the bibtex branch
>> ○  changeset:     1993:e3d1de58c858
>    Branch:        default
>    Author:        oub
>    Date:          Sun, 19 Dec 2004 10:37:47 +0000
>    Phase:         public
>    Parent:        -1:000000000000
>    Summary:       Initial revision
>
> ◉  changeset:     1992:a15e729491d4
> │  Remote_Branch: default/default
> │  Branch:        default
> │  Author:        Uwe Brauer <oub at mat.ucm.es>
> │  Date:          Thu, 09 Oct 2025 10:07:22 +0300
> │  Phase:         public
> │  Summary:       replace \mu'_p by \epsilon_p'
>>
> That looks also odd.

That just means that you have multiple roots. Mercurial can deal with that.

But it means that the bibtex branch has all files from default, which
means that it’s far bigger than needed to version the bibtex file.

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


More information about the Mercurial mailing list