# HG changeset patch # User Sean Farley # Date 1392451210 21600 # Node ID 6e4892b6628a14608e8515c9cd3fcb021bf25b40 # Parent 5a0da3bab8a2bec41655f8ff875ed9e187372e21 util: serialize data with json instead of pickle diff --git a/hgsubversion/util.py b/hgsubversion/util.py --- a/hgsubversion/util.py +++ b/hgsubversion/util.py @@ -170,13 +170,13 @@ def _convert(input, visitor): 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):