[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: Scott Gifford <sgifford_at_suspectclass.com>
Date: Fri, 27 Nov 2009 11:55:26 -0500

Ryan Schmidt <subversion-2009d_at_ryandesign.com> writes:

[...]

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

A shell script could do this work for you. Here is one that
calculates the new URL assuming the first component is ..:

    #!/bin/sh
    
    svn_url="`svn info |grep ^URL: |awk '{ print $2}'`"
    svn_parent_url="`dirname "$svn_url"`"
    svn_new_url="$svn_parent_url/$1"
    echo "$svn_new_url"

So, for example, running it with a parameter of "branches/foozle" will
output the base URL with the last component removed, and
"branches/foozle" in its place.

Not exactly what the OP wanted, but maybe close enough to be a good
start.

-----Scott.

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

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 17:57:05 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.