Need a way to set content-filtering rules across the project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Triaged
|
High
|
Unassigned |
Bug Description
We need a way to set content filtering rules in the tree.
----
Context:
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.]
Problem:
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.
Solution:
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.
tags: | added: content-filtering |
tags: | added: config |
tags: | removed: config |
tags: | added: check-for-breezy |
tags: |
added: views removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → High |
I agree, this is quite a problem.
The issue of wt format is bug 414305.
So I'm going to dedicate this bug just to the need for versioned rules.