On line 199 in tarfile.py comparison should be done without chr() because s[0] is an integer. Also on line 208 there should be no ord() for the same reason. I think this is fixed in Python 3.3 I'm sorry for not providing a patch but it's late and I do not have mercurial installed.