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

Re: Listing peg versions?

From: Martin Scharrer <mailinglists_at_madmarty.de>
Date: 2006-12-19 08:12:43 CET

Hi Byron,

On Tuesday 19 December 2006 01:31, Brummer, Byron wrote:
> I have a directory that has been created and deleted a few times in its
> history. How do I find the peg versions of each? I read the manual:
> http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html
> Which talks about peg versions...but has no mention of how to go about
> finding them if you don't know them already. I have 5k+ revisions in my
> repo...short of looping over every single one is there a sane way to
> list all the peg versions a given URL has?
The only way I can think of is that you `grep` the verbose log messages for
the adding of the directory. Any revision number in the lifetime of
one 'incarnation' of that dirname is good enough for use as a peg revision
and because all have to be created, i.e. added, you should look for the
adding revision.

You didn't told us what front-end or OS you are using. That and your email
headers let me guess that you are working with MS Windows, right?
Anyway, under an Unix-like OS (Do you have cygwin?) the quick way would be to
run a command like this:

svn log -v | grep -e '^r' -e '^ A /trunk/pdir/dir$' | less

or in perl with nicer output

svn log -v | perl -ne '/^r(\d+) \|/ && ($r = $1); m{^ A /trunk/bin/svn$} &&
print "Rev: $r\n"'

but there are also better scripting solutions (Using the --xml switch and
XML::Simple, ...)

This functionality would be also a nice feature for a graphical front-end like

I hope this helps you,

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 19 13:40:44 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.