You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Wheeler <da...@kineticode.com> on 2006/06/16 19:14:53 UTC

Feature Request: Consistent diff

Subversives,

On IRC, offby1 told me that this list is the best place to make  
feature requests. If that isn't right, please let me know and I'll  
move this request elsewhere.

But it's simple, really: I'd like the command-line diff interfaces to  
be consistent. That is, `svnlook diff` and `svn diff` should support  
exactly the same options that affect the diff command. I'm thinking of:

   --extensions (-x) "ARGS"
   --non-recursive (-N)
   --diff-cmd CMD
   --notice-ancestry
   --no-diff-deleted
   --no-diff-added

I think that all of these are supported by `svn diff` (except --no- 
diff-added—is that a documentation oversight?). It'd be great if  
svnlook diff accepted exactly the same options.

Thoughts?

Thanks!

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


Re: Feature Request: Consistent diff

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/16/06, David Wheeler <da...@kineticode.com> wrote:
> On Jun 16, 2006, at 12:38, Garrett Rooney wrote:
>
> > Honestly, if you have a way to find svnlook, it strikes me that you've
> > got something that can be abstracted to a function that lets you find
> > svn ;-)
>
> Yes, but it's a command-line option. I guess I could add it, anyway,
> but it does seem valuable to me, aside from that, to have the diff
> commands behave the same.
>
> > Ignore space is actually there, or at least there are a few space
> > related options in svn's diff in 1.4.x.
>
> Oh, nice. I see it in changes, but don't see a switch documented for
> it. Is there one, or will it just ignore whitespace?

It was recently pointed out that it's not actually documented
anywhere...  It uses the same command line options as GNU diff, so you
can use 'svn diff -x -w' to ignore whitespace, just like you can with
--diff-cmd set to GNU diff.

> > I don't know about minimal
> > (svn's internal diff is already reasonably minimal), but there's a bug
> > about implementing non-minimal diffs, since calculating diffs the
> > current way is often very slow.
>
> I think that --minimal just combines some other whitespace-oriented
> options, although I'm not sure.

We are now officially beyond my understanding of GNU diff's various options ;-)

-garrett

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

Re: Feature Request: Consistent diff

Posted by David Wheeler <da...@kineticode.com>.
On Jun 16, 2006, at 12:38, Garrett Rooney wrote:

> Honestly, if you have a way to find svnlook, it strikes me that you've
> got something that can be abstracted to a function that lets you find
> svn ;-)

Yes, but it's a command-line option. I guess I could add it, anyway,  
but it does seem valuable to me, aside from that, to have the diff  
commands behave the same.

> Ignore space is actually there, or at least there are a few space
> related options in svn's diff in 1.4.x.

Oh, nice. I see it in changes, but don't see a switch documented for  
it. Is there one, or will it just ignore whitespace?

> I don't know about minimal
> (svn's internal diff is already reasonably minimal), but there's a bug
> about implementing non-minimal diffs, since calculating diffs the
> current way is often very slow.

I think that --minimal just combines some other whitespace-oriented  
options, although I'm not sure.

Best,

David

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

Re: Feature Request: Consistent diff

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/16/06, David Wheeler <da...@kineticode.com> wrote:
> On Jun 16, 2006, at 12:19, Garrett Rooney wrote:
>
> > Why bother?  If you can run svnlook diff you can also run svn diff
> > with a file:// url to get the same effect.  If you want the options
> > that only exist in svn, use svn to get them.  I mean I'm not arguing
> > that consistency is bad, just that I don't see it as a real priority
> > in this case since it's perfectly possible to get the same behavior
> > right now with no extra work ;-)
>
> It's mostly for consistency. Also, I'm adding a --diff-options switch
> to SVN::Notify, which only uses svnlook, and I don't want to add code
> to determine the location of svn (even though it's likely to be the
> same). It does enough crazy shit as it is. :-)

Honestly, if you have a way to find svnlook, it strikes me that you've
got something that can be abstracted to a function that lets you find
svn ;-)

