How can I merge a Bazaar (bzr merge) that ignores spaces?

As our team and code base continues to grow, we see more and more cases where Bazaar insists on a conflict during a merge operation, but it’s really just a slight change in the space β€” which we would like to silently ignore .

bzr diff has the -diff-options options, but there seems to be no similar option for merging bzr.

Possible?

+7
source share
1 answer

You can write plugins for Bazaar that provide custom merge algorithms: http://doc.bazaar.canonical.com/development/en/user-guide/hooks.html#example-a-merge-plugin http: // doc. bazaar.canonical.com/development/en/user-reference/hooks-help.html#merge-file-content

I think the problem is that when you merge, this algorithm must choose one of the parties to accept. In addition, all changes to spaces may not be trivial, like spaces inside a quoted string. It would be very nice if you could somehow configure bzr to ignore the final space variables when merging (i.e., select the left parent when the only change is trailing spaces).

As I now understand not to allow checking in trailing whitespace using the bzr-textchecker plugin , at some point I'd like it to automatically remove trailing spaces.

Related questions:

+1
source

All Articles