Subrepos, code sharing and symlinks
Todd Greer
TGreer at affinegy.com
Tue Sep 11 16:58:27 UTC 2012
You may wish to try the GuestRepo extension at https://bitbucket.org/selinc/guestrepo/. It might fit your needs better than subrepos.
--
Todd Greer
-----Original Message-----
From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Alistair Bell
Sent: Friday, September 07, 2012 3:45 PM
To: mercurial at selenic.com
Subject: Subrepos, code sharing and symlinks
Hi all,
We have a system right now where we use subrepos extensively. Project repos often have as many as 30 subrepos, and each subrepo can be shared by many project repos.
The .hgsub file is of the form 'sub/sub1=../../sub/sub1' etc., which works fine in a system where there is a central repo and users push to and pull from it.
But I now have a need to be able to push and pull between peer repos, and that means I need trivial .hgsub files (sub/sub1=sub/sub1). But I also need the code-sharing. And in fact, I would really like to be able to have the option of multiple project repos each sharing a working dir of any subrepos they share, so that I can test out any particular fix easily in multiple contexts.
No problem, one thinks -- we're using a wrapper around hg anyway, and all we do is, right after a checkout, we replace the subrepos with symlinks to where they really are.
And... of course I run into the buzzsaw called the path auditor, which wags a finger at me and says 'no can do, that's dangerous'.
Before I hack out the 'thou shalt not traverse a symlink' audit check, is there another solution that achieves what I need?
The requirements are:
(1) The capability to push and pull project repos arbitrarily but still share subrepos at the central repo and at any others that can accept pushes
(2) The capability for multiple project repos to share any subrepos that they share, even while checked out (including a shared working dir)
(I define 'project repo', by the way, as 'a repo that contains an .hgsub file, maybe a bit of configuration, and not much else' -- all the actual code is in subrepos.)
And yes, I'm aware of the dangers of hacking out the audit check. I've read the long thread from a few years ago. That's why I'd love to hear if there's a better solution.
Thanks!
Alistair
_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list