How to set a property in SVN for a single revision of a single file

I have a Subversion repository, and there are a lot of users who check what happens. However, I also need to frequently check the work for other people. I need to track the author of the original.

I considered creating a property in SVN, for example, "originalauthor", which could track this. In those cases when it was empty, I could use the author. If it was filled out, I could appropriate the changes accordingly.

However, I see no way to add a property that will not persist through multiple revisions. Similarly, there is no way to use commit commits to ensure that the "originalauthor" property is removed if there is a commit that does not include it.

I could always rewrite the password file on the server in order to allow me to make user names under my own name and then restore the original password file, but this seems awkward (and does not allow me to track the fact that it was verified on their behalf). Or I could create an additional user (therefore, for each "User A" there is a "User proxy"), which I could use to verify the changes. None of these options seem attractive.

Any suggestions or ideas?

+4
source share
2 answers

Subversion has two kinds of properties

  • Properties in a file or directory. These properties are versioned.
  • Revision properties. They refer to the reversion on which they are applied.

The first type is useful only if you want all versions of the file to be checked.

To mark a specific path, the Subversion project itself adds the original author to the journal message in a special format that is read by the contribulyzer script:

Patch by: Jan Jansen < jan@example.com > 

But if you have the tools (and you can assume subversion 1.5+), you can also use

 svn commit --with-revprop "original-author=Jan Jansen < jan@example.com >" 

to create a copyright revision property.

To get the property, you can use svn log like:

 svn log <...> --with-revprop original-author 
+9
source

Why not have a separate branch for all other users (who need proxies), and then when you look at them (I assume that you log in on their behalf because they are not allowed), then you are moving into the trunk?

I'm not sure why other users are not allowed to register themselves. Perhaps if you explain that we can provide better answers.

0
source

All Articles