Martin Albisetti's blog

20Jun/0812

Upload your websites with bzr-upload

I was lucky enough to be able to attend the Bazaar Sprint back in March, mostly thanks to Canonical sponsoring my entire trip across the globe 🙂
The sprint was interesting in all sorts of ways, and it got me working on several projects (some of which I'll talk about in future posts), but there was one in particular that amazed me how fast it was put together. Bzr-upload.
It all started one night, while sitting across the table from Vincent Ladeuil, the guy who basically wrote transports in Bazaar, and I started complaining about how I had to work around bazaar to make it fit into my daily work flow (doing web development).
The problem was simple: bzr doesn't update the working tree (the actual files) remotely, so there was no simple way for me to upload the websites I worked on a daily basis.

Long story short, Vincent asked some questions, sat down, wrote tests, wrote code to work with those tests (TDD, FTW), and after some fiddling, we can now upload websites (and anything else, actually) using bzr's knowledge of what we've changed, and it's solid transport libraries (ftp, sftp).

So... how does this work? Simple.
Assuming you already have bzr installed, fire up a terminal and do:
bzr checkout lp:bzr-upload ~/.bazaar/plugins/upload

Now that we have the plugin installed, go to the branch containing your website, and with a simple:
beuno@beuno-laptop:/mywebsite$ bzr upload sftp://beuno@host/path/to/http
No uploaded revision id found, switching to full upload
Uploading bar
Uploading foo

Done!

Did more work?

beuno@beuno-laptop:/mywebsite$ bzr ci -m'Random bug fix'
Committing to: /mywebsite/
modified foo
Committed revision 2.
beuno@beuno-laptop:/mywebsite$ bzr upload
Using saved location: sftp://beuno@host/path/to/http
Uploading foo

That's it!

bzr-upload will remember the last revision you uploaded, and make sure it only sends what you've changed.

Project's page: https://launchpad.net/bzr-upload

Comments, feedback, patches, etc are very welcome.

Tagged as: 12 Comments
19Jun/087

MySQL migrates to Bazaar!

This just in, MySQL has migrated from BitKeeper to Bazaar. They also seem to be using Launchpad quite extensively, and have already updated their installation from source instructions.
Not only is it a big user base for Bazaar, but yet another move from Closed Source to Open Source software.

Congratulations to all the Canonical folks to helped with the move (I hear John and Elliot had a lot to do with it in particular), and welcome MySQLers 🙂

Tagged as: 7 Comments
17Jun/080

I… thir… er… me too.

+1 to Robert's suggestion.
Maybe make that optional? "email me my own comments and bug reports"

Tagged as: No Comments