Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Sometimes, things don't work correctly. And it's not always a problem with Bazaar! This document aims to provide help with various problems and error messages you may encounter.

Error Messages

"bzr: ERROR: Knit header error: '\n' unexpected"

I started a new project in bzr. I created a new branch, pushed it over SFTP to my webserver, then tried to branch over HTTP, only to get an error message: "bzr: ERROR: Knit header error: '\n' unexpected".

The first thing to check is the bzr log file, which can be found at ~/.bzr.log. You can delete the file, and run the command which fails to get a clean logfile which only contains the trace for the failing command.

The second thing to check is that your webserver is not doing anything funky with the handler for files that it does not recognize. In this example, the web server is incorrectly trying to parse some of the files before serving them, so bzr doens't see the complete file. In my case, adding a

directive to .htaccess on the web server fixed everything and branching over HTTP started working.

bzr: ERROR: [Errno 66] Directory not empty

The HFS+ filesystem on mac is case preserving by default, not fully case-sensitive. This can cause problems when two files are versioned, but the only difference in their names is capitalization.

It is possible for someone (using a case-sensitive filesystem) to run "bzr add foo" when Foo is already versioned. As "foo" is reported as a valid file bzr tries to version this also. The problem occurs when an HFS+ user tries to update as the file-system can't tell the difference between the foo + Foo as it treats them the same.

This produces the following error when running "bzr update": bzr: ERROR: [Errno 66] Directory not empty

The simplest fix is to uncommit the last change. This has been filed as a bug, and more information can be found here: https://bugs.launchpad.net/bzr/+bug/120542

Strange behaviour

Bazaar appears to hang when running "bzr break-lock" inside a Cygwin terminal

If you try to break locks using the native Windows version of Bazaar inside of some Cygwin terminals you may notice that Bazaar appears to hang. In fact, Bazaar has not hung but is prompting you whether or not you really want to remove the lock. The problem is that this prompt is not seen until after you enter a response! So it looks as though Bazaar has just hung.

This is not actually a bug in Bazaar but a bug in Python. It does not handle all terminal output correctly and is not flushing the output to the terminal.

If you run Bazaar from a DOS prompt in order to break the locks it will work. For more information see the following bug report