Franz Deschler
Franz Deschler

Reputation: 2574

reading VCS metadata

I want to read the metadata of a vcs-commit for analysis and statistics. But I don´t know what kind of data are actually available.

So my question is: what kind of data/metadata does Git and Subversion send on a commit?

Upvotes: 0

Views: 224

Answers (1)

David W.
David W.

Reputation: 107060

I can't speak to Git to readily, but Subversion can easily report all of the meta data in the basic Subversion command line commands/

Subversion gives you a lot of the meta-data on each commit as revision properties, and you can use various property commands to get this information:

$ $ svn pl --revprop -r$REV -v $REPO
  svn:author
      bsmith
  svn:date
     2006-01-25T22:06:29.746380Z
  svn:log
     Did something amazing

Unfortunately, with revision properties, you must specify one and only one revision at a time.

You can use the regular SVN log to fetch not only the revision properties, but also the files changed, and put it in XML format which may be easier to parse in a program:

$ svn log -v --xml --with-all-revprops $REPO

This will show you files where the property was modified, but doesn't tell you the property or the value that was changed. However, you could do a svn proplist -v on that file and that revision to find the property and the values changed.

Upvotes: 1

Related Questions