开发者

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

开发者 https://www.devze.com 2023-03-17 16:20 出处:网络
What is the svn equivalent of this command, basically? git show-s--pretty=\"format:%an\"85c3e0 开发者_StackOverflow

What is the svn equivalent of this command, basically?

 git show  -s  --pretty="format:%an"    85c3e0
开发者_StackOverflow

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]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号