[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Parameters to 'diff'

From: Michael Maxwell <mmaxwell_at_casl.umd.edu>
Date: Tue, 8 Jul 2008 12:42:39 -0400

John Peacock wrote:
> The issue is that the commandline option --diff-cmd is
> documented as being only the executable, so the config file
> option is only the executable (since it shares the same code
> path).

Well, you're right that you can specify a command-line parameter for the editor in the '--editor-cmd' parameter, but you can't specify a command-line parameter for diff in the '--diff-cmd' parameter. This is parallel to the way the config file works. However, this is IMO *not* clearly documented for the command line (although it is clearly documented in the config file). For 'commit' (from 'svn help commit'):
   --editor-cmd arg : use ARG as external editor
And for 'diff':
   --diff-cmd arg : use ARG as diff command
If anything, I would have guessed from these descriptions that the behavior was the opposite, that is I would have guessed that '--editor-cmd' would not allow passing of parameters, while '--diff-cmd' would. But I suppose that's just a minor documentation issue.

If it's considered important to retain the present working of command-line parameters and config files, so as not to break existing installations, I respect that (even though I'd much prefer that it be changed, because the non-parallelism between the editor and the 'diff' command is IMO confusing and inelegant). In which case I would say, add another variable in the config file, call it 'diff-parameters', which would be parallel to the -x command line parameter.

Also, I strongly agree with Paul Koning's email:
> but svn supplies its own switches in addition to what -x calls for,
> and depending on the diff you're invoking that may cause trouble
It's actually even worse than that: '-u' is not only allowed after the '-x' parameter, it's also the default. Which means that it's not only useless as a parameter, there's no way to turn it off!

So, as Paul says:
> There should be a way to say "pass these switches AND NO OTHERS".
and there should be a way to pass no switches at all, i.e.
   -x ''
should *not* pass the -u parameter.

   Mike Maxwell

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-08 18:43:03 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.