diff hgsubversion/wrappers.py @ 1434:0a6b3da6d34c

RevMap: move lastpulled from SVNMeta down into RevMap There was a conceptual cycle present between the revmap and the meta object caused by this layering, which is nicely resolved by moving the lastpulled information down into the revmap. RevMap no longer makes use of meta outside the constructor, which is great progress.
author Augie Fackler <raf@durin42.com>
date Sun, 05 Jun 2016 21:18:23 -0400
parents 6ad1755f9e3f
children e0eda6f2c2f2 0991df151799
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -103,7 +103,7 @@ def incoming(orig, ui, repo, origsource=
     meta = repo.svnmeta(svn.uuid, svn.subdir)
 
     ui.status('incoming changes from %s\n' % other.svnurl)
-    svnrevisions = list(svn.revisions(start=meta.lastpulled))
+    svnrevisions = list(svn.revisions(start=meta.revmap.lastpulled))
     if opts.get('newest_first'):
         svnrevisions.reverse()
     # Returns 0 if there are incoming changes, 1 otherwise.
@@ -419,7 +419,7 @@ def pull(repo, source, heads=[], force=F
             meta.branchmap['default'] = meta.branch
 
         ui = repo.ui
-        start = meta.lastpulled
+        start = meta.revmap.lastpulled
 
         if start <= 0:
             # we are initializing a new repository
@@ -512,7 +512,7 @@ def pull(repo, source, heads=[], force=F
         util.swap_out_encoding(old_encoding)
 
     if lastpulled is not None:
-        meta.lastpulled = lastpulled
+        meta.revmap.lastpulled = lastpulled
     revisions = len(meta.revmap) - oldrevisions
 
     if revisions == 0: