SVN shows usernames instead of user identifiers

So, we have this SVN repository, where earlier the name of the committers was displayed accurately, and it was easier to track who did what. Recently, the svn repository was moved to another server, and it was configured so that now when we check the logs, we can only see the user IDs of the author. I believe that we can update the authz svn file or some other settings file on the server to add the author name.

I wanted to ask if there is a way to do this on the client side? Mostly because we do not have access or permission to change the settings of the SVN server. Is there a way that I can have a footing or something where I can have a display and it can be displayed in a log.

I am using tortoiseSVN as an SVN client.

+4
source share
2 answers

Where do Subversion user IDs come from? Is your Subversion integrated with LDAP, like Windows Active Directory, or is it a separate Subversion authorization file?

Are user IDs changed from the old server (where people use their name) for the current user IDs?

I can think of two things:

  • You used Windows AD through LDAP, and the old server was checked against the cn attribute of the user, and the new one was against sAMAccountName .

  • Your old server had a post-commit hook that changed the version property of svn:author from user login ID to username.

Do you still have an old Subversion server? You should see if you can find the differences in customization.


Additional comments

Thanks to David. I will verify that although I am not sure if I can, due to access restrictions. You know, can I just set the value of support on the client side, for example, set "X123" as "John Doe". So when I look through the log, will all the name of the committer that has X123 appear as John Doe?

The svn:author version property contains the name of the user who committed the commit. You can change it to whatever you want. As I said, I saw how sites do this with intercepts after the fight. I am far from a fan of this. However, some sites appear to choose random character strings for usernames. Like X123 , as you said in your example. The temptation to tempt fate and change svn:author can be very powerful.

There are several recommendations I can make:

  • You can use something like Jenkins . Jenkins is a continuous assembly engine. However, it also saves your full history in a convenient interface. One of the things he can do is translate user IDs into actual names if you are using LDAP or Windows AD. So, if you look at your story on Jenkins, you will see the actual usernames.

  • You can use another revision property. For example, local:username . This again occurs with fixation after fixation. However, it does not change the svn:author revision property, so you will not have any possible side effects. You can do a quick search when you need to see the username with the svn pg --rev-prop -r $rev command. Or you can see it using svn log if you use the --with-rev-prop local:username or --with-all-revprops , as well as the --xml parameter (sorry, only displayed in the log in XML format) .

By the way, if you use binding after commit to change svn:author or to add the revision property local:username , you also need to add a preliminary revpp-change to give you permission to change / add the revision property. This is the opposite of all other hooks. In these intercepts, you had to create a nonzero exit value to prevent the action. In this case, you want to generate a zero output value to enable the action. Without this host, you cannot change the revision property.

+1
source

The user ID in logs is the identifier used to authenticate with the server when performing the verification. It is impossible to change what is communicated by clients directly inside the client; you can only extract the log and reassign the identifiers after the fact, and you will have to do this every time you want to print the log.

+1
source

Source: https://habr.com/ru/post/1479402/


All Articles