Do the equivalent of r5083 for contrib/renumber_branch.py.