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

Re: Future support to real tags and real branches?

From: Ryan Schmidt <subversion-2009d_at_ryandesign.com>
Date: Thu, 26 Nov 2009 19:32:03 -0600

On Nov 26, 2009, at 05:34, Stefan Sperling wrote:

>>>> I know. Progress is trickling in. I'd like (and expect)
>>>> 'svn switch ../branches/mybranch' to do the obvious instead
>>>> of giving me 'not a working copy there'.

Actually the error I get is:

svn: '../branches/mybranch' does not appear to be a URL

>>> What do you think is obvious?
>>
>> Well, switching to a working copy is pointless. So, take the
>> URL (of svn info) and apply the relativ path given to it,
>> and switch to that URL.
>
> Switch the current working copy to the URL of a different
> working copy?

No, I think what he wants is:

There is only one working copy, and he is in the directory of that working copy. Its svn URL is, say, http://svn.example.com/subsys/component/module/trunk. He wants to switch the working copy to http://svn.example.com/subsys/component/module/branches/mybranch. He wants to do this by typing as little as possible, e.g.:

svn switch ../branches/mybranch

"../branches/mybranch" is to be taken not as a filesystem path but as a relative URL based on the URL associated with the current working copy.

You pointed out the possibility of instead defining a shell alias to reduce typing:

> export BLA=^/subsys/component/module/branches/bla
> svn switch $BLA

I do this too -- but only for the base URL of the one project I work on most often. If you work on many projects, setting up an alias for each project -- or for each branch of each project as you suggest -- and remembering which goes with which quickly gets out of hand. Subversion should be able to figure this out for us, and indeed it wouldn't be hard to script.

I too find myself using "svn info" to find a working copy's URL to then edit that URL on the command line -- not usually for switching but for merging in my case, but the idea is the same. It would be nice to be able to specify a relative URL at the command line, and I admit I have not looked into the new Subversion 1.5 URL shortcuts to see if any of them would help.

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

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-11-27 02:32:58 CET

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.