[MERGE] Implement a --diff-command option for bzr diff.
Matthieu Moy
Matthieu.Moy at imag.fr
Wed Aug 29 09:09:37 BST 2007
Aaron Bentley <aaron.bentley at utoronto.ca> writes:
> If you're going to introduce external_diff_command, you should
> deprecate external_diff_options. We don't need both.
It doesn't fit with the way I implemented it: my version doesn't parse
external_diff_command, so, you can't do --diff-command "diff -u" for
example (it will look for a "diff -u" executable). That's fixable, of
course, I can just add a split somewhere to take care of this.
But deprecating external_diff_options would actually lose some
functionalities: if you do "bzr diff --diff-options -b", bzr will add
the correct -L, -u options for you, because it knows the executable is
diff, and it accepts them.
With a single --unsing or --diff-command, either you remove this
(might be acceptable, but I think some people use it and rely on it),
or you hardcode it if the first word of the command is "diff". But I
really don't like this kind of hardcoding.
So, at the moment, I don't see a better option than keeping both.
> I also like --using better than --diff-command.
_If_ we deprecate --diff-options, then I agree with you. If
--diff-option is kept, the natural complement for it is
--diff-command. I find
bzr diff --diff-command wdiff --diff-options -a
much clearer than
bzr diff --using wdiff --diff-options -a
--
Matthieu
More information about the bazaar
mailing list