fixed short rev hashes

This PR fixes the broken generation of short revision hashes of test_perf.py described in #4654.