hgext/convert/bzr.py
changeset 8046 f3ef8a352d83
parent 8037 ffbebfb6b8d4
parent 8045 e09a2f2ef85d
child 8127 17ab4dab50a6
--- a/hgext/convert/bzr.py	Sat Apr 11 00:13:18 2009 +0200
+++ b/hgext/convert/bzr.py	Sat Apr 11 20:49:47 2009 +0200
@@ -21,6 +21,8 @@
 except ImportError:
     pass
 
+supportedkinds = ('file', 'symlink')
+
 class bzr_source(converter_source):
     """Reads Bazaar repositories by using the Bazaar Python libraries"""
 
@@ -71,7 +73,7 @@
     def getfile(self, name, rev):
         revtree = self.sourcerepo.revision_tree(rev)
         fileid = revtree.path2id(name)
-        if fileid is None:
+        if fileid is None or revtree.kind(fileid) not in supportedkinds:
             # the file is not available anymore - was deleted
             raise IOError(_('%s is not available in %s anymore') %
                     (name, rev))