tags:

views:

103

answers:

1

My team wants to begin a trial run of using Mercurial on our existing codebase stored in a Subversion repository. We want to have some developers use a Mercurial mirror of the subversion repository and have the rest of the team continue to use the existing Subversion repository.

I've come across articles like, SubversionToMercurialSync that allows read-only access for the Mercurial mirror.

We want to be able to test all features of Mercurial using our existing codebase so that the team is able to continue development. Tools like svn2hg will allow us to test the local branching features of Mercurial, but we also want to be able test pushing, pulling, merging, etc from other remote repositories. To do this we will need a remote Mercurial mirror with commit access.

Has anyone tried this workflow? If so, what tools/techniques should I use to make this possible?

+1  A: 

If you are just trying it out, simply use them in parallel. Manually sync the two as needed. You can get familiar with it somewhat on the small scale with a local (non-cloned) hg repo, but you won't get comfortable with hg until you've worked on it as a team. I wouldn't recommend keeping this split personality for very long since the history will tend to be littered with non-helpful commit messages like "big sync between hg,svn". I would also suggest developing only on the default branch in the dual-sandbox. If you want to experiment with something on a named branch, try it in a hg-only sandbox.

Start by converting your svn repo to hg

Use development "sandboxes" that contain both the .hg and .svn subdirectories. You can probably just copy the .hg directory from a cloned repo.

Ideally, the developers involved in the trial should be committing to both vcs's in sync, but ...

To manually sync from svn to hg:

svn update
hg addremove
hg commit
hg push

To manually sync from hg to svn:

hg pull -u
(svn add newfiles)
(svn remove gonefiles)
svn commit

Pick a new feature that may take a little while to develop (days to a couple weeks), then start doing it in an hg repo converted from your svn base. That will give you a taste of the powerful branching and tagging that svn lacks.

I think my team did it pretty well. We set a date for switchover (one month out). During that time some of the team tinkered with hg and got a certain level of proficiency. This was instrumental in peer help. We did a lunch&learn on day zero of the switchover to mercurial. We all brought our laptops and played in the same repo, changing files, committing, pushing,pulling. People were willing to experiment because it was meangingless data. Start the repo with a single text file, tell people how to clone/push/pull the repo then tell them to change something (don't specify what). Let everyone work at their own pace. They will create new files,change files, create conflicts, resolve them ....

This approach requires that you have at least one person who is fairly familiar with branching, and merging to act as a facilitator.

Mark Borgerding
Do you have any suggestions on how to manually sync the two?
austen
see edited version
Mark Borgerding
Thanks for the input!
austen