One of our customer reported a funny issue with the pre-lock.bat hook script. Yes, when he use Subversion Server on Windows system. The customer is using a custom pre-lock.bat script to explicitly lock the file before every commit. Why does he explicitly lock the file while svn commit itself locks the file implicitly? He has a valid reason to do so.
In earlier releases (>v1.6), Subversion discarded the stdout messages printed in hook scripts. It is applicable for all hook scripts including pre-lock.bat script. Starting v1.6, it behaves same with all hook scripts, except pre-lock.bat script. The message printed in this hook script is used as a UID for the lock. It should be unique across the repository. The best part about Subversion is, it is clearly documented in the Subversion 1.6 Release Notes.
Guess what? The customer complained that the custom pre-lock.bat script worked very well in prior releases, but it do not work with Subversion 1.6. When he commit the file, he face 423 Locked Error error. When we investigated if it is got to do with any stdout messages, NO. The hook script does not print any message to stdout.
WHERE DO THE PROBLEM EXISTS?
The issue is, the customer has set echo on globally in his Windows system. It prints all the commands we execute in the hook script to stdout, including the comments as in rem command. The solution is to set echo off in his system, and he no more faces the problem!
In earlier releases (>v1.6), Subversion discarded the stdout messages printed in hook scripts. It is applicable for all hook scripts including pre-lock.bat script. Starting v1.6, it behaves same with all hook scripts, except pre-lock.bat script. The message printed in this hook script is used as a UID for the lock. It should be unique across the repository. The best part about Subversion is, it is clearly documented in the Subversion 1.6 Release Notes.
Guess what? The customer complained that the custom pre-lock.bat script worked very well in prior releases, but it do not work with Subversion 1.6. When he commit the file, he face 423 Locked Error error. When we investigated if it is got to do with any stdout messages, NO. The hook script does not print any message to stdout.
WHERE DO THE PROBLEM EXISTS?
The issue is, the customer has set echo on globally in his Windows system. It prints all the commands we execute in the hook script to stdout, including the comments as in rem command. The solution is to set echo off in his system, and he no more faces the problem!
- Location:home
- Mood:
cheerful

Comment Form