[MERGE] Implement a --diff-command option for bzr diff.

Stephen Ward sward.dev at verizon.net
Wed Aug 29 10:45:24 BST 2007


On Monday 27 August 2007 12:18:17 pm Nicholas Allen wrote:
> I think it would be nice to have the option to run a diff command
> though. You can solve those problems by using a command pattern (eg
> %FROM, %TO would get substituted with the from and to file names).
>
> So you could do: diff --diff-command "beyondcompare.exe %TO %FROM"
>
> This would be more flexible than diff tools as this needs code for each
> kind of viewer (which is also nice). So I just think it would be great
> to have in built support for many diff viewers (like difftools does) as
> well as totally flexible commands like above.

The reason why difftools takes the code approach, and not just a command 
pattern (like extmerge) is that there are bigger differences than just the 
order of arguments.  Some tools (kompare, meld, kdiff3) work best if you give 
them the whole set of files at once, while others (vimdiff, tkdiff, mgdiff) 
prefer to be invoked once per file.  It all depends on whether the diff tool 
thinks *it* is in control.

I'm sure it *could* still be done with a command pattern, but it would have to 
be fancier than "%FROM %TO" (and correspondingly harder for users to 
understand/remember) if it really provided the flexibility required.

-- Steve



More information about the bazaar mailing list