Muffinresearch Labs by Stuart Colville

Bazaar: Moving files after the fact | Comments (3)

Posted in Code on 29th January 2009, 9:18 am by Stuart

I recently came across a useful flag that can be use with Bazaar’s move command. --after can be used to update bazaar’s internal reference to the file after you’ve already moved the file.

The syntax is as follows:

$ mv  foo bar # Doh should have used bzr mv
$ bzr mv --after foo bar
renamed foo => bar

Moving files without telling bazaar will just simply remove them from their original location and require you to re-add them. The point of using bzr mv is that it tracks renames. The has a huge benefit when merging as Bazaar knows that the file that was formerly “foo” is now called “bar”. Any changes to “foo” will be correctly applied to “bar”.

Post Tools

Comments: Add yours

1. On January 29th, 2009 at 5:32 pm Karl Fogel said:

You know, though… I wonder if the –after flag is even necessary? Is there any reason plain ‘bzr mv’ can’t just Do The Right Thing if it detects that the file has already been moved?

In cases where the content of bar is the same as the recorded versioned content for foo, it’s trivial. But even when bar differs, it’s usually going to be recognizably similar. And bzr could simply error (and recommend –after or –force or something) if the relationship is not automatically detectable.

2. On January 29th, 2009 at 10:38 pm Stuart Colville said:

@Karl: Technically I can’t see why not. But, on a practical level I think keeping things like this as explicit is better than requiring an interface to resolve ambiguity.

3. On January 25th, 2010 at 1:24 pm Sina Salek said:

It’s possible and actually not very difficult. they may implement it in future versions. you might want to fill a feature request ;)







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.600s.