Should I Change To Bazaar

Adrian Wilkins adrian.wilkins at gmail.com
Fri Jan 16 18:50:09 GMT 2009


I was in a similar boat - we were using SVN at work (because I installed 
it and said "look how much better than zip files this is"), but I was 
working at home a lot and wanted offline commits. I started by using SVK 
and was quite pleased with it (apart from the performance) until it had 
an epic fail during a merge. I had started using Bazaar for its superior 
merging on another project and switched to that.

> On most (but not all) work projects, I
> use PVCS for the collaborative part 
> 

You should be fine to use Bazaar in parallel with PVCS as long as you 
can get it to ignore .bzr - only one at the top level, not one for each 
folder like svn. Since it ignores .svn I presume it can ignore .bzr .

> I use Windows and Linux (work and home) and (at the moment) the same
> repository for both.  For the vast majority of projects I work on, it
> is fine for LF line-feeds to be used throughout: the Windows tools
> cope, so I use cygwin subversion as it keeps things nice, easy and
> consistent.
> 

Bazaar, like Subversion, doesn't mess with line-endings. There's a lot 
of discussion around line-ending support but for me I always prefer to 
just use Windows tools that support LF endings.

> I keep my subversion repository on a Freecom Toughdrive and plug it
> into whatever computer I am using at the time.  

I was doing this myself with Bazaar, it works quite well.

> I run svnserve and
> connect to the repository with svn://localhost.  This simplifies
> things as I often log onto different Windows computers with the
> working folder on the network, but the Toughdrive mapped as a
> different drive letter:

For windows I use the excellent USBDLM service which keeps a consistent 
drive letter for my thumbdrive.  [1], but bzr serve would also achieve 
the same effect. My chosen GNU/Linux distro (Ubuntu) uses consistent 
mount names when automounting USB media.

> shortens the URLs: the one thing I miss from CVS
> was bash tab completion when typing "cvs co".
> 

Because I use the filesystem direct, I get tab completion in any of the 
windows shells I use. You don't need to explicitly use "file://" URLs 
for Bazaar, it will infer them from paths.

> The trunk contains all of the generic
> code (drivers for the peripherals on the development board etc) and
> some outline "App" code for the specific stuff.  I currently do "svn

> 
> * Easier merging of core files across trunk and branches - keep
> specific files in sync while changing others independently
> 

You'll have to do this either by cherry-picking merges (not conducive to 
automatic merging) or by maintaining separate branches for "core" and 
"non-core" files. DVCS systems place more emphasis on being "versioned 
atomic trees" rather than SVNs "atomic changesets on a versioned 
filesystem".

I would move the project-specific files out into their own branches. The 
whole "folder full-o-branches" concept needs some love though - there 
are some plugins to manage build groups but they are relatively young.

> * Commits should go directly to the repository on the Toughdrive (as I
> think of the commit partly as a backup as well as a version-management
> system)
> 

I tend to use "bound" heavyweight checkouts in this role. The revision 
history is kept locally in repository local to the working tree (in the 
.bzr folder of the tree, or a parent folder with a shared repo), and 
also committed to the remote repo (in this case, a USB drive). If you 
lose your USB drive (or just leave it at home that day), all the 
revision data remains intact at the client machine, you can continue to 
make commits and sync later.


> * Two parallel central repositories.
> 

It's simple to push branches from one repository to another because of 
the underlying design ; just set a job to do it ; in the crontab or 
perhaps a job that occurs when the drive is mounted. Maintain two 
seperate branches ("home" and "nothome") for your .vim folder and merge 
changes between them (you need a working copy to do merges).


.... The above is actually "how it was". Since then, my organization has 
elected to prohibit writing files to unencrypted USB media, and enforced 
this with compulsory software. Now I use my laptop as my thumbdrive and 
run `bzr serve` when I need access to my branches from another machine. 
On my laptop I use lightweight (no repo) checkouts of my central repo ; 
on other machines I use heavy ones (with-repo). This continues the 
"distributed backup" theme and distributes my revisions to all the 
machines I access them on.


[1]  http://www.uwe-sieber.de/usbdlm_e.html



More information about the bazaar mailing list