简体   繁体   中英

How do I get author information for an SVN revision number?

What is the svn equivalent of this command, basically?

 git show  -s  --pretty="format:%an"    85c3e0

I have a revision number and I need the author for that checkin?

I can only think of something like this:

svn info [-rXXX] | grep "Author" | awk '{print $4}'

Use svn info command on your working copy.

Basic svn info will give you the following Information (Sample):

Path: .
URL: http://svn.myorg.net/Project/branches/Release1/Src
Repository Root: http://svn.myorg.net/Project/
Repository UUID: bbd6f5fb-5b8a-4d5b-891f-9a174ed27ad1
Revision: 7667
Node Kind: directory
Schedule: normal
Last Changed Author: author
Last Changed Rev: 7656
Last Changed Date: 2011-06-28 19:08:07 +0530 (Tue, 28 Jun 2011)

The key values in this information are: Revision , Last Changed Author , and Last Changed Revision

For a particular revision, run: svn info -r [rev_no]

You can filter out the results.

svn info + awk :

 svn info -r327 | awk -F':' '/Last Changed Author/ {print $2}'

From a client machine, using GUI like tortoise SVN is easier than using commandline.

However, if you are a SVN admin and are looking to get the info from the SVN server itself(example as an SVN admin], below command can be used:

svnlook author -r[revision number] [repository path where the particular svn repository resides physically on server]

svn info with --show-item is the simplest way:

svn info --show-item last-changed-author [-rXXX]

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