Difftools plugin alternative

Bastian B bastian.dev at googlemail.com
Thu Sep 8 14:50:28 UTC 2011


Hi,

I would like to know if I can or should integrate my new bazaar
feature directly in bazaar or if I should make it available as a
separate plugin.

I really like to have the functionality provided by the
https://code.launchpad.net/bzr-difftools plugin to do a recursive
directory diff and see more complex changes in kdiff. Unfortunately it
has some annoying bugs and isn't well integrated into bazaar. After
I've spend some time fixing bugs I decided to try a different
approach.

What I came up with is a diff-format that doesn't really format the
code but copies the differing files to temporary folder and then
starts the external diff tool (at the moment kdiff is hard coded and
has to be in the path). So one would have to call
bzr diff -r 1..2 --format=recursdiff

At the moment I've implemented that as a separate plugin that
registers the diff format. This has the benefit that I have all diff
command's options and features available and don't have to worry about
a lot of bazaar internas. But there are some problems, for which I
hope you can give me some advise to solve them:
* The implementation is at the moment tightly coupled to bzrlib's
diff.DiffFromTool and diff.DiffTree implementation as it subclasses
them and uses some private methods. That way I avoid to copy code from
the classes mentioned as I need a similar behavior.
* At the moment I can't supply the --using parameter as it's mutally
exclusive to --format. So I have no way to specify the difftool.
* Would it be helpful to have the the external merge tool management
module (bzr repo Revision 5632
revid:pqm at pqm.ubuntu.com-20110125135932-0o8d07i3j1flp6ou) apply for
diff --using and my --format=recursdiff? What is that module used for
at all?

If you're curious to see my plugin you can see the code here
http://bazaar.launchpad.net/~baztian/+junk/bzr-recursdiff/files or do
a bzr branch lp:~baztian/+junk/bzr-recursdiff

Regards

Bastian



More information about the bazaar mailing list