Mercurial > hgsubversion
changeset 1136:6e4892b6628a
util: serialize data with json instead of pickle
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sat, 15 Feb 2014 02:00:10 -0600 |
parents | 5a0da3bab8a2 |
children | ad4cb902593e |
files | hgsubversion/util.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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):