convert: export revmap to source.

Sources may be able to use it to optimise their own log fetching
This commit is contained in:
Brendan Cully 2007-07-05 12:24:26 -07:00
parent 6209ccf2e8
commit 39cf515050
2 changed files with 6 additions and 0 deletions

View File

@ -216,6 +216,7 @@ class convert(object):
def convert(self):
try:
self.source.setrevmap(self.map)
self.ui.status("scanning source...\n")
heads = self.source.getheads()
parents = self.walktree(heads)

View File

@ -22,6 +22,11 @@ class converter_source(object):
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"""