views:

67

answers:

1

The scope of this is that we have three main projects. Some of the source files are shared between the projects. There are nearly 3 million lines of code (not including comments or spaces) that has grown over 20 years. We currently use Source Safe for our version tracking. But this is starting to fail us as we expand not only our products but also by how many developers we have playing in different modules that are shared. An example of a shared file would be a template class. The code is solid and is used in many projects. It is a single file so it is just shared between the projects. Now 20 years later that one file has grown to over 1000 files (Yes I would love to refactor and make libraries, not happening). Does Mercurial support the same kind of concept in some way?

Thanks Mark

+2  A: 

Mercurial subrepos may be what you're looking for, if I'm reading your question correctly.

legoscia
As I'm just starting to play with Mercurial, my full understanding of it is limited. I read over the subrepos and got the feeling that the shared files would be in a sub directory. Right now we would have product A and B. Product A has projects 1-25 and product B has projects 1-100. So A.1, B.3 and B.7 share a file a1. So a1 is in the respective directories of A.1, B.3 and B.7. But under Mercurial I would also create a project C to contain a1. Then when I use the subrepos my directory structure would be something like A.1.C.a1, B.3.C.a1 and B.7.C.a1.Is this correct?
Yes, that's how it would work. I'm afraid you'd have to resort to symlinks or something to have the file appear in the parent directory...
legoscia