changeset 1130:ed4804ee68c4

svnmeta: use util.load instead of bare pickle
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 23 Aug 2013 10:58:03 -0500
parents 063cae4e35af
children a44b65337f2f
files hgsubversion/svnmeta.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -1,4 +1,3 @@
-import cPickle as pickle
 import posixpath
 import os
 import tempfile
@@ -40,11 +39,7 @@ class SVNMeta(object):
         tagmap = util.configpath(self.ui, 'tagmap')
         filemap = util.configpath(self.ui, 'filemap')
 
-        self.branches = {}
-        if os.path.exists(self.branch_info_file):
-            f = open(self.branch_info_file)
-            self.branches = pickle.load(f)
-            f.close()
+        self.branches = util.load(self.branch_info_file) or {}
         self.prevbranches = dict(self.branches)
         self.tags = maps.Tags(repo)
         self._layout = layouts.detect.layout_from_file(self.meta_data_dir,