How to set svn:log in Post-commit hook
Hi, How can i set svn:log in post-commit hook. if i give svn.exe propset --revprop -r %REV% svn:log "log Msg" %REPOS% in Post-commit.bat It show error svn: E155007: 'D:\SVN\svn1.7.6\Repos' is not a working copy if i give the full url path of the file it successfully set the property. But how do we know the full url of the file in post-commit hook Thanks in advance,
I hate hook scripts in Windows. Based on the info here: http://thenaish.wordpress.com/tag/post-commit/ it seems Subversion gets confused by the "D:\SVN\svn1.7.6\Repos" format and interprets it as a working copy rather than the repo path. Try this in your hook script: set REPOS_URL=file:///%REPOS:\=/% svn.exe propset --revprop -r %REV% svn:log "log Msg" %REPOS_URL% I bolded the changes from your example.
You can use svn.exe if you convert the repository path into an URL but in a post-commit it is better to use the setrevprop command of svnadmin.exe as that uses the repository path directly.
Why do you think you need to do this in the first place? If it's because your users aren't writing good log messages, reject the commit in pre-commit and make them do it right. If it's because you're still holding onto strange notions related to CVS's $Log$ functionality, give it up.
1-4 of 4
Reply to this discussion
You cannot edit posts or make replies: You should be logged in before you can post.