Development Setup (version control workflow) part 2

Topics: Customizing Orchard, General, Installing Orchard
Sep 8, 2012 at 4:11 PM

There has already been at least one discussion on this. I set up a weird way of working with my project because our website started as a pure mvc site first before we used Orchard, and we had already been using Subversion, so we hacked up a system to allow us to work with both source control systems. It's time to figure out a better way to work, but the trouble is we are not experienced enough with Mercurial/DVCS to make a good decision. The one I have been using works but seems hokey and is inefficient. 

What I do now

(You can skip this section unless you are curious, my main question is down below)

My website's (an orchard module) is hosted on SVN. I check that code out to c:\svn\myproj\, and then I clone Orchard from codeplex into c:\Hg\OrchardCodeplex\. I have batch file that sets up up symlinks to my modules and themes:

  • \hg\OrchardCodeplex\src\Orchard.Web\Modules\myProj -> \svn\myProj\Orchard\src\Orchard.Web\Modules\myProj
  • \hg\OrchardCodeplex\src\Orchard.Web\Themes\myTheme -> \svn\myProj\Orchard\src\Orchard.Web\Themes\myTheme

It also makes a symlink for a custom .sln file that is based on, and often merged with the Orchard.sln (I modify Orchard.proj to use this .sln):

  • \Hg\OrchardCodePlex\src\MyProj-Orchard-1.x.sln --> \svn\myProj\Orchard\src\MyProj-Orchard-1.x.sln 

I also create symlinks for web.config, which I have some modifications to, and ...\modules\Orchard.Setup\Recipes\My-Custom-Recipe.xml. 


What I'd Like to do:

I need a system that is easier to work with, and has a more efficient workflow for pulling updates from the main Orchard repo on CodePlex. The current system works but when I need to pull updates from Orchard it's a pain, especially if there are updates to the .sln, web.config. Sometimes the symlinks are replaced with actual files (can't tell if it's VS.NET or TortoiseHg doing it), and I go for days without committing changes to web.config, recipe's, .sln's, etc., to my SVN repo. 

Ideally i'd switch my private stuff from SVN to Hg. Something like clone the main Orchard one into a local repo, and push that to my private Hg repo. Then I'd be able to modify the private copy to include my module, and possibly to include sub-repos for the other modules I depend on (TinyMceDeluxe, Piedone.Combinator, etc). The problem is I'm still not familiar enough with distributed version control to know if this is possible, or how to do it (would it be forks, or branches?). I'd want an easy way to pull changes from Orchard's CodePlex repo and merge them into my privately hosted Hg repo too. 


In the other discussion Bertrand suggested using nested Hg repo's but that doesn't seem ideal, because I want to be able to integrate our (minor) customizations to the Orchard project too. I want to have a single Hg or Git repo that our developers can check out and compile right away.