You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2003/03/27 22:00:42 UTC

Re: [Issue 1211] New - svn diff -x doesn't seem to do anything.

issues@subversion.tigris.org wrote:

>+It doesn't appear that the -w options is passed to diff as the
>+ documentation suggests.
>

ok, this is like the 5th time someone has reported this "bug".

would anyone object to me adding code to check if -x is used with the 
built in diff lib so we can error out in that case?  i mean we can't 
possibly do what the user is expecting since we don't handle diff 
options yet, and silently ignoring them seems to be causing a lot of 
confusion.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Thursday, March 27, 2003, at 07:47 PM, Julian Foad wrote:

> Absolutely.  I was taking a look at this too, but as I'm not familiar 
> with the code it is taking me a while.  The attached patch gives an 
> appropriate error message in the case of a local diff (no network 
> access).  I haven't followed through the cases where net access is 
> used, but I am posting this unfinished work now because you may find 
> the other parts of the patch enlightening.
>
> I would be glad to leave this to you (Garrett - or anyone really).
>
> A possible further enhancement could be to silently ignore "-u" 
> because it behaves this way (unified diff) by default.

I've already got a slightly different approach to this mostly done, it 
adds an options parameter to svn_diff_file, and currently returns error 
for any options at all.  i'll see about having it ignore a -u as you 
suggest, as it would be
kind of confusing to a user to have an error in that case.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by Julian Foad <ju...@btopenworld.com>.
Robert Pluim wrote:
> Garrett Rooney writes:
>  > issues@subversion.tigris.org wrote:
>  > 
>  > >+It doesn't appear that the -w options is passed to diff as the
>  > >+ documentation suggests.
>  > >
>  > 
>  > ok, this is like the 5th time someone has reported this "bug".
>  > 
>  > would anyone object to me adding code to check if -x is used with the 
>  > built in diff lib so we can error out in that case?  i mean we can't 
>  > possibly do what the user is expecting since we don't handle diff 
>  > options yet, and silently ignoring them seems to be causing a lot of 
>  > confusion.
> 
> Sounds good to me (it's on my TODO list, right at the bottom ;-)

Absolutely.  I was taking a look at this too, but as I'm not familiar 
with the code it is taking me a while.  The attached patch gives an 
appropriate error message in the case of a local diff (no network 
access).  I haven't followed through the cases where net access is used, 
but I am posting this unfinished work now because you may find the other 
parts of the patch enlightening.

I would be glad to leave this to you (Garrett - or anyone really).

A possible further enhancement could be to silently ignore "-u" because 
it behaves this way (unified diff) by default.

- Julian



Introduce some error handling for when an attempt is made to pass options to
the internal diff.  This unfinished patch only addresses local diffs.

* subversion/libsvn_client/diff.c:
   Display an error message if any arguments are passed to the internal diff
   for local files, because it does not yet recognise any arguments and it
   is confusing when it silently ignores them.

* subversion/clients/cmdline/main.c:
   In the help for "-x", specify the effective default value and don't 
mention
   "GNU" because the option applies to any version of "diff".  Just say 
"diff",
   expecting that this will apply to internal as well as external diff 
in future.
   Display any specific error message (as well as a usage message) where
   previously in the case of an argument-parsing error it would only 
display a
   usage message.


Re: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by Robert Pluim <rp...@bigfoot.com>.
Garrett Rooney writes:
 > issues@subversion.tigris.org wrote:
 > 
 > >+It doesn't appear that the -w options is passed to diff as the
 > >+ documentation suggests.
 > >
 > 
 > ok, this is like the 5th time someone has reported this "bug".
 > 
 > would anyone object to me adding code to check if -x is used with the 
 > built in diff lib so we can error out in that case?  i mean we can't 
 > possibly do what the user is expecting since we don't handle diff 
 > options yet, and silently ignoring them seems to be causing a lot of 
 > confusion.

Sounds good to me (it's on my TODO list, right at the bottom ;-)

-- 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by Sander Striker <st...@apache.org>.
> From: Branko Cibej [mailto:brane@xbc.nu]
> Sent: Friday, March 28, 2003 4:24 PM

> mbk@boredom.org wrote:
>> I think the internal diff lib should have an option parser, and
>> should reject options that it doesn't support.  At first, it can
>> reject all of them. :-)
> 
> Exactly. Except -u, which it does support by default. :-)

No, it can't.  svn_diff_file (will namespace protect RSN(tm)) AND
svn_diff_file_output_unified (errr, this would need to become
wrapped in svn_diff_file_output or something) would BOTH need the
options.  Not very nice.

For now, please punt and put the fix at the calling point.  I promise
to sort this out in a more elegant way a bit later on.

Thanks,

Sander


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by Branko Čibej <br...@xbc.nu>.
mbk@boredom.org wrote:

>On Thu, Mar 27, 2003 at 05:00:42PM -0500, Garrett Rooney wrote:
>  
>
>>issues@subversion.tigris.org wrote:
>>
>>    
>>
>>>+It doesn't appear that the -w options is passed to diff as the
>>>+ documentation suggests.
>>>
>>>      
>>>
>>ok, this is like the 5th time someone has reported this "bug".
>>
>>would anyone object to me adding code to check if -x is used with the 
>>built in diff lib so we can error out in that case?  i mean we can't 
>>possibly do what the user is expecting since we don't handle diff 
>>options yet, and silently ignoring them seems to be causing a lot of 
>>confusion.
>>
>>    
>>
>
>I think the internal diff lib should have an option parser, and
>should reject options that it doesn't support.  At first, it can
>reject all of them. :-)
>  
>

Exactly. Except -u, which it does support by default. :-)

-- 
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: [Issue 1211] New - svn diff -x doesn't seem to do anything.

Posted by mb...@boredom.org.
On Thu, Mar 27, 2003 at 05:00:42PM -0500, Garrett Rooney wrote:
> issues@subversion.tigris.org wrote:
> 
> >+It doesn't appear that the -w options is passed to diff as the
> >+ documentation suggests.
> >
> 
> ok, this is like the 5th time someone has reported this "bug".
> 
> would anyone object to me adding code to check if -x is used with the 
> built in diff lib so we can error out in that case?  i mean we can't 
> possibly do what the user is expecting since we don't handle diff 
> options yet, and silently ignoring them seems to be causing a lot of 
> confusion.
> 

I think the internal diff lib should have an option parser, and
should reject options that it doesn't support.  At first, it can
reject all of them. :-)

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org