Merge lp:~garyvdm/bzr-search/svn_incompatable into lp:bzr-search

Proposed by Gary van der Merwe
Status: Merged
Approved by: Robert Collins
Approved revision: 78
Merged at revision: 78
Proposed branch: lp:~garyvdm/bzr-search/svn_incompatable
Merge into: lp:bzr-search
Diff against target: 26 lines (+7/-2)
1 file modified
index.py (+7/-2)
To merge this branch: bzr merge lp:~garyvdm/bzr-search/svn_incompatable
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+22127@code.launchpad.net

Description of the change

This make bzr-search check for an IncompatibleAPI error when importing bzr-svn so that bzr-search does not break when bzr-svn is incompatible with bzrlib.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

 review: +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'index.py'
--- index.py 2009-11-03 00:12:13 +0000
+++ index.py 2010-03-25 13:24:20 +0000
@@ -27,7 +27,12 @@
27from bzrlib.btree_index import BTreeGraphIndex, BTreeBuilder27from bzrlib.btree_index import BTreeGraphIndex, BTreeBuilder
28from bzrlib.bzrdir import BzrDirMeta128from bzrlib.bzrdir import BzrDirMeta1
29import bzrlib.config29import bzrlib.config
30from bzrlib.errors import NotBranchError, NoSuchFile, UnknownFormatError30from bzrlib.errors import (
31 NotBranchError,
32 NoSuchFile,
33 UnknownFormatError,
34 IncompatibleAPI,
35)
31from bzrlib.index import CombinedGraphIndex, GraphIndex, InMemoryGraphIndex36from bzrlib.index import CombinedGraphIndex, GraphIndex, InMemoryGraphIndex
32from bzrlib.lockdir import LockDir37from bzrlib.lockdir import LockDir
33try:38try:
@@ -190,7 +195,7 @@
190 """195 """
191 try:196 try:
192 from bzrlib.plugins.svn.branch import SvnBranch197 from bzrlib.plugins.svn.branch import SvnBranch
193 except ImportError:198 except (ImportError, IncompatibleAPI):
194 SvnBranch = None199 SvnBranch = None
195 if type(branch) == SvnBranch:200 if type(branch) == SvnBranch:
196 # We can't write to the 'bzrdir' as it is virtual201 # We can't write to the 'bzrdir' as it is virtual

Subscribers

People subscribed via source and target branches

to all changes: