2

I am writing post-commit-hook script for svn repository for windows. I have a .bat file for this.

Now I want to get only the author name for a revision, how to do this?

I know svn info -r revnumber gives me information for particular revnumber.

Repository UUID: 65c289e3-30af-4e40-9b38-41a2938c897c
Revision: 25
Node Kind: directory
Last Changed Author: foolish
Last Changed Rev: 25
Last Changed Date: 2014-08-13 23:23:24 +0530 (Wed, 13 Aug 2014)

I want only the Last Changed Author from info.

Foolish
  • 3,952
  • 33
  • 46

1 Answers1

1

You can get author's username by running svnlook author -r %2 %1.

  • %1: repository path,
  • %2: revision number created by the commit.

See post-commit hook reference.

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • 1
    yes..! it worked. I missed to check svnlook, Thanks for help. Just FYI, we have to mention repository location too with svnlook command. `svnlook author -r %rev% %repos%` – Foolish Aug 14 '14 at 19:22