changeset 1185:65ca78ac2ee1

svncommands: use meta.lastpulled instead of revmap.youngest
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:44 -0500
parents 43384d2782dc
children f9650d24464a
files hgsubversion/svncommands.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -66,10 +66,13 @@ def _buildmeta(ui, repo, args, partial=F
     startrev = 0
     sofar = []
     branchinfo = {}
-    youngestpath = os.path.join(meta.metapath, 'lastpulled')
     if partial:
         try:
+            # we can't use meta.lastpulled here because we are bootstraping the
+            # lastpulled and want to keep the cached value on disk during a
+            # partial rebuild
             foundpartialinfo = False
+            youngestpath = os.path.join(meta.metapath, 'lastpulled')
             if os.path.exists(youngestpath):
                 youngest = util.load(youngestpath)
                 sofar = list(maps.RevMap.readmapfile(meta.revmap_file))
@@ -137,7 +140,7 @@ def _buildmeta(ui, repo, args, partial=F
             else:
                 closed.add(parentctx.rev())
 
-    util.dump(youngest, youngestpath)
+    meta.lastpulled = youngest
     ui.progress('prepare', None, total=numrevs)
 
     for rev in xrange(startrev, len(repo)):