How to track a file (in various versions) used by several projects

Norman Gray gray at nxg.name
Thu Oct 19 16:18:42 UTC 2023


Steve, hello.

On 19 Oct 2023, at 16:59, Steve Mullock wrote:

>> What I do in a similar situation is that I regard the common library as a separate project, with a
>> private 'distribution', in the sense that there's a 'dist' target in the Makefile, which includes a
>> revision hash and date in a README at the top.
>
>
> So it sounds like you are talking about a binary library compiled from sources. That makes
> things more complex than my immediate problem, but it still might make a good example for me.
> Also I sometimes have a similar situation for compiled code.

Ah, no, I wasn't thinking about compiled code.  The specific case here is a local, but quite intricate, LaTeX class file, and some associated other files (images, and XSLT scripts).  Once they're in place in the 'client' repo, they're included from there by LaTeX documents in that repo.

Thus the client repo remains standalone, but I have a mechanism for bugs which emerge in the class file, to be fixed in one client tree, and then be coped back to the 'library' repo, where they can be bundled into a 'distribution' (strictly in scare-quotes), ready to be copied into other 'clients', when that becomes convenient.

There's a few by-hand steps in the workflow (if feels dodgy even dignifying it with 'workflow'!), and there might be a way which uses more Mercurial cleverness, but the process is fundamentally simple enough that this works for me.

Best wishes,

Norman


-- 
Norman Gray  :  https://nxg.me.uk


More information about the Mercurial mailing list