1. Augie Fackler
  2. hgsubversion

Commits

Sean Farley  committed ed4804e

svnmeta: use util.load instead of bare pickle

  • Participants
  • Parent commits 063cae4
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/svnmeta.py

View file
-import cPickle as pickle
 import posixpath
 import os
 import tempfile
         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,