subdirectory clone/pull/update?
Ethan Tira-Thompson
ejt at cmu.edu
Sun Aug 29 14:21:03 UTC 2010
Hi all,
I’ve hit a major stumbling block for switching to mercurial. (Please also see my previous email) We have a large software package with a number of different tools and a large chunk of code which is compiled into a shared library. We also have a ‘project’ directory, which provides data files and some boilerplate for users to write an application using the library.
So the common workflow is to copy our package to some common location like /usr/local, and then users (students actually) can copy just the project subdirectory to start a new application.
As we develop the software, sometimes we make changes to the project boilerplate, or add data files for a class assignment, and it is very convenient to use the SCM to synchronize these, so the students can just do an pull/update in their project(s).
Suggestions? Mercurial doesn’t seem to support subdirectory updates, or does it?
Here’s a hack, but perhaps I can start a separate repository for the project directory, and then add the project/.hg as into the larger library repository, so one repository ‘contains’ the other. Then when modifying project files, I commit/push them from “project" (so the project repository is updated), and then commit/push the library root as well (so the library’s copy of “project" is up-to-date as well) . There’s a bunch of looming gotcha’s though. Please tell me a better way. :)
Obviously, we could have the ‘project’ as a completely separate repository, but this is also annoying: new, non-classroom users will have to checkout two repositories, and will likely wind up missing one or the other, and also our own developers typically just use the ‘project’ embedded in the library and if these are separate we will forget to update both and we’ll have issues with them falling out of sync.
Thanks,
-Ethan
More information about the Mercurial
mailing list