--- a/hgext/convert/__init__.py Sat Sep 29 21:10:54 2007 -0700
+++ b/hgext/convert/__init__.py Tue Oct 02 13:46:17 2007 -0700
@@ -235,6 +235,7 @@
def convert(self):
try:
+ self.source.before()
self.dest.before()
self.source.setrevmap(self.map)
self.ui.status("scanning source...\n")
@@ -273,7 +274,10 @@
self.cleanup()
def cleanup(self):
- self.dest.after()
+ try:
+ self.dest.after()
+ finally:
+ self.source.after()
if self.revmapfilefd:
self.revmapfilefd.close()
--- a/hgext/convert/common.py Sat Sep 29 21:10:54 2007 -0700
+++ b/hgext/convert/common.py Tue Oct 02 13:46:17 2007 -0700
@@ -38,6 +38,12 @@
self.encoding = 'utf-8'
+ def before(self):
+ pass
+
+ def after(self):
+ pass
+
def setrevmap(self, revmap):
"""set the map of already-converted revisions"""
pass