You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Nico Kadel-Garcia <nk...@gmail.com> on 2010/07/09 19:08:35 UTC

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

The allowable syntax for svn:externals is a bit unclear in the Redbook.

Shouldn't I be able to set the svn:external to point to a location in
my active repository, such as the below settings?

    svn propset svn:externals "release-1 ^/tags/release-1" .

I seem to be able to set such values, but updating with such values
fails miserably with the subversino-1.6.12, published from RPMforge on
RHEL 5 (for reference to the version I'm using).

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

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jul 13, 2010 at 09:08:27AM -0700, Blair Zajac wrote:
> On 07/13/2010 05:15 AM, Stefan Sperling wrote:
> >I think we should discourage use of the old syntax in both the output
> >of svn help and in the book. Diff to the help text below.
> >Would this improve things?
> 
> Sounds good to me.
> 
> I think this last sentence starting with "The ambiguous format..."
> should go before 1.4 is mentioned because it is relevant to the 1.5
> format.

Good catch, thanks.
Committed with further tweaks and some typos fixed in r981653.
Sorry about the delay.

Does anyone feel like submitting a similar patch to the book?
In particular about making the book discourage use of the 1.4-and-earlier
syntax?

Thanks,
Stefan

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

Posted by Blair Zajac <bl...@orcaware.com>.
On 07/13/2010 05:15 AM, Stefan Sperling wrote:
> On Mon, Jul 12, 2010 at 05:57:24PM -0400, Nico Kadel-Garcia wrote:
>> I don't know why the syntax was reversed: it really looks like an
>> entirely unnecessary parsing complication.
>
> The new syntax looks more like 'svn checkout', so it's more natural
> to use when you're already used to svn checkout.
>
>> I would change it like this:
>
> I think we should discourage use of the old syntax in both the output
> of svn help and in the book. Diff to the help text below.
> Would this improve things?

Sounds good to me.

I think this last sentence starting with "The ambiguous format..." 
should go before 1.4 is mentioned because it is relevant to the 1.5 format.

Blair

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

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
Give the man a cigar, he's captured what I was looking for.

On Tue, Jul 13, 2010 at 8:15 AM, Stefan Sperling <st...@elego.de> wrote:
> On Mon, Jul 12, 2010 at 05:57:24PM -0400, Nico Kadel-Garcia wrote:
>> I don't know why the syntax was reversed: it really looks like an
>> entirely unnecessary parsing complication.
>
> The new syntax looks more like 'svn checkout', so it's more natural
> to use when you're already used to svn checkout.
>
>> I would change it like this:
>
> I think we should discourage use of the old syntax in both the output
> of svn help and in the book. Diff to the help text below.
> Would this improve things?
>
> Stefan
>
>
> --- /tmp/old    Tue Jul 13 14:00:00 2010
> +++ /tmp/mine   Tue Jul 13 14:13:50 2010
> @@ -1,23 +1,23 @@
>     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@42 foo
> -        -r 1234 http://example.com/repos/zig foo/bar
> -      Relative URLs are supported in Subversion 1.5 and greater for
> -      all above formats and are indicated by starting the URL with one
> -      of the following strings
> +      each of which consists of a URL relative directory path, similar
> +      to the syntax of the 'svn checkout' command:
> +        http://example.com/repos/zag foo/bar
> +      An optional peg revision may be appended to the URL to pin the
> +      external to a known revision:
> +        http://example.com/repos/zig@42 foo
> +      Relative URLs are indicated by starting the URL with one
> +      of the following strings:
>         ../  to the parent directory of the extracted external
>         ^/   to the repository root
>         //   to the scheme
>         /    to the server root
> -      The ambiguous format 'relative_path relative_path' is taken as
> -      'relative_url relative_path' with peg revision support.
>       Lines in externals definitions starting with the '#' character
>       are considered comments and are ignored.
> +      Subversion 1.4 and earlier only support the following formats
> +      where the URLs cannot have peg revisions and cannot be relative:
> +        foo             http://example.com/repos/zig
> +        foo/bar -r 1234 http://example.com/repos/zag
> +      Use of these formats is discouraged. They should only be used if
> +      interoperability with 1.4 clients is desired.
> +      The ambiguous format 'relative_path relative_path' is taken as
> +      'relative_url relative_path' with peg revision support.
>

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

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jul 12, 2010 at 05:57:24PM -0400, Nico Kadel-Garcia wrote:
> I don't know why the syntax was reversed: it really looks like an
> entirely unnecessary parsing complication.

The new syntax looks more like 'svn checkout', so it's more natural
to use when you're already used to svn checkout.

> I would change it like this:

I think we should discourage use of the old syntax in both the output
of svn help and in the book. Diff to the help text below.
Would this improve things?

Stefan


--- /tmp/old	Tue Jul 13 14:00:00 2010
+++ /tmp/mine	Tue Jul 13 14:13:50 2010
@@ -1,23 +1,23 @@
     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@42 foo
-        -r 1234 http://example.com/repos/zig foo/bar
-      Relative URLs are supported in Subversion 1.5 and greater for
-      all above formats and are indicated by starting the URL with one
-      of the following strings
+      each of which consists of a URL relative directory path, similar
+      to the syntax of the 'svn checkout' command:
+        http://example.com/repos/zag foo/bar
+      An optional peg revision may be appended to the URL to pin the
+      external to a known revision:
+        http://example.com/repos/zig@42 foo
+      Relative URLs are indicated by starting the URL with one
+      of the following strings:
         ../  to the parent directory of the extracted external
         ^/   to the repository root
         //   to the scheme
         /    to the server root
-      The ambiguous format 'relative_path relative_path' is taken as
-      'relative_url relative_path' with peg revision support.
       Lines in externals definitions starting with the '#' character
       are considered comments and are ignored.
+      Subversion 1.4 and earlier only support the following formats
+      where the URLs cannot have peg revisions and cannot be relative:
+        foo             http://example.com/repos/zig
+        foo/bar -r 1234 http://example.com/repos/zag
+      Use of these formats is discouraged. They should only be used if
+      interoperability with 1.4 clients is desired.
+      The ambiguous format 'relative_path relative_path' is taken as
+      'relative_url relative_path' with peg revision support.

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

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jul 13, 2010 at 10:12:59AM -0500, Les Mikesell wrote:
> I meant it as a more general question, not just in the context of
> externals.  Is there some reason not to use the path@rev style for
> every command or document that as the preferred method?

There's no reason not to always use path@rev.
You can use path@HEAD to get the default behaviour.

In 1.6.5, we explicitly changed the svn CLI client to parse peg revisions
in each of its URL or path arguments, and either evaluate them or discard
them depending on whether a peg revision makes sense in the current context.
This was done to help scripts, hudson jobs, and the like.

Stefan

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

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jul 13, 2010 at 04:52:45PM -0500, Ryan Schmidt wrote:
> On Jul 13, 2010, at 08:35, Stefan Sperling wrote:
> 
> > In the "-r rev" syntax, the rev is interpreted as a peg revision.
> > See http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?revision=961970&view=markup
> > lines 3026 to 3092, inside function svn_wc_parse_externals_description3().
> > Revisions parsed from either syntax set the same variable (item->peg_revision).
> 
> "-r rev" is interpreted as a peg revision within svn:externals? That's
> a bit confusing, since "-r rev" is interpreted as an operative
> revision when used on the command line.

Just use the new svn:externals syntax :)

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 13, 2010, at 08:35, Stefan Sperling wrote:

