--- a/mercurial/util.py Sat Jan 10 18:00:57 2015 +0800 +++ b/mercurial/util.py Tue Jan 13 16:15:02 2015 -0800 @@ -234,7 +234,7 @@ try: # 2.5+ return struct.Struct(fmt).unpack - except NameError: + except AttributeError: # 2.4 return lambda buf: struct.unpack(fmt)