You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Blair Zajac <bl...@orcaware.com> on 2007/08/22 18:24:43 UTC

1.5 svn:externals and command line parsing

The new svn:externals allows externals like this, with a space between -r and 
the revision:

-r 23000 http://svn.collab.net/repos/svn/trunk trunk-23000

or without the space

-r24000 http://svn.collab.net/repos/svn/trunk trunk-24000

This matches the functionality of the old externals parsing code where the space 
is optional.

When trying to set a property using this on the command line, you get an error:

$ svn ps svn:externals '-r24000 http://svn.collab.net/repos/svn/trunk trunk' .
subversion/svn/main.c:1147: (apr_err=205000)
svn: Syntax error in revision argument '24000 
http://svn.collab.net/repos/svn/trunk svn-trunk'

While most of the time I use svn pe to set these, having a format for an 
external you cannot use via svn ps seems to be broken.

While we're on this subject, the change to support both:

URL DIR (svn <= 1.4)

and

DIR URL (svn >= 1.5 with peg revisions)

never really appealed to me.  It seems needlessly complex to support these 
different formats and it's one more thing to people to remember that you can 
have these different formats.

I suggest just going back to

DIR URL
DIR -rN URL
DIR -r N URL

and extend URLs to have peg and relative support.  The code would be simpler and 
less complex UI for svn users.  It would also allow 'svn ps'.

To Mike's concern about the inconsistency between the externals format and 
export and checkout, that never bugged me.  I thought of the externals as a 
dictionary with the key being on the left that creates the directory with the 
dictionary value being where to pull the directory from, so thinking as the 
directory as more important than the URL.

Regards
Blair

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

Re: 1.5 svn:externals and command line parsing

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Blair Zajac <bl...@orcaware.com> writes:

> $ svn ps svn:externals '-r24000 http://svn.collab.net/repos/svn/trunk trunk' .
> subversion/svn/main.c:1147: (apr_err=205000)
> svn: Syntax error in revision argument '24000 
> http://svn.collab.net/repos/svn/trunk svn-trunk'
> 
> While most of the time I use svn pe to set these, having a format for an 
> external you cannot use via svn ps seems to be broken.

You can, but you didn't tell svn to stop parsing options, so it
sees the leading - on the next word after 'svn:externals' and
parses the -r option and a bogus revision specification.

This definitely works:

svn ps svn:externals -- '-r24000 http://svn.collab.net/repos/svn/trunk trunk' .

And it would be nice if this works:

svn ps svn:externals ' -r24000 http://svn.collab.net/repos/svn/trunk trunk' .

If we don't strip leading white space, we might as well do that.
People might find that form a bit easier.

-- 
Eric Gillespie <*> epg@pretzelnet.org

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

Re: 1.5 svn:externals and command line parsing

Posted by Blair Zajac <bl...@orcaware.com>.
C. Michael Pilato wrote:
> Blair Zajac wrote:
>> While we're on this subject, the change to support both:
>>
>> URL DIR (svn <= 1.4)
>>
>> and
>>
>> DIR URL (svn >= 1.5 with peg revisions)
>>
>> never really appealed to me.  It seems needlessly complex to support
>> these different formats and it's one more thing to people to remember
>> that you can have these different formats.
>>
>> I suggest just going back to
>>
>> DIR URL
>> DIR -rN URL
>> DIR -r N URL
>>
>> and extend URLs to have peg and relative support.  The code would be
>> simpler and less complex UI for svn users.  It would also allow 'svn ps'.
> 
> The problem is that URLs that lack peg revisions can't be accurately
> interpreted.  "-r19 URL" can mean two entirely different repository
> locations depending on whether or not the peg revision algorithm in in play.
> 
>> To Mike's concern about the inconsistency between the externals format
>> and export and checkout, that never bugged me.
> 
> This was never about the look of the format.  We needed a way to distinguish
> the old interpretation from the new.  One way to do that was the to add
> support for a new syntax.  As it turns out, this new syntax makes (for me)
> more intuitive sense anyway -- bonus.

Ahh, thanks.  Good to know.

Blair

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

Re: 1.5 svn:externals and command line parsing

Posted by "C. Michael Pilato" <cm...@collab.net>.
Blair Zajac wrote:
> While we're on this subject, the change to support both:
> 
> URL DIR (svn <= 1.4)
> 
> and
> 
> DIR URL (svn >= 1.5 with peg revisions)
> 
> never really appealed to me.  It seems needlessly complex to support
> these different formats and it's one more thing to people to remember
> that you can have these different formats.
> 
> I suggest just going back to
> 
> DIR URL
> DIR -rN URL
> DIR -r N URL
> 
> and extend URLs to have peg and relative support.  The code would be
> simpler and less complex UI for svn users.  It would also allow 'svn ps'.

The problem is that URLs that lack peg revisions can't be accurately
interpreted.  "-r19 URL" can mean two entirely different repository
locations depending on whether or not the peg revision algorithm in in play.

> To Mike's concern about the inconsistency between the externals format
> and export and checkout, that never bugged me.

This was never about the look of the format.  We needed a way to distinguish
the old interpretation from the new.  One way to do that was the to add
support for a new syntax.  As it turns out, this new syntax makes (for me)
more intuitive sense anyway -- bonus.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand