Mercurial > public > mercurial-scm > hg
comparison tests/test-pathencode.py @ 18435:8c019d2fd7c0
store: switch to C-based hashed path encoding
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Wed, 12 Dec 2012 13:09:37 -0800 |
parents | acfc6fab1361 |
children | ff1586a3adc5 9778c77f05d6 |
comparison
equal
deleted
inserted
replaced
18434:3807ec0c6bba | 18435:8c019d2fd7c0 |
---|---|
152 yield makepath(rng, x, y) | 152 yield makepath(rng, x, y) |
153 | 153 |
154 def runtests(rng, seed, count): | 154 def runtests(rng, seed, count): |
155 nerrs = 0 | 155 nerrs = 0 |
156 for p in genpath(rng, count): | 156 for p in genpath(rng, count): |
157 h = store._dothybridencode(p) # uses C implementation, if available | 157 h = store._pathencode(p) # uses C implementation, if available |
158 r = store._hybridencode(p, True) # reference implementation in Python | 158 r = store._hybridencode(p, True) # reference implementation in Python |
159 if h != r: | 159 if h != r: |
160 if nerrs == 0: | 160 if nerrs == 0: |
161 print >> sys.stderr, 'seed:', hex(seed)[:-1] | 161 print >> sys.stderr, 'seed:', hex(seed)[:-1] |
162 print >> sys.stderr, "\np: '%s'" % p.encode("string_escape") | 162 print >> sys.stderr, "\np: '%s'" % p.encode("string_escape") |