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

Re: How do I use "^" in command-line paths?

From: Stanimir Stamenkov <s7an10_at_netscape.net>
Date: Fri, 07 May 2010 17:28:58 +0300

Fri, 7 May 2010 07:07:41 -0700 (PDT), /tstone-barcard/:

> The SVN Book uses a path syntax throughout the narrative that prefixes
> a "^". I'm continually baffled by the use of "^" in the svn-book
> (http://svnbook.red-bean.com) because I cannot get it to work.
>
> What is this shortcut? When does it work? Does it need to be set?
>
> I've tried using it, but it never works (v1.6.3).
>
> I've used other "path shortcuts" like environment variables, but would
> love to understand just what the authors are trying to demonstrate in
> the book.

The caret (^) notation works only inside a working copy
<http://svnbook.red-bean.com/nightly/en/svn.basic.in-action.html#svn.advanced.reposurls>:

> In Subversion 1.6, a new caret (^) notation was introduced as a
> shorthand for “the URL of the repository's root directory”. For example:
>
> $ svn list ^/tags/bigsandwich/
>
> In this example, we're specifying a URL for the /tags/bigsandwich
> directory in the root of the repository. Note that this URL syntax
> only works when your current working directory is a working copy—the
> commandline client knows the repository's root URL by looking at the
> working copy's metadata.

You didn't state what OS you're on but on Windows you have to use ^^ as
^ is a special command-line character - it is the escape character, e.g.
you would need to use:

D:\...>svn merge ^^/branches/foo

On Windows you could also use double quotes around:

D:\...>svn merge "^/branches/foo"

-- 
Stanimir
Received on 2010-05-07 16:30:04 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.