The Vegan Militia

... because we are all made out of meat!

With No Output

2023/10/19

So I create numerous SVN replicas and since it takes several steps to do this, I have it automated all the icky bits in a script. Usually it worked fine, but this time, the whole thing mysteriously fails with this:

svn: E165001: Revprop change blocked by pre-revprop-change hook (exit code 255) with no output.

Let’s translate “with no output”: “somewhere along the line a programmer neglected to detect and/or issue an error message”. A fatal error never fails with no output unless someone, somewhere, screwed up the error handling code.

So I run the propset command manually… works fine. I run it with the debugger… all is well, but the propset command fails. I run the propset command in another window… works fine. Now, from in the debugger I run the propset with strace. Buried in the output I find this:

18704 chdir(".")                        = -1 EACCES (Permission denied)
18704 exit_group(-1)                    = ?

Sure enough! I had su’ed to the repository owner id, but my personal home directory was locked up:

$ ls
ls: cannot open directory .: Permission denied

One thing to note is that there is no attempt to issue an error message between the chdir() and the exit_group()! I wonder which would cost more: the programmer adding one line of code to issue an error message, or me spending half an hour figuring out this problem?

Tags: programming error svn