Commit blocked by pre-commit hook (exit code 255) with no output.

That’s what is seen client-side, and this is what is seen server-side:

Revprop change blocked by pre-revprop-change hook (exit code 255) with no output. [500, #165001]

In most cases the usual search results will point you where you need:

  • execute permission not set on the hook script
  • missing hook script allowing property change
  • wrong line endings

In my case:

I recently moved the repositories off of a smaller file system to a larger one that had noexec set. Spent an hour+ trying to figure it out and it took a combination of this error message:

# ./
-bash: ./ Permission denied

and remembering that I had run into this in the past before it dawned on me.


Unknown type ‘TGuid’

I upgraded from Inno Setup 5.3.10 to 5.4.0 and tried to build a project that has previously built without any issues.

Got this error instead:

Error on line 223 in setup.iss: Column 10:
Unknown type 'TGuid'
Compile aborted.

A while back I had stopped using the Non Unicode Inno Setup and started using Unicode Inno Setup instead. When I upgraded to 5.4.0 I accidentally reverted to the Non Unicode version. Once I removed ispack-5.4.0.exe and installed ispack-5.4.0-unicode.exe the error went away.

Counting the number of items in a line

This short script was used to count the number of pipes in a line. I wanted to have 9 per line so the Dokuwiki table would be displayed properly, so this script let me know which lines were busted.

# Purpose: 
#     Get number of pipes per line. The first line should be what you 
#     want the others to match

import re
import os
import sys

game_collection_file = sys.path[0] + os.sep \
    + 'game_collection_dokuwiki_list.txt'
game_collection_fh = open(game_collection_file)

rexp = re.compile(r"\|")

count = 0
for line in game_collection_fh:
    count += 1
    match = rexp.findall(line)
    if len(match) != 9:
        #print "Number of pipes on line %s: %s " % (count, len(match))
        print "line %s: %s " % (count, len(match))

Server sent unexpected return value (502 Bad Gateway) in response to COPY

This was an annoying issue. I initially blamed it on an Apache update and wasted a lot of time going in that direction. When I finally gave up and used Google, I got somewhere.

Thankfully, I wasn’t the only person to run into this and there are at least three different solutions to the problem. Take your pick.

It was explained rather succinctly here:

because nginx pass to backend https:// url in Destination header.
but http:// and https:// urls can not be mixed in COPY request.

In short, the front end speaks https to the client, but it speaks http (non-ssl) to the back end. The header is not changed to reflect this and the COPY command fails.

  1. Rewrite the Destination header via nginx’s rewrite feature:

    set $fixed_destination $http_destination;
    if ( $http_destination ~* ^https(.*)$ )
    set $fixed_destination http$1;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Destination $fixed_destination;
    proxy_pass http://subversion_hosts;

  2. Have Apache also use SSL (I was using this approach until just recently)
  3. Use mod_headers with Apache.

Making Firefox maximize on startup

You’d think something like this would be incredibly easy, maybe even be in an options tab or possibly prefs.js in the user’s profile.

Eh, sort of.

The setting is in localstore.rdf within the user’s profile. This value is supposed to be saved automatically when closing out of the browser, as this page mentions.

In my case I want a lab of users to all receive the same “maximize window” setting. Thankfully, the user profile being used is thin and I don’t have to worry about them having a personalized localstore.rdf file.

Here is the file I’ll use:

<?xml version="1.0"?>
    Purpose: Set the Firefox window to maximized. This file would be copied
             over on every login, thereby preventing the window from coming up
             sized smaller. Users are able to size it themselves during their
             browsing session however.
<RDF:RDF xmlns:NC=""
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
                   value="" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
                   sizemode="maximized" />
  <RDF:Description RDF:about="chrome://browser/content/browser.xul">
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
    <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>

Here is the relevant value:


Hope somebody finds that useful. 🙂