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

Re: Unclear syntax for relative addressing of svn:externals, on RHEL 5, subversion-1.6.12

From: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Mon, 12 Jul 2010 17:57:24 -0400

On Mon, Jul 12, 2010 at 12:00 PM, Blair Zajac <blair_at_orcaware.com> wrote:
> On 07/12/2010 04:42 AM, Nico Kadel-Garcia wrote:
>>
>> On Fri, Jul 9, 2010 at 6:45 PM, Ryan Schmidt
>> <subversion-2010b_at_ryandesign.com>  wrote:
>>>
>>> On Jul 9, 2010, at 17:13, Nico Kadel-Garcia wrote:
>>>>
>>>> On Fri, Jul 9, 2010 at 4:19 PM, Ryan Schmidt wrote:
>>>>>
>>>>> On Jul 9, 2010, at 14:08, Nico Kadel-Garcia wrote:
>>
>>>> What I wanted to do was have Subversion check out directories from
>>>> within the same repository, rooted to the top of the repository, so
>>>> that moving a tag or branch up or down wouldn't break the references.
>>>> I'd thought from the documentation about 'relative references' that it
>>>> would apply to the URL of the external repository, so that if the repo
>>>> is checked out as file:///, https:///, svn:///, etc. the URL's for
>>>> svn:externals downloading would be auto-munged appropriately.
>>>>
>>>> Is this not available?
>>>
>>> Yes, it is possible, using the syntax I provided.
>>
>> Thanks, Ryan, I've checked it myself. Do others agree that the
>> documentation in the book and the documentation in the "svn help
>> propset" is also unclear about the order of the arguments? It seems
>> very strange indeed to me tha the arguments for relative addressing
>> are reversed from the arguments URL's for separate repositories.
>
> That's because the 1.4 and earlier format doesn't support peg revisions and
> the newer format does.
>
> How would you write the description for "svn help ps"?
>
>>
>>>
>>> On the book page you referred to, scroll down to the part that reads "As
>>> of Subversion 1.5, though, a new format of the svn:externals property is
>>> supported." The old externals syntax, which does not support what you want,
>>> had the format "localdir url". The new format, that does support what you
>>> want, has the format "url localdir" (the parameters are reversed from
>>> before). I know this works because I use it in my repository here:
>>
>> But the old format still works. Are both supported? Because if it is,
>> I've got to say, that's just nasty and confusing.
>
> Yes, both are supported.

I don't know why the syntax was reversed: it really looks like an
entirely unnecessary parsing complication.

I would change it like this:

    svn:externals - A newline separated list of module specifiers,
      each of which consists of a relative directory path, optional
      revision flags and an URL. The ordering of the three elements
      implements different behavior. Subversion 1.4 and earlier only
      support the following formats and the URLs cannot have peg
      revisions:
        foo http://example.com/repos/zig
        foo/bar -r 1234 http://example.com/repos/zag
      Subversion 1.5 and greater support the above formats and the
      following formats where the URLs may have peg revisions:
                http://example.com/repos/zig foo
        -r 1234 http://example.com/repos/zig foo/bar
      Relative URLs are also supported in Subversion 1.5 or greater with the
      URL written first:
          ../..//baz/tags/1.1 baz
      Relative URL's may also use these formats:
        ../ to the parent directory of the extracted external
        ^/ to the repository root
        // to the scheme
        / to the server root

The problem for me reading it was that the old comment "Relative URLs
are supported in Subversion 1.5 and greater for all above formats" was
patently false, the use of URL's require the URL to be listed first,
which is a Subversion 1.5 or later format.

> Unfortunately, one cannot break the existing format because an organization
> may still have clients on 1.4, so there had to be a way to distinguish the
> new format from the old format.
>
> Blair

I understand that, and can understand that the peg revisions demanded
a new syntax.
Received on 2010-07-12 23:59:03 CEST

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

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