The revisions let you track differences between multiple versions of a post.

Revision of Comparing Version Control Systems : Bazaar vs Mercurial (hg) vs Git from Tue, 2010-02-02 16:31

Toturial

It's about the sixth year since my first commit on subversion, Moving from CVS to subversion was really amazing, subversion was sueprior in many ways and it served me well. But the age of Centralized version control systems is over, we need much more power full softwares to deal with huge opensource projects and on the run software development. We should to be able to change anything, anywhere, anytime, and keep track of all this changes

My main focus on this article is Bazaar but you'll see notes from my friend Antoni who is a Mercusial user.

Migration :

This is the most imortant part, if you can't migrate you code's history then that would be a huge problem.

Bazaar offers several ways for migrating SVN repositories , each one has its own limitations but the one i picked was bzr-import and bzr-svn

Plugins :

Bazaar like the other three supports plugins , in my expreince installing Bazaar plugins is as easy as downloading and the extracting it into the plugins folder. That's it. it's even easier even windows.

Integration :

Bazaar has a plugin for Eclipse, the installation proccess was not as smooth as subversion but i can't say that it was difficult. i had to manually add the bzr binary and plugin folders location and also coinfugre few options (All couldn't be pre configured). But according to BzrEclipse roadmap, it's going to be much better soon. number of feature is also very limited comparing to subversion.

Antonio Note :

What of the things which is very important for is the future plans :

Bazaar roadmap And also it looks like that bazaar developers really care about their users ThreeWishes - Bazaar Version Control , Bazaar also has Bazaar Performance Roadmap

There is a new website for comparing git with others, very useful. whygitisbetterthanx.com

There is also another website for comparing Bazaar and Git , they approche is interesting and it's based on personal experience using Tweeter! http://www.bzrvsgit.com/

 

To get started with bazaar as fast as you possible with subversion backgound : BzrForSVNUsers - Bazaar Version Control and Bazaar for Subversion users — Bazaar Migration Docs

 

Short Guide for Bazaar To SVN migration

I assume that you're alteast know what Bazaar is! and why you want to try it. if you don't then please
spend some time and read the User Guide documetnation of bazaar's site before continuing

Karmic :
Add this repository for bazaar gui (known as bazaar explorer)

ppa:bzr-explorer-dev/ppa

Bazaar currently does not support all of subversoin features, so please make sure that your project does not depend on those featues :
http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion#id50

If you're not using ubuntu karmic more iformation here :  https://launchpad.net/~bzr-explorer-dev/+archive/ppa

sudo apt-get install bzr bzr-explorer bzr-svn

Lets dump subversion :]

REPO_PATH="/home/salek/Projects/All/My Projects/General Lib/general_lib_repo"
WORKING_COPY_PATH="/home/salek/Projects/All/My Projects/General Lib/general_lib2"
REPO_DUMP_PATH="/home/salek/Desktop/repo.dump"
DEST_PATH="/media/disk"
TEMP_DEST_PATH="/home/salek/Desktop"

svnadmin dump "$REPO_PATH" > "$TEMP_DEST_PATH/repo.dump"
cd "$TEMP_DEST_PATH"
tar -cvpjf "$TEMP_DEST_PATH/repo.tar.bz2" "repo.dump"
mv "$TEMP_DEST_PATH/repo.tar.bz2" "$DEST_PATH/"
safe-rm -rf "$TEMP_DEST_PATH/repo.dump"

Preparing Bazaar repositories (Not required) :

mkdir -p vcs/bazaar/general_lib
bzr init-repo vcs/bazaar/general_lib  #(prepare local repository)
cd vcs/bazaar/general_lib

bzr init sftp://base.pt2.com/vcs/bazaar/general_lib/trunk
bzr checkout sftp://base.pt2.com/vcs/bazaar/general_lib/trunk
cd trunk
cp -ar ~/PROJECT .     #(copy files in using OS-specific tools)
bzr add                #(populate repository; start version control)
bzr commit -m "Initial import"

Importing subversion dump into bazaar center repository:

bzr svn-import  /home/salek/Desktop/repo.dump vcs/bazaar/general_lib

Now pushing the local branch into the centeral repository (Not required)

bzr push sftp://base.pt2.com/vcs/bazaar/general_lib #(publish to central repository)

Checking out working copy :

mkdir -p vcs/bazaar/general_lib_working_copy
cd vcs/bazaar/general_lib_working_copy
bzr checkout ~/vcs/bazaar/general_lib/trunk

How to migrate the changes in working copies :
As you know subversion does not support local history, you always depend on the central repository, therefore for migrating non comited chagnes
into the repositoy there are few ways :

  • Commit all the changes if they're ready and then migrate
  • Create a new branch and commit not ready change into that branch
  • If your working copy does not have and rename changes, delete all .svn folder , and paste it on your new bazaar branch after the migration
      bazaar does not have spcially folders inside all directory like subversion there is only of on branch's root, so it's possible.
  • If it also has renames or moves there is a pluging for detecing it http://doc.bazaar-vcs.org/plugins/en/automv-plugin.html,
  • i ddin't use this plugin  and i don't know how well it works.

If you have a project on source forge , migration is still possible : https://sourceforge.net/apps/trac/sourceforge/wiki/SVN%20adminrepo , you'll also need to enable bazaar after that https://sourceforge.net/apps/trac/sourceforge/ticket/3691

Note : Bazaar changes rapidly and free vcs service might no be updatodate, sourceforge uses 1.18 , in this case you'll need create using repo using old format on local before import.

Note : While i was trying to migrate one of my sourceproject from svn to bzr, i came into some very nasty issue due to the differece between server and local bzr version. bazaar supports various different tree formats which can causes lots of headaches. this command helped https://sourceforge.net/apps/trac/sourceforge/ticket/517

Note : Mercurial is much better integrated with other applications, for example currently netbeans does not support bezaar. more information here IDEIntegration - Bazaar Version Control

Note: I don't recommend bazaar for non technical people

Note : Be careful with reviews, most of this version control systems are undel active developement, an issue that exists now might be more than fix few month later. Alaywas check the review date before relying on it.

Note : The age of single all-in-one solution is over, each solution has its pros and cons. same applies to VCSs, each version control system different issues

Resources :

Your rating: None Average: 2.4 (47 votes)

Comments

Jelmer Vernooij's picture

SourceForge's outdated bzr

Unfortunately your issues with Bazaar seem to be caused by the fact that SourceForge is still running an old version of Bazaar. The format issues all have been resolved as of Bazaar 2.0.

admin's picture

Thanks Jelmer for the

Thanks Jelmer for the tip.
Yes i noticed that after playing with Bazaar for a while. Unfortunately i have to stick with Sourceforge's old Bazaar :(, i hope they upgrade to v2 soon.
I manged to convert one of my projects to Bazaar successfully and i'm writing an easy migration guide for Sourceforge's svn users.

Pooya Sanooei's picture

I can't use anything but git

I can't use anything but git cause it's a nightmare to migrate or start another VCS learning curves. I still have second thoughts about Bazaar. btw never heared of directory track feature.

quite useful

Web Application Development's picture

Thanks jelmer

Excellent post....I really appreciate this site & thank you so much sharing with us.