diff hgsubversion/maps.py @ 1182:8f9619a67565

maps: change readmapfile to take a path instead of repo This is a small refactor for an upcoming change that will change map objects to store a svnmeta instead of the repo.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:44 -0500
parents 729becb9154b
children 09b20039192c
line wrap: on
line diff
--- a/hgsubversion/maps.py
+++ b/hgsubversion/maps.py
@@ -231,9 +231,9 @@ class RevMap(dict):
         return os.path.join(repo.path, 'svn', 'rev_map')
 
     @classmethod
-    def readmapfile(cls, repo, missingok=True):
+    def readmapfile(cls, path, missingok=True):
         try:
-            f = open(cls.mappath(repo))
+            f = open(path)
         except IOError, err:
             if not missingok or err.errno != errno.ENOENT:
                 raise
@@ -244,7 +244,7 @@ class RevMap(dict):
         return f
 
     def _load(self):
-        for l in self.readmapfile(self.repo):
+        for l in self.readmapfile(self.path):
             revnum, ha, branch = l.split(' ', 2)
             if branch == '\n':
                 branch = None