how to share a file between 2 repositories? Hardlinks?

Uwe Brauer oub at mat.ucm.es
Thu Oct 9 20:00:27 UTC 2025


>>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:

> Uwe Brauer <oub at mat.ucm.es> writes:
>>> "Dr. Arne Babenhauserheide" <arne_bab at web.de> writes:
>>> An option could be to use a common bibtex repository, always commit the
>>> changes to the bibtex file individually in the work repository and
>>> export+import those changes to the other repository.
>> 
>>> That’s actually far too complex. Feels like my brain got poisoned by the
>>> dozens of git clutches at work.
>> 
>> I am deeply sorry 😉

>
>>> To get bibtex initially, you simply hg pull --force from the bibtex repo
>>> and then hg merge bibtex into default.
>> hg pull /home/user/HGs/tex/bib/ --force -b bibtex
>>> So that would add quite a bit of changesets to my latex repository.

> I think you pulled the bibtex branch and all its dependencies.

> To be safe, best init a new repository and create the bibtex branch
> there.

Well this complicates things a bit and also defies the idea of VC

> If you need the bibtex history, you can use convert with an include rule
> to create a repo that *only* has the bibtex file.


This is also quite large.

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5684 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20251009/afa67c47/attachment-0001.p7s>


More information about the Mercurial mailing list