FEATURE REQ: Make alias for --diff-options

Jari Aalto jari.aalto at cante.net
Wed Sep 14 05:23:25 BST 2005


Martin Pool <martinpool at gmail.com> writes:

| On 13/09/05, John A Meinel <john at arbash-meinel.com> wrote:
| > >    $ bzr diff -o -bwu -C 5
| > >               |
| > >               extra options to diff follow
| On the other hand -o is pretty standard as --output.  Taking svn's -x
| could be good.

Options -x is good as any, just that it is short, since the extra
options (like -bw) are needed all the time to supply patches to
upstream.
 
| Another option is to make diff a special command where all unknown
| options are passed through to the underlying diff.  This can be done
| fairly easily by overriding Command.run_argv with a version that
| passes unknown arguments through to diff.  (Or perhaps better to
| change run_argv so subclasses can control what happens to unknown
| options?)
| 
| That would make diff's options different to other commands, but it's
| probably a reasonable tradeoff.

As noted previously, that would break the position independency:

   bzr diff -r RANGE --diff-options -A -B -C

=> This would be error if -r RANGE were interpreted as diff options.

   bzr diff --diff-options -A -B -C -r RANGE 

It all right to have to use

   bzr diff -r RANGE --diff-options "-A -B -C"
   bzr diff --diff-options "-A -B -C" -r RANGE 

this just wasn't documented in the manual.

| We should also allow you to set preferred diff options in
| ~/.bazaar/bazaar.ini.  (Is that name OK with everyone?)

If possible, use the extension *.conf for configuration files. I've so
accustomed to Linux and Cygwin and anything other that ends to *.conf
looks strange. Perhaps it's just me.

Jari






More information about the bazaar mailing list