Working Tree Format and EOL conversion
Frits Jalvingh
jal at etc.to
Fri Aug 7 07:28:56 BST 2009
Hello,
> The user's guide mentions that content filtering only works if you are using
> "Working tree format 5" or later. "bzr info -v" confirms that I am actually
> using "Working tree format 4". Can I upgrade this format to 5? How do I
> get content filtering working on this branch?
We recently (bzr 1.16.1 timeframe) changed all of our repositories to use
content filtering and went to 1.14-rich-root format from --rich-root-pack,
and our experience was less than stellar - we still have lots of problems.
The working tree format is one of them; if you make new branches a lot you
need to take care that Bazaar creates the proper working tree format in the
new branch or you'll end up with the default (# 4) which does not support
content filtering and doesn't warn you about that. This happened 100% of the
time if you branch off --no-tree base repositories; it only works
properly /by default/ if you branch off a version that has the proper working
tree format to start with.
The net effect can be that you branch, expect bazaar to fix line endings and
stuff in the new branch, only to discover that content filtering has not
worked and you commited lots of fully-changed files with the wrong line
endings, making merges almost impossible.
We ended up writing a small bzr plugin that changed the "default working tree
format" to 5 always, so at least you would not be caught unaware with a
branch having all botched commits.
Also, please be aware that when we did this "bzr upgrade" it updated the
working tree format *but it did not rewrite the working tree*. So when
converting the repository we needed to upgrade a branch and then branch that
upgraded branch /again/ to get the proper line endings in the working tree.
It might be that 1.17 fixed that, I don't know.
We also have a huge performance problem with later bazaar versions, some of
those problems seem partially related to the content filtering
implementation; for instance branching now easily takes 4 minutes where it
took 7 seconds with bzr 1.14.1; it looks like this has something to do with a
different way of building a working tree in newer versions (directly from the
repo instead of copying it).
We have a reasonably big repository so it might not be a problem for you; but
expecially if you also upgrade bzr to 1.16 or higher I would advice you to:
- do a lot of testing on a production-size repository(!)
- Explicitly test the speed of push and pull
- Explicitly test the performance of branch (we use that a lot)
- Explicitly test the performance of merge commits.
Good luck,
Frits
More information about the bazaar
mailing list