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

Getting the first revision

From: Dennis Jones <support_at_grassvalleysoftware.com>
Date: Mon, 3 Aug 2009 21:23:07 -0700

Hi all,

I'm looking for a *quick* way to get the first revision number from a
specific repository path.

I can get the *last* revision from a path via:

svn log --quiet -l1 <repourl>

. . . and then parsing the output with sed. This is very fast. However,
the only way I have found to get the *first* revision is to capture a log of
the entire history:

r3 | djones | 2001-01-16 19:56:51 -0800 (Tue, 16 Jan 2001)
------------------------------------------------------------------------
r2 | djones | 2000-11-29 17:22:29 -0800 (Wed, 29 Nov 2000)
------------------------------------------------------------------------
r1 | (no author) | 2000-11-29 17:22:29 -0800 (Wed, 29 Nov 2000)
------------------------------------------------------------------------

and then parse the last row for the revision number ("r1" in this case).
But even with --quiet, this takes a long time, especially as the number of
revisions increases in the repository over time. Can anyone suggest a
faster way?

Thanks,

- Dennis

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-04 07:05:22 CEST

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.