how to share a file between 2 repositories? Hardlinks?
Uwe Brauer
oub at mat.ucm.es
Fri Oct 10 07:50:01 UTC 2025
>>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:
> Uwe Brauer <oub at mat.ucm.es> writes:
>> This is also quite large.
> Did you convert with a filemap?
Well no (but I tried now, see below). The reason why I did not:
+ the repo is already pushed and shared since a couple of years
+ the vast mayority of changes (400 changesets) were only done in bibgraf.bib. So converting might not really reduce the number of changesets
> ⇒ https://wiki.mercurial-scm.org/ConvertExtension#A--filemap
> you need
> include "path/to/bibtex.bib"
> ANd then hg convert --filemap repo bibtex-repo
Well I did what I always did (in a sandbox)
+ hg clone /home/user/HGs/tex/bib/ bib-clone
+ filemap contains
include bibgraf.bib
+ cp filemap bib-clone/
+ g convert --datesort /home/oub/tmp4/bib-clone/ /home/oub/tmp4/bib-repo --filemap /home/oub/tmp4/bib-clone/filemap
Then bib-repo has 363 instead of 406 changesets.
And in addition I have to delete my helix repository and create a new
one. The problem is that this will confuse my collaborators who have no
idea about mercurial at all, save push, fetch (not pull+merge), commit
and clone.
> 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 if I push that now my collaborators pull hg log -G might confuse them
> 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.
hg pull /home/user/bib-repo -b bibtex --force
Now results also in
changeset: 1996:262b91e38ff2
│ tag: tip
│ Remote_Branch: /home/oub/tmp4/bib-repo/bibtex
│ Branch: bibtex
│ Author: Uwe Brauer <oub at mat.ucm.es>
│ Date: Fri, 10 Oct 2025 09:47:27 +0200
│ Phase: public
│ Summary: Add first commit to bibtex branch
│
○ changeset: 1995:e3d1de58c858
Branch: default
Author: oub
Date: Sun, 19 Dec 2004 10:37:47 +0000
Phase: public
Parent: -1:000000000000
Summary: Initial revision
◉ changeset: 1994:4886ee5a8900
│ Remote_Branch: default/default
│ Branch: default
│ Author: Uwe Brauer <oub at mat.ucm.es>
│ Date: Fri, 10 Oct 2025 09:15:18 +0200
│ Phase: public
│ Summary: Rewrite the abstract
│
As nifty as the idea sounds, I am not sure I can use it, thanks
regards
Uwe
> Best wishes,
> Arne
--
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel.
Stop the war in Gaza, guarantee humanitarian aid, and bring the hostages back.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
-------------- 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/20251010/92a48c7a/attachment-0001.p7s>
More information about the Mercurial
mailing list