changeset 49947:43bfddcba7d6 stable

convert: brz 3.3.0 moved NoSuchFile exception to breezy.transport
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 25 Jan 2023 17:52:00 +0400
parents 76c128d4de4e
children 37de1a154472
files hgext/convert/bzr.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/bzr.py	Tue Dec 06 15:11:51 2022 +0100
+++ b/hgext/convert/bzr.py	Wed Jan 25 17:52:00 2023 +0400
@@ -41,6 +41,12 @@
     revision = breezy.revision
     revisionspec = breezy.revisionspec
     revisionspec.RevisionSpec
+
+    try:
+        # brz 3.3.0 (revno: 7614.2.2)
+        from breezy.transport import NoSuchFile
+    except ImportError:
+        from breezy.errors import NoSuchFile
 except ImportError:
     pass
 
@@ -150,7 +156,7 @@
 
         try:
             kind = revtree.kind(name)
-        except breezy.errors.NoSuchFile:
+        except NoSuchFile:
             return None, None
         if kind not in supportedkinds:
             # the file is not available anymore - was deleted