Comments
Patch
@@ -94,8 +94,6 @@
tests/test-minirst.py requires print_function
tests/test-parseindex2.py not using absolute_import
tests/test-parseindex2.py requires print_function
- tests/test-pathencode.py not using absolute_import
- tests/test-pathencode.py requires print_function
tests/test-propertycache.py not using absolute_import
tests/test-propertycache.py requires print_function
tests/test-revlog-ancestry.py not using absolute_import
@@ -5,9 +5,17 @@
# that have proven likely to expose bugs and divergent behavior in
# different encoding implementations.
+from __future__ import absolute_import
from mercurial import store
-import binascii, itertools, math, os, random, sys, time
+import binascii
import collections
+import itertools
+import math
+import os
+import random
+import sys
+import time
+
validchars = set(map(chr, range(0, 256)))
alphanum = range(ord('A'), ord('Z'))
@@ -154,10 +162,10 @@
r = store._hybridencode(p, True) # reference implementation in
Python
if h != r:
if nerrs == 0:
- print >> sys.stderr, 'seed:', hex(seed)[:-1]
- print >> sys.stderr, "\np: '%s'" % p.encode("string_escape")
- print >> sys.stderr, "h: '%s'" % h.encode("string_escape")
- print >> sys.stderr, "r: '%s'" % r.encode("string_escape")
+ print ('seed:', hex(seed)[:-1], file=sys.stderr)
+ print ("\np: '%s'" % p.encode("string_escape"),
file=sys.stderr)
+ print ("h: '%s'" % h.encode("string_escape"), file=sys.stderr)
+ print ("r: '%s'" % r.encode("string_escape"), file=sys.stderr)
nerrs += 1