changeset 10086:e388f5ee7bf5 stable

convert: make hg sink cleanup safer
author Matt Mackall <mpm@selenic.com>
date Wed, 16 Dec 2009 16:42:58 -0600
parents 4c844f16bf39
children b1982715c435 f1bf64abcb1b
files hgext/convert/hg.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/hg.py	Fri Dec 11 15:25:33 2009 +0900
+++ b/hgext/convert/hg.py	Wed Dec 16 16:42:58 2009 -0600
@@ -61,8 +61,10 @@
 
     def after(self):
         self.ui.debug('run hg sink post-conversion action\n')
-        self.lock.release()
-        self.wlock.release()
+        if self.lock:
+            self.lock.release()
+        if self.wlock:
+            self.wlock.release()
 
     def revmapfile(self):
         return os.path.join(self.path, ".hg", "shamap")