convert: export revmap to source.
authorBrendan Cully <brendan@kublai.com>
Thu, 05 Jul 2007 12:24:26 -0700
changeset 4812 a5209b0487e0
parent 4811 f7c8222920ee
child 4813 1fcdf2fe3d7c
convert: export revmap to source. Sources may be able to use it to optimise their own log fetching
hgext/convert/__init__.py
hgext/convert/common.py
--- a/hgext/convert/__init__.py	Thu Jul 05 12:18:01 2007 -0700
+++ b/hgext/convert/__init__.py	Thu Jul 05 12:24:26 2007 -0700
@@ -216,6 +216,7 @@
 
     def convert(self):
         try:
+            self.source.setrevmap(self.map)
             self.ui.status("scanning source...\n")
             heads = self.source.getheads()
             parents = self.walktree(heads)
--- a/hgext/convert/common.py	Thu Jul 05 12:18:01 2007 -0700
+++ b/hgext/convert/common.py	Thu Jul 05 12:24:26 2007 -0700
@@ -22,6 +22,11 @@
         self.rev = rev
 
         self.encoding = 'utf-8'
+        self.revmap = {}
+
+    def setrevmap(self, revmap):
+        """set the map of already-converted revisions"""
+        self.revmap = revmap
 
     def getheads(self):
         """Return a list of this repository's heads"""