1. Augie Fackler
  2. hgsubversion

Commits

Sean Farley  committed 6e4892b

util: serialize data with json instead of pickle

  • Participants
  • Parent commits 5a0da3b
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/util.py

View file
     return input
 
 def dump(data, file_path):
-    """pickle some data to a path atomically.
+    """Serialize some data to a path atomically.
 
     This is present because I kept corrupting my revmap by managing to hit ^C
-    during the pickle of that file.
+    during the serialization of that file.
     """
     f = hgutil.atomictempfile(file_path, 'w+b', 0644)
-    pickle.dump(data, f)
+    json.dump(_convert(data, _scrub), f)
     f.close()
 
 def load(file_path):