I am looking for a solution for having revision control on framework code and project code at the same time. If I am using a MVC framework, there may be specific directories where I should put my project code. I want to easily apply framework updates using revision control while still keeping project code under a separate repository.
The solution I have come up with is to clone the framework repo using git, and then create a mercurial repo on top of it, and creating .gitignores and .hgignores so that they don't pick up on each other's code.
My directory structure would in theory look something like this:
- Framework/ (git)
- Framework_Code/ (git)
- Models/ (git)
- projectModel.php (hg)
- Views/ (git)
- projectView.html (hg)
- Controllers/ (git)
- projectController.php (hg)
- Front_Controller.php (git)
Assuming I have the correct .gitignores and .hgignores, when there are framework updates I can do a simple
And when I need to commit project code I can do
Is this a bad workflow? Are there any easier ways to set up something like this with either git or mercurial? I'm open to alternative solutions because this seems like something that someone smarter than me would have a solution for.