Svn repository: redirect the output of svn log
I am a beginner with subversions. I want ot know if it is apossible to redirect the 开发者_JS百科output of the command svn log in order to put it in a file. In fact, I want to see the history of the users and check some info about a specific user (name of the added files in a specific date), which is possible I think by using awk with the resulting file.
when I dosvn log file:///var/svn/repository/myproject>file
I get an error message:
bash: file: Permission denied
if anyone can help me thnx
Well, I thought that it is an easy job to identify the files added by a specific user in a specific date, using awk with the output (mylogfile), but the problem is that I can't distinguish between added and removed files!
Sure you can...
svn log -v REPOURL > ~/reposvn.log
You will then see output kinda like this:
------------------------------------------------------------------------
r1 | svnuser | 2010-10-20 18:56:07 -0400 (Wed, 20 Oct 2010) | 1 line
Changed paths:
A /trunk/file/that/was/added.txt
D /trunk/file/that/was/removed.txt
Commit comment.
A
means added, M
means modified, D
means deleted. awk on that :-)
Also you might want to think about Antonio's comment above to use the xml format and parse that as opposed to using awk... might be easier. Ive never tried to do either so i cant say.
That has nothing to do with SVN you dont have permission to write to the file youre trying to write to. Try throwing it in your home directory or in /tmp
as Nishant suggested in his comment.
精彩评论