So I am working with a very old svn running on an old jenkins server. I am trying to output/print the last commit author using svn command.
So far I have tried - svn info --show-item last-changed-author
But this doesn't work as my svn is too old and it gives following error-
svn info --show-item last-changed-author
svn: invalid option: --show-item
Type 'svn help' for usage.
Could anyone please suggest me any other way to print/output the last commit author.
CodePudding user response:
If svn info
shows
Last Changed Author: user
You can use sed
to extract the information:
svn info | sed -n '/^Last Changed Author:/s/^[^:]*: //p'
Some versions of sed might need a more verbose variant, e.g.
sed -n -e '/^Last Changed Author:/s/^[^:]*: //' -eta -eb -e:a -ep