version-controlmercurialautomationcvsversion-control-migration

How to version control a subdirectory of a Mercurial repo simultaneously in a CVS?


How to version control a subdirectory of a Mercurial repo simultaneously in a CVS repo as a subdirectory?

The reason I need this is that a private project version controlled with Mercurial has a subdirectory of code and resources that happen to be useful for a global multi-person project, which is version controlled with CVS. I want to continue the development in the Mercurial repo, but when it's committed, I'd like it to propagate to CVS repo too. Occasionally other people will commit via CVS to this directory, I'd like to be able to get those revisions to my Mercurial repository as well. Any good solution to this senario?


Solution

  • We did this for an include directory at a company I worked at. What we ended up doing is forcing everyone to commit to the CVS repo. Then I wrote a cron job that would commit any changes made in the CVS repository into the relevant Mercurial repos. Our case was complicated by the fact that the Mercurial repository included an entire tree (not just the include directory). If I was to do it over again I would make the include directory a separate repository.