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:
Patch by: Jan Jansen <[email protected]>
But if you have tooling available (and can assume subversion 1.5+) you could also use
svn commit --with-revprop "original-author=Jan Jansen <[email protected]>"
to create a orignal-author revision property.
To retrieve the property you can then use svn log as:
svn log <...> --with-revprop original-author
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With