[PATCH stable] tests: fix test-parseindex2.py when run with --pure

Bryan O'Sullivan bos at serpentine.com
Fri May 11 04:32:33 CDT 2012


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1336728746 25200
# Node ID bac1daa1de7118e145a670dec14a134a7d9ed8f4
# Parent  b54e33799c913b38c9d262d92f8714d18e93525d
tests: fix test-parseindex2.py when run with --pure

diff -r b54e33799c91 -r bac1daa1de71 tests/test-parseindex2.py
--- a/tests/test-parseindex2.py	Fri May 11 02:19:15 2012 -0700
+++ b/tests/test-parseindex2.py	Fri May 11 02:32:26 2012 -0700
@@ -114,8 +114,12 @@
     for i, r in enumerate(ix):
         if r[7] == nullid:
             i = -1
-        if ix[r[7]] != i:
-            print 'Reverse lookup inconsistent for %r' % r[7].encode('hex')
+        try:
+            if ix[r[7]] != i:
+                print 'Reverse lookup inconsistent for %r' % r[7].encode('hex')
+        except TypeError:
+            # pure version doesn't support this
+            break
 
     print "done"
 


More information about the Mercurial-devel mailing list