> In the "-r rev" syntax, the rev is interpreted as a peg revision.
> See http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?revision=961970&view=markup
> lines 3026 to 3092, inside function svn_wc_parse_externals_description3().
> Revisions parsed from either syntax set the same variable (item->peg_revision).

"-r rev" is interpreted as a peg revision within svn:externals? That's a bit confusing, since "-r rev" is interpreted as an operative revision when used on the command line.

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

Posted by Les Mikesell <le...@gmail.com>.
On 7/13/2010 8:35 AM, Stefan Sperling wrote:
>
>>> When the code has beem moved around. There's a description at
>>> http://svnbook.red-bean.com/en/1.1/ch07s03.html which helps explain
>>> it.
>>>
>>> Mind you, I think if you're doing this kind of drilling back you're
>>> begging or pain.
>>
>> Yes I understand the situation where you would have to use path@rev
>> to get something at all (because history doesn't lead there).  What
>> I don't understand is when you would ever be wrong if you used that
>> all the time instead of -r rev.       Which leads to the related
>> question as to why that syntax isn't the default for commands.  Is
>> it less efficient than following history backwards?
>
> There is no difference.
>
> In the "-r rev" syntax, the rev is interpreted as a peg revision.
> See http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?revision=961970&view=markup
> lines 3026 to 3092, inside function svn_wc_parse_externals_description3().
> Revisions parsed from either syntax set the same variable (item->peg_revision).
>
> The new syntax is simply more convenient because the order of URL and path
> is consistent with svn checkout.

I meant it as a more general question, not just in the context of 
externals.  Is there some reason not to use the path@rev style for every 
command or document that as the preferred method?  There are some 
situations where it is easier to construct, like a parametrized build in 
Hudson, for example.

-- 
   Les Mikesell
    lesmikesell@gmail.com

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

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jul 13, 2010 at 07:28:36AM -0500, Les Mikesell wrote:
> Nico Kadel-Garcia wrote:
> >On Mon, Jul 12, 2010 at 6:56 PM, Les Mikesell <le...@gmail.com> wrote:
> >>On 7/12/2010 4:57 PM, Nico Kadel-Garcia wrote:
> >>>I understand that, and can understand that the peg revisions demanded
> >>>a new syntax.
> >>I realize that this is barely related to the topic, but is there any common
> >>scenario where you wouldn't want to use peg revision syntax?  In every
> >>situation I can imagine where -r rev path and path@rev might differ, the one
> >>I'd want would be path@rev.
> >
> >When the code has beem moved around. There's a description at
> >http://svnbook.red-bean.com/en/1.1/ch07s03.html which helps explain
> >it.
> >
> >Mind you, I think if you're doing this kind of drilling back you're
> >begging or pain.
> 
> Yes I understand the situation where you would have to use path@rev
> to get something at all (because history doesn't lead there).  What
> I don't understand is when you would ever be wrong if you used that
> all the time instead of -r rev.       Which leads to the related
> question as to why that syntax isn't the default for commands.  Is
> it less efficient than following history backwards?

There is no difference.

In the "-r rev" syntax, the rev is interpreted as a peg revision.
See http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?revision=961970&view=markup
lines 3026 to 3092, inside function svn_wc_parse_externals_description3().
Revisions parsed from either syntax set the same variable (item->peg_revision).

The new syntax is simply more convenient because the order of URL and path
is consistent with svn checkout.

Stefan

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

Posted by Les Mikesell <le...@gmail.com>.
Nico Kadel-Garcia wrote:
> On Mon, Jul 12, 2010 at 6:56 PM, Les Mikesell <le...@gmail.com> wrote:
>> On 7/12/2010 4:57 PM, Nico Kadel-Garcia wrote:
>>> I understand that, and can understand that the peg revisions demanded
>>> a new syntax.
>> I realize that this is barely related to the topic, but is there any common
>> scenario where you wouldn't want to use peg revision syntax?  In every
>> situation I can imagine where -r rev path and path@rev might differ, the one
>> I'd want would be path@rev.
> 
> When the code has beem moved around. There's a description at
> http://svnbook.red-bean.com/en/1.1/ch07s03.html which helps explain
> it.
> 
> Mind you, I think if you're doing this kind of drilling back you're
> begging or pain.

Yes I understand the situation where you would have to use path@rev to get 
something at all (because history doesn't lead there).  What I don't understand 
is when you would ever be wrong if you used that all the time instead of -r rev. 
       Which leads to the related question as to why that syntax isn't the 
default for commands.  Is it less efficient than following history backwards?

-- 
   Les Mikesell
    lesmikesell@gmail.com



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

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Mon, Jul 12, 2010 at 6:56 PM, Les Mikesell <le...@gmail.com> wrote:
> On 7/12/2010 4:57 PM, Nico Kadel-Garcia wrote:
>>
>> >
>> I understand that, and can understand that the peg revisions demanded
>> a new syntax.
>
> I realize that this is barely related to the topic, but is there any common
> scenario where you wouldn't want to use peg revision syntax?  In every
> situation I can imagine where -r rev path and path@rev might differ, the one
> I'd want would be path@rev.

When the code has beem moved around. There's a description at
http://svnbook.red-bean.com/en/1.1/ch07s03.html which helps explain
it.

Mind you, I think if you're doing this kind of drilling back you're
begging or pain.

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

Posted by Les Mikesell <le...@gmail.com>.
On 7/12/2010 4:57 PM, Nico Kadel-Garcia wrote:
> >
> I understand that, and can understand that the peg revisions demanded
> a new syntax.

I realize that this is barely related to the topic, but is there any 
common scenario where you wouldn't want to use peg revision syntax?  In 
every situation I can imagine where -r rev path and path@rev might 
differ, the one I'd want would be path@rev.

-- 
   Les Mikesell
    lesmikesell@gmail.com


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

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Mon, Jul 12, 2010 at 12:00 PM, Blair Zajac <bl...@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
>> <su...@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.

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

Posted by Blair Zajac <bl...@orcaware.com>.
On 07/12/2010 04:42 AM, Nico Kadel-Garcia wrote:
> On Fri, Jul 9, 2010 at 6:45 PM, Ryan Schmidt
> <su...@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.

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


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

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, Jul 9, 2010 at 6:45 PM, Ryan Schmidt
<su...@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.

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

> http://code.google.com/p/canviz/source/checkout
>
> You can check out a working copy and see it work for yourself, or see:
>
> $ svn propget svn:externals http://canviz.googlecode.com/svn/canviz/trunk
> ^/vendor/excanvas/0001@7 excanvas
> ^/path/trunk/libs@262 path
> ^/vendor/prototype/1.6.0.3/dist@135 prototype

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
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:
>> 
>>> The allowable syntax for svn:externals is a bit unclear in the Redbook.
>>> 
>>> Shouldn't I be able to set the svn:external to point to a location in
>>> my active repository, such as the below settings?
>>> 
>>>    svn propset svn:externals "release-1 ^/tags/release-1" .
>>> 
>>> I seem to be able to set such values, but updating with such values
>>> fails miserably with the subversino-1.6.12, published from RPMforge on
>>> RHEL 5 (for reference to the version I'm using).
>> 
>> Try
>> 
>>   svn propset svn:externals "^/tags/release-1 release-1" .
> 
> On Subversion 1.6? I think not, and tested such. The syntax described
> at http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html
> describes the precise reverse syntax, and it accepts this.
> 
>       svn propset svn:externals "release-1
> svn://svnserver/repo/tags/release-1".
> 
> 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.

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:

http://code.google.com/p/canviz/source/checkout

You can check out a working copy and see it work for yourself, or see:

$ svn propget svn:externals http://canviz.googlecode.com/svn/canviz/trunk
^/vendor/excanvas/0001@7 excanvas
^/path/trunk/libs@262 path
^/vendor/prototype/1.6.0.3/dist@135 prototype


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

Posted by Keith Moore <Ke...@securency.com>.
-----Original Message-----
From: Nico Kadel-Garcia [mailto:nkadel@gmail.com] 
Sent: Saturday, 10 July 2010 8:13
To: Ryan Schmidt
Cc: Subversion
Subject: Re: Unclear syntax for relative addressing of svn:externals, on RHEL 5, subversion-1.6.12

On Fri, Jul 9, 2010 at 4:19 PM, Ryan Schmidt
<su...@ryandesign.com> wrote:
>
> On Jul 9, 2010, at 14:08, Nico Kadel-Garcia wrote:
>
>> The allowable syntax for svn:externals is a bit unclear in the Redbook.
>>
>> Shouldn't I be able to set the svn:external to point to a location in
>> my active repository, such as the below settings?
>>
>>    svn propset svn:externals "release-1 ^/tags/release-1" .
>>
>> I seem to be able to set such values, but updating with such values
>> fails miserably with the subversino-1.6.12, published from RPMforge on
>> RHEL 5 (for reference to the version I'm using).
>
> Try
>
>   svn propset svn:externals "^/tags/release-1 release-1" .

On Subversion 1.6? I think not, and tested such. The syntax described
at http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html
describes the precise reverse syntax, and it accepts this.

       svn propset svn:externals "release-1
svn://svnserver/repo/tags/release-1".

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?
---------------------------------------------------------
I think it is available, I'm not sure what you mean by "so that moving a tag or branch up or down wouldn't break the references".  I think if you move directories around it is likely to break references, especially if relative to the root of the repository.  The only way to prevent failing references is to use a peg revision on the URL.

The original externals syntax was 'directory externalURL' and would accept only full/absolute URLs.  In Subversion 1.5 (I think) relative externals were introduced.  To support these new relative externals, whilst also maintaining backwards compatibility, a different syntax was introduced, 'externalURL directory'.

If you want relative URLs you must use the new syntax.  If you use absolute urls can use either the old or the new syntax.

If the new syntax is failing maybe you could post the error message.  I have used externals since I moved to Subversion, the old absolute and the new syntax, without problem.


#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

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

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, Jul 9, 2010 at 4:19 PM, Ryan Schmidt
<su...@ryandesign.com> wrote:
>
> On Jul 9, 2010, at 14:08, Nico Kadel-Garcia wrote:
>
>> The allowable syntax for svn:externals is a bit unclear in the Redbook.
>>
>> Shouldn't I be able to set the svn:external to point to a location in
>> my active repository, such as the below settings?
>>
>>    svn propset svn:externals "release-1 ^/tags/release-1" .
>>
>> I seem to be able to set such values, but updating with such values
>> fails miserably with the subversino-1.6.12, published from RPMforge on
>> RHEL 5 (for reference to the version I'm using).
>
> Try
>
>   svn propset svn:externals "^/tags/release-1 release-1" .

On Subversion 1.6? I think not, and tested such. The syntax described
at http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html
describes the precise reverse syntax, and it accepts this.

       svn propset svn:externals "release-1
svn://svnserver/repo/tags/release-1".

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?

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 9, 2010, at 14:08, Nico Kadel-Garcia wrote:

> The allowable syntax for svn:externals is a bit unclear in the Redbook.
> 
> Shouldn't I be able to set the svn:external to point to a location in
> my active repository, such as the below settings?
> 
>    svn propset svn:externals "release-1 ^/tags/release-1" .
> 
> I seem to be able to set such values, but updating with such values
> fails miserably with the subversino-1.6.12, published from RPMforge on
> RHEL 5 (for reference to the version I'm using).

Try

   svn propset svn:externals "^/tags/release-1 release-1" .