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

Re: Feature Request: more svn info

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-10-09 21:01:40 CEST

On Oct 9, 2006, at 04:22, Rob Hubbard wrote:

>> The rest is quite easy with standard shell parsing tools.
>>
>> $ svn info | grep '^Repository Root:'
>> Repository Root: http://example/svn
>
> Yes, that's true. It's harder just to get the part of the line I'm
> interested in though, rather than the whole line. The above would
> be no good in backticks. I'd need to use perhaps a Python-based
> regex search returning just the group in something like
> "^Repository Root:\(.*\)$".

Or, pretty easy:

$ svn info | sed -n 's/^Repository Root: //p'
http://example/svn

> Ah, well I'm not normally seeing "Repository Root". I have SVN
> 1.2.3 (admittedly, a bit old now) on Windoze (with Cygwin, thank
> goodness). I'm not sure what the rules are, or whether it's a bug
> that has been fixed in later versions of SVN, but "svn info" on a
> *path* does not list the "Repository Root", unless, for example, I
> specify "-rHEAD" or even (curiously) "-rBASE".

Yes, I believe you need Subversion >= 1.3.0 for Repository Root to
show up.

> Yes, it's not difficult to extract fragments of the path or URL
> from the combination of URL, Repository Root and Node Kind (if you
> have them all). But, I think that SVN would nevertheless benefit
> from easier (more direct) access to some of these bits of
> information; I pity those users of SVN on Windoze trying to do this
> using a batch file "script".

Oh, I don't know... If a scripting language can't even do the most
basic string parsing, then it doesn't sound like much of a scripting
language to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 9 21:02:48 2006

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.