I’ve got a Subversion repository, and there are a number of users checking things in and out. However, I also need to frequently check in work for other people. I need to track the original author of the work.
I was considering creating a property in SVN, like ‘originalauthor’, which could track this. In cases where it was empty, I could use the author. If it was filled in, I could attribute the changes appropriately.
However, I can’t see a way to add a property that won’t persist through multiple revisions. Similarly, there doesn’t seem to be a way of using commit hooks to guarantee the ‘originalauthor’ property will be removed if there’s a commit which doesn’t include it.
I could always rewrite the password file on the server to allow me to commit under their username and then restore the original password file, but that seems clunky (and doesn’t let me track the fact that it was checked in on their behalf). Or I could create an additional user (so for every ‘User A’ there’s a ‘User A Proxy’) which I could use to check in changes. Neither of these options seem appealing.
Any suggestions, or ideas?
Subversion has two kinds of properties
The first type is only usefull if you want all versions of the file to be marked.
To mark a specific path the Subversion project itself adds the original author to the log message in a special format that is read by the contribulyzer script:
But if you have tooling available (and can assume subversion 1.5+) you could also use
to create a orignal-author revision property.
To retrieve the property you can then use svn log as: