Wednesday, May 27, 2009

Personal Revision Control

After visiting with my mentor, he had me to look into using Mercurial with a Subversion repository. Subversion code control and all revisions are centralized so while anyone can check out code, if you produce your own patches and would then like to revert your changes, you are out of luck since you need commit privileges to produce revision checkpoints. Mercurial, being a distributed revision control system, allows the user to have their own revision checkpoints even if they do not have commit privileges. Eventually I came across hgsvn which downloads a Subversion branch and then converts it to a Mercurial branch.

After downloading and installing the latest version and reading the documentation, everything seemed pretty straightforward. I executed the following command:

$ hgimportsvn personalrc

Everything appeared to be going smoothly until I looked inside the folder and noticed that nearly none of the files from the /python/trunk/Lib branch were in there. I spent quite a bit of time trying to figure out why it didn't work until I finally realized that, for some reason, it was not checking out the newest revision of code. After entering the web interface of Python's SVN repository, I saw the latest revision was 72964. So I executed the following command:

$ hgimportsvn -r 72964 personalrc

Everything was in its place now and I had the code revision control the Mercurial provides.

No comments:

Post a Comment