This uses a slightly different algorithm to determine the changed files. In this version 'hg strip -k .' takes 3.9 seconds, versus the previous patch took 5.9s. Without the patch at all it takes 3.4s (but has the huge cost for the next command, as I mentioned before).