Sean Farley  committed 9ec3c2e

util: banish pickle to compathacks

  • Participants
  • Parent commits d1bd522
  • Branches default

Comments (0)

Files changed (2)

File hgsubversion/

         return set(repo.branchmap())
     except AttributeError:
         return set(repo.branchtags())
+def pickle_load(f):
+    import cPickle as pickle
+    return pickle.load(f)

File hgsubversion/

-import cPickle as pickle
+import compathacks
 import errno
 import re
 import os
     except ValueError:
         # Ok, JSON couldn't be loaded, so we'll try the old way of using pickle
-        data = pickle.load(f)
+        data = compathacks.pickle_load(f)
         # convert the file to json immediately