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

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

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 03 Dec 2009 13:04:50 +0000

On Thu, 2009-12-03 at 13:37 +0100, Bert Huijben wrote:
> > -----Original Message-----
> > From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> > Sent: donderdag 3 december 2009 12:56
> > To: Julian Foad
> > Cc: dev_at_subversion.tigris.org
> > Subject: Re: [PATCH] Extend 'svn diff URL URL' to 'svn diff URL URL
> > [WC]'
> >
> > Julian Foad <julian.foad_at_wandisco.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/cmdline.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.

Yup. :-) But not if you configure it somewhere so you don't have to type
it.

> 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:

No, hardly any commands take a WC argument which they only use to
identify the repository. They nearly all focus their behaviour onto the
particular path you specify.

> ^/ is always processed from the current working directory and not from any
> passed command.

"^/" is interpreted as relative to the repository specified by (all)
non-URL arguments, if any, and defaults to the current working directory
if there are no such arguments.

- Julian

> It is a svn feature, not an API feature. The passed local paths never change
> the behavior of ^/, as ^/ is processed before the arguments are used by the
> API.
> (Note that ^/ is also used in externals since 1.5, but that doesn't share
> any of the implementation with the svn featrue)
>
>
> In my eyes, adding another argument specifically for 'svn diff' is making it
> inconsistent, not consistent.
>
> Adding a --repos, --origin, --base argument for all svn commands would make
> this feature available for all commands while we would have to update all
> other commands to handle it as 'just an extra argument'
>
> Bert
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2426681
>
> Please start new threads on the <dev_at_subversion.apache.org> mailing list.
> To subscribe to the new list, send an empty e-mail to <dev-subscribe_at_subversion.apache.org>.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2426693

Please start new threads on the <dev_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <dev-subscribe_at_subversion.apache.org>.
Received on 2009-12-03 14:05:11 CET

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

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