You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Olaf Hering <ol...@suse.de> on 2003/03/21 08:01:21 UTC
svn diff does not ignore whitespaces
Hi,
should this command ignore the white spaces? client has revision 5394
svn diff -x -pubBw -r 5411:5418
Index: subversion/tests/clients/cmdline/commit_tests.py
===================================================================
--- subversion/tests/clients/cmdline/commit_tests.py (revision 5411)
+++ subversion/tests/clients/cmdline/commit_tests.py (revision 5418)
@@ -1589,21 +1585,19 @@
# file4_path : Item(status='A ', repos_rev=2, wc_rev=0),
})
- if svntest.actions.run_and_verify_commit(wc_dir,
- expected_output,
- expected_status,
- None,
- None, None,
- None, None,
- '-N',
- os.path.join(wc_dir, file1_path),
- os.path.join(wc_dir, dir1_path),
- os.path.join(wc_dir, file2_path),
- os.path.join(wc_dir, file3_path),
- os.path.join(wc_dir, dir2_path),
- os.path.join(wc_dir, file4_path)):
- raise svntest.Failure
-
+ svntest.actions.run_and_verify_commit(wc_dir,
+ expected_output,
+ expected_status,
+ None,
+ None, None,
+ None, None,
+ '-N',
+ os.path.join(wc_dir, file1_path),
+ os.path.join(wc_dir, dir1_path),
+ os.path.join(wc_dir, file2_path),
+ os.path.join(wc_dir, file3_path),
+ os.path.join(wc_dir, dir2_path),
+ os.path.join(wc_dir, file4_path))
#----------------------------------------------------------------------
# Regression for #1017: ra_dav was allowing the deletion of out-of-date
Hmm, and looking closer to it, -p is also ignored. What RTFM do I need?
svn help diff
-x [--extensions] arg : pass ARG as bundled options to GNU diff
--
USB is for mice, FireWire is for men!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Branko Čibej <br...@xbc.nu>.
Olaf Hering wrote:
> On Fri, Mar 21, Robert Pluim wrote:
>
>
>
>>That is the way it used to work. -x now means "pass these flags to the
>>external diff if we're using it, otherwise ignore them". Perhaps svn
>>should complain in that situation.
>>
>>
>
>'it used to work' is certainly the wrong argument. What is supposed to
>happen, that matters. And if I specify -x then I want something from the
>external diff, like -p or -bBw as example.
>
>
No. You must specify an external diff program, either in the config file
or on the command line with --diff-cmd. The internal diff library
doesn't have any options as yet, but when it does, you'll pass them in
with -x.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Robert Pluim <rp...@bigfoot.com>.
Olaf Hering writes:
> On Fri, Mar 21, Robert Pluim wrote:
>
> > That is the way it used to work. -x now means "pass these flags to the
> > external diff if we're using it, otherwise ignore them". Perhaps svn
> > should complain in that situation.
>
> 'it used to work' is certainly the wrong argument.
I wasn't saying that changing it was the right thing to do, I was
merely supplying information.
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Olaf Hering <ol...@suse.de>.
On Fri, Mar 21, Robert Pluim wrote:
> That is the way it used to work. -x now means "pass these flags to the
> external diff if we're using it, otherwise ignore them". Perhaps svn
> should complain in that situation.
'it used to work' is certainly the wrong argument. What is supposed to
happen, that matters. And if I specify -x then I want something from the
external diff, like -p or -bBw as example.
--
USB is for mice, FireWire is for men!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Robert Pluim <rp...@bigfoot.com>.
Olaf Hering writes:
> On Fri, Mar 21, Robert Pluim wrote:
>
> > Olaf Hering writes:
> > > svn does ignore my ~/.subversion/config:
> > > [helpers]
> > > editor-cmd = vim -c 'set tw=72 et'
> > > diff_cmd = /home/olaf/bin/diff
> > > diff3_cmd = /home/olaf/bin/diff
> >
> > The name of the diff command option in config changed from 'diff_cmd'
> > to 'diff-cmd' at some point fairly recently (I'm assuming your
> > editor-cmd works).
>
> Yes, you are right.
>
> What I do not understand is, why does it not work like that:
>
> svn diff uses internal diff
> svn diff uses diff-cmd if specified in the config
>
> svn diff -x -p uses internal diff.
> Why? it should call 'diff' from the $PATH, I would assume that -x
> implies 'external', either from PATH or from config.
>
That is the way it used to work. -x now means "pass these flags to the
external diff if we're using it, otherwise ignore them". Perhaps svn
should complain in that situation.
> An odd thing:
> svn diff -x -puBbw --diff-cmd true -r 5411:5418 subversion/tests/clients/cmdline/commit_tests.py
> Index: subversion/tests/clients/cmdline/commit_tests.py
> ===================================================================
> svn: Error calling external program
> svn: 'true' returned 255
>
I think this is because svn is not looking in the PATH for the
--diff-cmd. I'm not entirely sure that it should, anyway.
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Olaf Hering <ol...@suse.de>.
On Fri, Mar 21, Robert Pluim wrote:
> Olaf Hering writes:
> > svn does ignore my ~/.subversion/config:
> > [helpers]
> > editor-cmd = vim -c 'set tw=72 et'
> > diff_cmd = /home/olaf/bin/diff
> > diff3_cmd = /home/olaf/bin/diff
>
> The name of the diff command option in config changed from 'diff_cmd'
> to 'diff-cmd' at some point fairly recently (I'm assuming your
> editor-cmd works).
Yes, you are right.
What I do not understand is, why does it not work like that:
svn diff uses internal diff
svn diff uses diff-cmd if specified in the config
svn diff -x -p uses internal diff.
Why? it should call 'diff' from the $PATH, I would assume that -x
implies 'external', either from PATH or from config.
An odd thing:
svn diff -x -puBbw --diff-cmd true -r 5411:5418 subversion/tests/clients/cmdline/commit_tests.py
Index: subversion/tests/clients/cmdline/commit_tests.py
===================================================================
svn: Error calling external program
svn: 'true' returned 255
true -puBbw -L 'subversion/tests/clients/cmdline/commit_tests.py (revision 5411)' -L 'subversion/tests/clients/cmdline/commit_tests.py (revision 5418)' tmp tmp.2 ; echo $?
0
Is there a reason why -x does require --diff-cmd if no diff-cmd is
specified in the config file? I would call that a bug.
Gruss Olaf
--
USB is for mice, FireWire is for men!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Robert Pluim <rp...@bigfoot.com>.
Olaf Hering writes:
> svn does ignore my ~/.subversion/config:
> [helpers]
> editor-cmd = vim -c 'set tw=72 et'
> diff_cmd = /home/olaf/bin/diff
> diff3_cmd = /home/olaf/bin/diff
The name of the diff command option in config changed from 'diff_cmd'
to 'diff-cmd' at some point fairly recently (I'm assuming your
editor-cmd works).
Robert
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Olaf Hering <ol...@suse.de>.
On Fri, Mar 21, Olaf Hering wrote:
> On Fri, Mar 21, Rafael Garcia-Suarez wrote:
>
> > Olaf Hering wrote:
> > >
> > > should this command ignore the white spaces? client has revision 5394
> > >
> > > svn diff -x -pubBw -r 5411:5418
> >
> > Hmm, if you don't use an external diff command (to be set in
> > Subversion's config file or via --diff-cmd) apparently -x is ignored.
>
> It does ignore the config:
> cat ~/bin/diff
> #!/bin/bash
> echo $0 $* > /tmp/foo.$$
> olaf@smirnow:~/subversion/subversion> l /tmp/foo*
> -rw-r--r-- 2 root root 12802 2003-03-19 23:41 /tmp/foo
svn does ignore my ~/.subversion/config:
[helpers]
editor-cmd = vim -c 'set tw=72 et'
diff_cmd = /home/olaf/bin/diff
diff3_cmd = /home/olaf/bin/diff
but --diff-cmd ~/bin/diff works.
--
USB is for mice, FireWire is for men!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Olaf Hering <ol...@suse.de>.
On Fri, Mar 21, Rafael Garcia-Suarez wrote:
> Olaf Hering wrote:
> >
> > should this command ignore the white spaces? client has revision 5394
> >
> > svn diff -x -pubBw -r 5411:5418
>
> Hmm, if you don't use an external diff command (to be set in
> Subversion's config file or via --diff-cmd) apparently -x is ignored.
It does ignore the config:
cat ~/bin/diff
#!/bin/bash
echo $0 $* > /tmp/foo.$$
olaf@smirnow:~/subversion/subversion> l /tmp/foo*
-rw-r--r-- 2 root root 12802 2003-03-19 23:41 /tmp/foo
--
USB is for mice, FireWire is for men!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn diff does not ignore whitespaces
Posted by Sander Striker <st...@apache.org>.
> From: Rafael Garcia-Suarez [mailto:raphel.garcia-suarez@hexaflux.com]
> Sent: Friday, March 21, 2003 9:23 AM
> Olaf Hering wrote:
>>
>> should this command ignore the white spaces? client has revision 5394
>>
>> svn diff -x -pubBw -r 5411:5418
>
> Hmm, if you don't use an external diff command (to be set in
> Subversion's config file or via --diff-cmd) apparently -x is ignored.
>
> I think that's a doc issue.
It is.
> I don't see the usefulness of -x when the internal diff is used.
I do. We might add stuff to the diff code to handle flags. Passing those
with -x would be great, because we don't want to clog up the top level
namespace with diff options.
>> svn help diff
>> -x [--extensions] arg : pass ARG as bundled options to GNU diff
>
> Shouldn't this be "external diff" instead of "GNU diff" ?
Yes.
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn diff does not ignore whitespaces
Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
Olaf Hering wrote:
>
> should this command ignore the white spaces? client has revision 5394
>
> svn diff -x -pubBw -r 5411:5418
Hmm, if you don't use an external diff command (to be set in
Subversion's config file or via --diff-cmd) apparently -x is ignored.
I think that's a doc issue. I don't see the usefulness of -x when
the internal diff is used.
> svn help diff
> -x [--extensions] arg : pass ARG as bundled options to GNU diff
Shouldn't this be "external diff" instead of "GNU diff" ?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org