# HG changeset patch # User Matt Mackall # Date 2009-12-16 22:42:58 # Node ID e388f5ee7bf5f60a9b7dcc7902bf20300951f0b5 # Parent 4c844f16bf393bbe078766f71d5f3149f0614760 convert: make hg sink cleanup safer diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -61,8 +61,10 @@ class mercurial_sink(converter_sink): 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")