Blog-o! Notes from latte.ca

Thu, 13 Mar 2008

On the Bazaar mailing list, Robert Collins wrote:

I’m happy to announce bzr-loom.

And I’m happy to use them!

My company uses vss for our version control, (I know. That should be “for our ‘version’ ‘control’”,) and we had recently announced a code freeze for an impending release. Thanks to bzr-loom, which I downloaded and installed on my birthday (the 5th), I could continue to push ahead with my work, and pop down and fix bugs in the frozen code when it became necessary, and never lose my history, and not have to deal with copying directories back and forth. Heck, by adding a thread for each proposed future VSS checkin, I even had a reasonable history in VSS when it came time to check everything in.

Thank you, Robert, for making my job far more bearable.

[Posted at 15:24 by Blake Winton] link
Wed, 15 Aug 2007

I’ve recently started using bzr as my go-to version control system, and as a newbie I’ve run into a couple of small things I’ld like changed. Fortunately, bzr is written in Python, and comes with an extensive set of unit tests, so it was easy for me to jump right in and add the feature I wanted. To be honest, I started off by writing it up as a bug report, with a trivial patch (by which I mean one without any tests). The comments on the bug led me to write up an actual mergable set of changes (which seems to be called a bundle by the bzr folks), and submit it for review. What followed was a few back-and-forths where various people pointed out things I hadn’t done correctly, or hadn’t really understood, and I fixed them. As a result, I think the code in the most recent bundle is pretty good, and is certainly far better than anything I would have produced on my own.

[Posted at 10:14 by Blake Winton] link
Mon, 30 Jul 2007

This started off as a reply to some email on the Bazaar-NG list, but it sort of grew and grew, until there were a whole bunch of things in it, and I thought it would probably be better as a weblog entry, so that I could find it later.

On to the email...
Martin Pool wrote:
> If you have sftp access to your server, then just do
> bzr init-repo sftp://user@host/~/myproject
> bzr push sftp://user@host/~/myproject/mybranch
> then on the second machine (eg at work)
> bzr init-repo ~/myproject
> cd myproject
> bzr branch sftp://user@host/~/myproject/mybranch

As a related question, if I wanted other people to be able to download my branch over http, would it suffice to do something on the server like

bzr init-repo ~/www/myproject
cd ~/www/myproject
bzr branch sftp://user@host/~/myproject/mybranch

or would I need to push straight to ~/www/myproject/mybranch?

I'm of two minds here, and I'ld like to explain why, in case it's a common problem. On the one hand, the repo I created by following the steps in the first part of Martin's message
> bzr init-repo sftp://user@host/~/myproject
> bzr push sftp://user@host/~/myproject/mybranch
should be just the same as any other repository, right?

But, on the other hand, when I ssh to "user@host", and look in ~/myproject, all I see is a .bzr directory. None of the files I allegedly pushed.

A search for 'bzr push "no content"' and 'bzr push missing files' turns up nothing that makes much sense to me. running 'bzr help push' finally shows me the following lines:
> The target branch will not have its working tree populated because
> this is both expensive, and is not supported on remote file systems.
which explains it at least a little. So I started looking for a way to push and update, which quickly led me to the push-and-update plugin, but I'm now lost as to how to install it into my copy of bzr (the binary distribution, running under Windows XP.) The plugins document that ships with bzr says "typically found in /usr/lib/python2.4/site-packages/bzrlib/plugins/", but I'm really fairly sure that's not where it's located on my box... another page says that it is "usually [...] C:\python2.4\site-packages\bzrlib\plugins under Windows", but again, that directory doesn't exist where I am.

Since I expect it'll make a difference to any answer I get, let me just say upfront that I've installed Bazaar (bzr) 0.18.0 into C:\Program Files\Bazaar\ using the Windows standalone installer. The output of "bzr version" is:
"""
Bazaar (bzr) 0.18.0
Using Python interpreter: C:\Program Files\Bazaar\bzr.exe
Using Python standard library: C:\Program Files\Bazaar\lib\library.zip
Using bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
Using Bazaar configuration: C:/Documents and Settings/blake/Application Data/bazaar/2.0
Using Bazaar log file: C:\Documents and Settings\blake\My Documents\.bzr.log

Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and you may use, modify and redistribute it under the terms of the GNU General Public License version 2 or later.
"""

So, where should I put the plugins in this case?

The answer, as given on irc, seems to be "put it somewhere else and set the BZR_PLUGIN_PATH env variable". Works for me, although it would have been nice if the Windows standalone installer did that for me, by creating a Plugins directory under the install directory. And as one final note, the BZR_PLUGIN_PATH, which it may contain spaces (i.e. "C:\Program Files\Bazaar\Plugins"), must not end in a trailing "\".

[Posted at 15:06 by Blake Winton] link