changeset 17935:9c888b945b65

test-pathencode: make a 2.4-safe import of collections
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 15 Nov 2012 10:55:32 -0800
parents 736f1c09f321
children 95fc4ab324df d587925680d9
files tests/test-pathencode.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-pathencode.py	Thu Nov 15 10:04:29 2012 -0800
+++ b/tests/test-pathencode.py	Thu Nov 15 10:55:32 2012 -0800
@@ -8,7 +8,7 @@
 from mercurial import parsers
 from mercurial import store
 import binascii, itertools, math, os, random, sys, time
-from collections import defaultdict
+import collections
 
 def hybridencode(path):
     return store._hybridencode(path, True)
@@ -41,7 +41,7 @@
     '''Construct and print a table of probabilities for path name
     components.  The numbers are percentages.'''
 
-    counts = defaultdict(lambda: 0)
+    counts = collections.defaultdict(lambda: 0)
     for line in os.popen(cmd).read().splitlines():
         if line[-2:] in ('.i', '.d'):
             line = line[:-2]