Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]'

subversion
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]'

Author philip
Full name Philip Martin
Date 2009-12-03 03:56:44 PST
Message Julian Foad <julian.foad@wand​isco.com> writes:

> Philip Martin wrote:
>> It's possible to compare branches in the repository using
>>
>> $ svn diff ^/repo/branches/foo ^/repo/branches/bar
>>
>> but that only works if the current directory is a working copy because
>> libsvn_client/cmdlin​e.c:svn_client_args_​to_target_array converts
>> relative URLs to full URLs using the hardcoded path "". Since I
>> regularly have my current working directory outside a working copy
>> this is inconvenient.
>>
>> I'd like to be able to do
>>
>> $ svn diff ^/repo/branches/foo ^/repo/branches/bar path/to/wc
>>
>> and it turns out to be quite simple from a code point of view. It is,
>> of course, an extension to our rather complex diff UI. What do people
>> think?
>
> What does your example command line mean? I assume you mean path/to/wc
> is used just to identify the repository, and does not additionally
> specify something like which path within the branches you want diffed.

Yes.

> (Compare the diff syntax 2, where paths within the primary pair of
> targets can be specified at the end.)
>
> -1 to exactly as formulated here. It looks far too much like a
> (syntax-2) command for specifying sub-paths.
>
> We could consider instead something like
>
> $ svn diff ^/repo/branches/foo ^/repo/branches/bar --repos=[URL|WC]

But that's much harder to type. Also the new syntax is consistent
with most of the other commands that use '.' as a default, if one
doesn't want to use '.' one specifies the path explicitly:

$ svn log -qr880555
svn: '.' is not a working copy
$ svn log -qr880555
--------------------​--------------------​--------------------​------------
r880555 | neels | 2009-11-12 16:25:11 +0000 (Thu, 12 Nov 2009)
--------------------​--------------------​--------------------​------------

Why should diff not work the same way? Currently I get

$ svn diff ^/subversion/tags/1.5.x ^/subversion/tags/1.6.x
svn: '.' is not a working copy

When I got that error message it seemed obvious to me that I should
add a working copy path, I was surprised when it didn't work.

--
Philip

« Previous message in topic | 3 of 12 | Next message in topic »

Messages

Show all messages in topic

[PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip Philip Martin 2009-12-03 03:00:57 PST
     Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-12-03 03:39:11 PST
         Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip Philip Martin 2009-12-03 03:56:44 PST
             Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip2 Philip Martin 2009-12-03 03:57:55 PST
             RE: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' rhuijben Bert Huijben 2009-12-03 04:37:26 PST
                 Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip Philip Martin 2009-12-03 04:56:47 PST
                 RE: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' Julian Foad <julian dot foad at wandisco dot com> Julian Foad <julian dot foad at wandisco dot com> 2009-12-03 05:04:55 PST
                     Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip Philip Martin 2009-12-03 05:20:52 PST
                         Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' julianfoad Julian Foad 2009-12-03 05:37:35 PST
                             Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' philip Philip Martin 2009-12-03 06:00:54 PST
     Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' cmpilato C. Michael Pilato 2009-12-03 07:01:47 PST
         Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL [WC]' cmpilato C. Michael Pilato 2009-12-03 07:06:53 PST
Messages per page: