Need a way to set content-filtering rules across the project
We need a way to set content filtering rules in the tree.
I want to use content filtering to fix the line endings horror. Content filtering only works when a lot of preconditions are met, otherwise it fails silently (simply does not work WITHOUT reporting an error) even though it is configured in .bazaar/rules.
[This by itself is a serious bug in my eyes because it causes silent corruption of the repository (files containing a full delta because their line endings are incorrect). This is quite horrible and cannot really be seen by the developer - he just sees the files he's worked on being committed. Only a long time after this merge will the problem be seen, when another merge is attempted causing a full conflict.]
One of the preconditions to have content filtering work is to have "Working Tree Format 5", earlier versions do not support it (and do not fail but continue to work, committing garbage = files with incorrect line endings).
When you branch locally from a repository containing a "Working Tree Format 5" tree the resulting branch will be correct, and will have a version 5 tree also. This is correct.
However when branching from a smart server (which uses branches in a shared init-repo) you get the "default" working tree format 4, which is incapable of content filtering. This results in a working tree having incorrect line endings and corruption when files get commited having incorrect line endings.
A proper solution would be to use at least format 5 when the repository format itself is capable of content filtering. Or to be able to specify a minimal format in the server repository.
For now I have to resort to patching bazaar for all my developers, changing the default working tree format to 5 in bzrlib/
A final note:
In addition, it starts to become very important to be able to force some bazaar configuration into the tree somehow. The current solution for line endings depends on every developer having a properly configured workstation. Any failure to properly configure will cause problems in the repository which is shared by everyone, this is quite unacceptable. This does not ony go for line endings but also for things like required plugins (commit checkers and such).
It might be sufficient to have a version controlled ".bazaar-config" directory in the root of a tree containing the master rule file, and a list of required plugins and their version (not the plugins themselves). At this moment it is way, way easier to get things wrong than to get things right.
|Changed in bzr:|
|status:||New → Confirmed|
|importance:||Undecided → High|
- Default working tree format INCORRECT for content filtered branches made
- from smart server
+ Need a way to set content-filtering rules across the project
|Alexander Belchenko (bialix) wrote : Re: [Bug 395731] Re: Need a way to set content-filtering rules across the project||#3|
|Marius Kruger (amanica) wrote : Re: [Bug 395731] Re: Need a way to set content-filtering rules across the project||#4|
|Alexander Belchenko (bialix) wrote : Re: [Bug 395731] Re: Need a way to set content-filtering rules across the project||#10|
|Marius Kruger (amanica) wrote : Re: [Bug 395731] Re: Need a way to set content-filtering rules across the project||#11|