Fixing mixed line endings in multiple branches
Frits Jalvingh
jal at etc.to
Sat Feb 28 00:41:56 GMT 2009
Hello all,
I have a set of related repositories used to maintain several versions of the
same product. I have the repositories:
prod-1.0
prod-1.1
prod-1.2
prod-trunk
When a released version has an error we fix it, then merge the fix upwards to
the trunk. So when 1.1 has a problem we fix it, then merge 1.1 INTO 1.2, then
1.2 INTO trunk. No problems so far, and very happy developers when more
versions are maintained.
But my repositories have obtained a problem: lots of files have incorrect line
endings (some files even have both crlf and lf-only endings in the same
file). And I need to fix this to have everything use a single line ending
(lf-only).
However, fixing those files, starting at prod-1.0, means all files fixed are
changed fully, i.e. every single line is changed. After committing this
merges upward are of course very problematic: it causes conflicts on every
changed file because they "overwrite" earlier delta's in the higher branches.
Each "conflict" is the full "old" file from the higher branch against the
full "new" file from the fixed lower branch. This makes the merge impossible.
Is there any way that I can tell Bazaar to ignore line endings in some way? Is
there another way to fix the files without having all merges upwards blocked?
As an alternative I'm having the idea to do the following:
- fix prod-1.0 and commit
- do the merge upward, to prod-1.1
- revert all FILE CHANGES (not the merge itself) by "bzr revert ."
- Commit this on the prod-1.1. This only records the merge so it is not
retried.
- Now fix prod-1.1 manually like the 1.0 branch.
- Commit, merge upward to 1.2 enz (lather, rinse, repeat)
Would this method work? Would merges upwards still be possible after this?
Would I get problems when bazaar uses a "base revision" when it diffs
subsequent changes?
Thanks for your time,
Frits Jalvingh
More information about the bazaar
mailing list