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

RE: Getting HEAD revision number from a URL

From: Krebs, Steven <steven.krebs_at_intel.com>
Date: 2004-10-27 01:52:44 CEST

FYI: here is my final solution (for svn client on WinXP with PERL):

svn log -q -v -rHEAD <URI> | perl -nle "if(m/^r(\d+)/){~s/^r(\d+).*/set HeadRev=$1/;print;}"

I pipe the output to a batch script and run the script to set HeadRev=##

Thanks again to all who responded.

Steve

On 2004-10-26 16:34:00 -0700, Krebs, Steven wrote:

>Thanks to all for the help. I resolved my own issue of not having the -r before HEAD... Works great now. David, I like your perl script as it is a little neater (shorter) than mine.

>Steve

>On 2004-10-26 15:28:02 -0700, Krebs, Steven wrote:

>>Never mind, I see I need a -r before HEAD in the below cmds... I just copied and pasted from Peter's e-mail without
>>checking syntax first...

>>Peter Valdemar Mørch writes:
>>>This is unique and common to http://<repos>/<projN> and
>>>http://<repos>/<projM>. I can get this with
>>> svn log -q -v HEAD http://<repos>.

>> On 2004-10-26 15:22:02 -0700, Krebs, Steven wrote:
>>> When I do svn log -q URI I have to have a working copy, I would like
>> to
>>> query various repositories without having to have a local working
>> copy.
>>>
>>> In my case I have 4 separate repositories (source, eval, deploy and
>>> docs). Each over a Gigabyte of data, and I want a script to determine
>>> what the current HEAD revision of each is without having a working
>> copy.
>>>
>>> C:\>svn log -q -v HEAD svn://itplab-svnsvr.dp.intel.com/source
>>> svn: '.' is not a working copy
>> ----8<----
>>
>> HEAD is a revision keyword, try the following:
>> C:\>svn log -q -v -r HEAD svn://itplab-svnsvr.dp.intel.com/source
>>
>> Your previous command was trying to get a listing of a file called
>> C:\HEAD
>>
>> -Dominic
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 27 01:53:07 2004

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.