philip
That won't work. Multiple commits can run in parallel resulting in pre-commit being invoked multiple times in parallel. You need to detect the recursive commit using information inside the commit not information stored outside the commit. Options include: have the pre-commit use a special username to make the commit and then detect that username, have the pre-commit use a special log message and detect that log message, have the pre-commit set a special property or revision property and detect that, etc.
satheesh
Thanks, If i use log msg & check like SET %log% = svnlook log -t %TXN% %REPOS% if (%log% == mycommit) ( "C:\Users\satheesh\Desktop\SVN\svn-win32-1.7.6\bin\svn.exe" import C:\Users\satheesh\Desktop\RES1.txt svn://localhost:3939/Users/satheesh/Desktop/SVN/svn1.7.6/Repos/WireShark/res1.txt -m "mycommit" echo success > Result.txt ) else exit 1 In this case it will exit from beginning itself(if i give "commit" as comment(from client) while checking in any file, it ill exit). because Instead of original commit(from client)i need to commit my own file(commit -import C:\Users\satheesh\Desktop\RES1.txt) & block the original commit from client. Pls give some example
philip
I've just realised you are doing this from a pre-commit. It is almost always wrong to have pre-commit make a second commit. When the pre-commit runs there is no guarantee that the first commit is going to succeed. Making extra commits from the post-commit can work in some circumstances. Your current script makes no sense so it's hard to give advice.
satheesh
Thanks all, Then Can i use revert to the previous revision in post-commit hook without having working copy ???
philip
It's not clear what you mean. Do you want the post-commit to make a second commit to undo the commit that ran the post-commit? That sounds really odd. Aside from that, post-commit is asyncronous so you cannot rely on the post-commit order.