changeset 1142:f4a32d381e03

util: remove all calls to load_string Now that we use json, we no longer need to load strings differently from any other serialized data.
author Sean Farley <sean.michael.farley@gmail.com>
date Sat, 15 Feb 2014 10:45:51 -0600
parents a4b54b19cd2e
children 166db09962df
files hgsubversion/maps.py hgsubversion/svncommands.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/maps.py
+++ b/hgsubversion/maps.py
@@ -203,8 +203,7 @@ class RevMap(dict):
         # file to svnmeta itself rather than leaving it here.
         # must load youngest file first, or else self._load() can
         # clobber the info
-        _yonngest_str = util.load_string(self.ypath, '0')
-        self._youngest = int(_yonngest_str.strip())
+        self._youngest = util.load(self.ypath, 0)
         self.oldest = 0
         if os.path.isfile(self.path):
             self._load()
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -92,7 +92,7 @@ def _buildmeta(ui, repo, args, partial=F
             youngestpath = os.path.join(svnmetadir, 'lastpulled')
             foundpartialinfo = False
             if os.path.exists(youngestpath):
-                youngest = int(util.load_string(youngestpath).strip())
+                youngest = util.load(youngestpath)
                 sofar = list(maps.RevMap.readmapfile(repo))
                 if sofar and len(sofar[-1].split(' ', 2)) > 1:
                     lasthash = sofar[-1].split(' ', 2)[1]