> But while I'm on about this, there is one GNU diff option I'd *love*
> to have in Subversion's diff support more than any other: --minimal.
> Or even --ignore-all-space would be useful. It'd make quite a few of
> my diffs a lot smaller.

Ignore space is actually there, or at least there are a few space
related options in svn's diff in 1.4.x.  I don't know about minimal
(svn's internal diff is already reasonably minimal), but there's a bug
about implementing non-minimal diffs, since calculating diffs the
current way is often very slow.

-garrett

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

Re: Feature Request: Consistent diff

Posted by David Wheeler <da...@kineticode.com>.
On Jun 16, 2006, at 12:19, Garrett Rooney wrote:

> Why bother?  If you can run svnlook diff you can also run svn diff
> with a file:// url to get the same effect.  If you want the options
> that only exist in svn, use svn to get them.  I mean I'm not arguing
> that consistency is bad, just that I don't see it as a real priority
> in this case since it's perfectly possible to get the same behavior
> right now with no extra work ;-)

It's mostly for consistency. Also, I'm adding a --diff-options switch  
to SVN::Notify, which only uses svnlook, and I don't want to add code  
to determine the location of svn (even though it's likely to be the  
same). It does enough crazy shit as it is. :-)

But while I'm on about this, there is one GNU diff option I'd *love*  
to have in Subversion's diff support more than any other: --minimal.  
Or even --ignore-all-space would be useful. It'd make quite a few of  
my diffs a lot smaller.

Thanks,

David

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

Re: Feature Request: Consistent diff

Posted by Martin Furter <mf...@rola.ch>.

On Fri, 16 Jun 2006, Garrett Rooney wrote:

> On 6/16/06, David Wheeler <da...@kineticode.com> wrote:
>> Subversives,
>> 
>> On IRC, offby1 told me that this list is the best place to make
>> feature requests. If that isn't right, please let me know and I'll
>> move this request elsewhere.
>> 
>> But it's simple, really: I'd like the command-line diff interfaces to
>> be consistent. That is, `svnlook diff` and `svn diff` should support
>> exactly the same options that affect the diff command. I'm thinking of:
>> 
>>    --extensions (-x) "ARGS"
>>    --non-recursive (-N)
>>    --diff-cmd CMD
>>    --notice-ancestry
>>    --no-diff-deleted
>>    --no-diff-added
>> 
>> I think that all of these are supported by `svn diff` (except --no-
>> diff-added—is that a documentation oversight?). It'd be great if
>> svnlook diff accepted exactly the same options.
>> 
>> Thoughts?
>
> Why bother?  If you can run svnlook diff you can also run svn diff
> with a file:// url to get the same effect.  If you want the options
> that only exist in svn, use svn to get them.  I mean I'm not arguing
> that consistency is bad, just that I don't see it as a real priority
> in this case since it's perfectly possible to get the same behavior
> right now with no extra work ;-)

'svn diff' has no --transaction option so i guess at least --diff-cmd and 
--extension would be useful.

Just my 2 cents.

Martin

Re: Feature Request: Consistent diff

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/16/06, David Wheeler <da...@kineticode.com> wrote:
> Subversives,
>
> On IRC, offby1 told me that this list is the best place to make
> feature requests. If that isn't right, please let me know and I'll
> move this request elsewhere.
>
> But it's simple, really: I'd like the command-line diff interfaces to
> be consistent. That is, `svnlook diff` and `svn diff` should support
> exactly the same options that affect the diff command. I'm thinking of:
>
>    --extensions (-x) "ARGS"
>    --non-recursive (-N)
>    --diff-cmd CMD
>    --notice-ancestry
>    --no-diff-deleted
>    --no-diff-added
>
> I think that all of these are supported by `svn diff` (except --no-
> diff-added—is that a documentation oversight?). It'd be great if
> svnlook diff accepted exactly the same options.
>
> Thoughts?

Why bother?  If you can run svnlook diff you can also run svn diff
with a file:// url to get the same effect.  If you want the options
that only exist in svn, use svn to get them.  I mean I'm not arguing
that consistency is bad, just that I don't see it as a real priority
in this case since it's perfectly possible to get the same behavior
right now with no extra work ;-)

-garrett

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