Rev 2451: Fix test_upgrade defects related to non local or absent working trees. in http://bazaar.launchpad.net/~bzr/bzr/dirstate

Robert Collins robertc at robertcollins.net
Tue Mar 6 01:16:02 GMT 2007


At http://bazaar.launchpad.net/~bzr/bzr/dirstate

------------------------------------------------------------
revno: 2451
revision-id: robertc at robertcollins.net-20070306011508-6ncdgqqlxb84esmr
parent: robertc at robertcollins.net-20070306005352-axjk5vdian1wnyx9
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate.dogfood
timestamp: Tue 2007-03-06 12:15:08 +1100
message:
  Fix test_upgrade defects related to non local or absent working trees.
modified:
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/tests/test_upgrade.py   test_upgrade.py-20051004040251-555fe1d2bae1bc71
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2007-03-05 09:11:33 +0000
+++ b/bzrlib/bzrdir.py	2007-03-06 01:15:08 +0000
@@ -1069,7 +1069,7 @@
                               format.workingtree_format.__class__):
                 # the workingtree needs an upgrade.
                 return True
-        except errors.NotBranchError:
+        except (errors.NoWorkingTree, errors.NotLocalUrl):
             pass
         return False
 
@@ -2082,7 +2082,7 @@
                 branch_converter.convert(branch)
         try:
             tree = self.bzrdir.open_workingtree()
-        except errors.NotBranchError:
+        except (errors.NoWorkingTree, errors.NotLocalUrl):
             pass
         else:
             # TODO: conversions of Branch and Tree should be done by

=== modified file 'bzrlib/tests/test_upgrade.py'
--- a/bzrlib/tests/test_upgrade.py	2007-03-05 09:11:33 +0000
+++ b/bzrlib/tests/test_upgrade.py	2007-03-06 01:15:08 +0000
@@ -169,7 +169,7 @@
         branch.set_parent('file:///EF')
         branch.set_bound_location('file:///GH')
         branch.set_push_location('file:///IJ')
-        target = bzrdir.format_registry.make_bzrdir('experimental-branch6')
+        target = bzrdir.format_registry.make_bzrdir('dirstate-with-subtree')
         converter = branch.bzrdir._format.get_converter(target)
         converter.convert(branch.bzrdir, progress.DummyProgress())
         new_branch = _mod_branch.Branch.open(self.get_url('branch'))



More information about the bazaar-commits mailing list