# HG changeset patch # User Sean Farley # Date 1377273483 18000 # Node ID ed4804ee68c41d20ee378a8f2e7c0c9f135a1254 # Parent 063cae4e35af9b095d98771d0429e00885622a69 svnmeta: use util.load instead of bare pickle diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- 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,