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

RE: Re: Extracting URL from WC

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: 2007-12-18 15:52:20 CET

> -----Original Message-----
> From: Kenneth Porter [mailto:shiva@sewingwitch.com]
> Sent: Tuesday, December 18, 2007 1:07 AM
> To: users@subversion.tigris.org
> Subject: Re: Extracting URL from WC
>
> --On Monday, December 17, 2007 10:26 PM -0700 Mark Reibert
> <svn@reibert.com> wrote:
>
> > I can't think of anything much shorter than:
> >
> > svn info | awk '/^URL:/ { print $2 }'
>
> Yeah, I was thinking of adding Active State Perl as a build
requirement
> on
> all (WinXP) development systems.
>
> And I'm thinking the desirable string is actually the difference
> between
> the URL and the repository root (ie. the path within the repo), and
> that
> should be easy to compute.

svn info | perl -ne "print qq($1\n) if m|^URL: svn://[^/]*/(.*)|"
 

On a related side note, last time I tested with AS Perl, parsing the
text output of 'svn log' was literally ten times faster than parsing
'svn log --xml'.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 18 16:29:27 2007

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.