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

Re: can i invent arbitrary revision properties?

From: David Weintraub <qazwart_at_gmail.com>
Date: 2005-08-11 02:51:25 CEST

> On Wed, 10 Aug 2005, David Weintraub wrote:
> > * There isn't any simple mechanism to find a specific revision
> > property (except for the svn:log, svn:date, and svn:author which are
> > listed via the "svn log" command).

On 8/10/05, Robert P. J. Day <rpjday@mindspring.com> wrote:
> not sure what you mean by this. as a test, i added a totally
> arbitrary revisioned property to a directory and i can view it with:
> $ svn proplist --revprop -r HEAD -v pcore
> Unversioned properties on revision 2:
> fred : barney <-- that one
> svn:log : fred
> svn:author : rpjday
> svn:date : 2005-08-10T17:54:07.596250Z
> so what exactly did you mean above? seems pretty easy to see all of
> the unversioned properties.

Okay, try this one for size...

You set a revision property of bugtraq:defect = 25 on some revision in
your archive. Find that revision number.

Most defect tracking systems for Subversion put the defect id in the
logfile. For example, if I always know that the text of my defect id
will be "Fixed Defect ID: %BUG%", I could do something like this to
find the revision I want:

$ svn log | grep -e "^r[0-9][0-9]* " -e "^Fixed Defect ID: [0-9][0-9]*$"

A single command that can search the entire log for the information I want.

To search a whole archive for a particular revprop would take a bit of
work. You'd have to get a list of valid revisions, probably through
the "svn log" command. From there, you have to run the "svn propget
--revprop" command for each revision.

What I'd like to see is a new optional format for the "svn log"
command. The svn log command currently prints out the svn:log,
svn:date, and svn:author revision properties for each revision. It
wouldn't be hard to also have it print out all revision properties
associated with the revision. (Especially since all revision
properties for a particular revision are stored in the same file). I'd
also like to see a different format that would make the file a bit
easier to parse. Something like this:

r1|svn:date|2005-Jan-01 13:01:02.3233
r1|svn:log|Some commentary

This would make the log file much easier to parse for whatever you're
looking for. A small awk or Perl script could quickly query and find
which revision you fixed defect #25.

[Yes, I realize you could cheat and parse the db/revprops directory
yourself if you're using the fsfs file system, but what if you're on
the client and don't have direct access to that directory?]

David Weintraub
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 11 02:53:10 2005

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.