简体   繁体   中英

How do I rename an SVN User-Author?

Is there a direct way to rename a user's name in svn?

I've found this linux script only. I thought it would be easier. Does anybody know a windows-way to change it?

We are using VisualSvnServer as svn server and TortoiseSNV on clients.

In TortoiseSVN:

  1. open the log dialog.
  2. Then enter the username in the filter so only those revisions show up which you want to change the author.
  3. select all those revisions
  4. right-click to get the context menu
  5. select "Edit author"
  6. enter the new author name, click OK
  7. wait
  8. done

Note: to change the author of multiple revisions you need TSVN 1.7 - in 1.6 it's only possible to change the author for one revision at a time.

To change the username for future commits as well, start the VisualSVN server manager (on the server), select the repository, right-click, choose "properties", then edit the username there.

You can edit the revision property svn:author with TortoiseSVN as well so you can change it. This is only suitable if you have to change that only for a single revision or may be two...if you have more than ten you should thinking about writing a script. Furthermore it must be allowed to change revision properties by the server side which is usually not allowed.

You should use pre revision propert change hook like this:

if /I not "%4" == "svn:author" exit 0
echo Only changes to svn:author messages are allowed. >&2
exit 1

Please that this hook allow all authenticated users to change svn:author property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM