Rev 1752: Add test for #274689 which was apparently already fixed. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Mon Nov 10 00:07:39 GMT 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1752
revision-id: jelmer at samba.org-20081110000730-43y0x4za1st25p7n
parent: jelmer at samba.org-20081109213654-h0bkcj0a4e3qujxz
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-11-10 01:07:30 +0100
message:
Add test for #274689 which was apparently already fixed.
modified:
tests/test_workingtree.py test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
=== modified file 'tests/test_workingtree.py'
--- a/tests/test_workingtree.py 2008-08-31 23:16:30 +0000
+++ b/tests/test_workingtree.py 2008-11-10 00:07:30 +0000
@@ -19,13 +19,16 @@
from bzrlib.branch import Branch
from bzrlib.bzrdir import BzrDir
-from bzrlib.errors import NoSuchFile, OutOfDateTree
+from bzrlib.errors import NoSuchFile, OutOfDateTree, NotBranchError
from bzrlib.inventory import Inventory
from bzrlib.osutils import has_symlinks, supports_executable
+from bzrlib.repository import Repository
from bzrlib.tests import KnownFailure, TestCase
from bzrlib.trace import mutter
from bzrlib.workingtree import WorkingTree
+from bzrlib.plugins.svn.mapping3 import config_set_scheme
+from bzrlib.plugins.svn.mapping3.scheme import TrunkBranchingScheme
from bzrlib.plugins.svn.transport import svn_config
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.plugins.svn.workingtree import generate_ignore_list
@@ -65,6 +68,20 @@
self.assertIsInstance(inv, Inventory)
self.assertTrue(inv.has_filename(u"I²C"))
+ def test_not_branch_path(self):
+ repos_url = self.make_client('a', 'dc')
+ self.build_tree({"dc/trunk/file": "data"})
+ self.client_add("dc/trunk")
+ self.client_commit("dc", "initial")
+ self.client_update("dc")
+ self.build_tree({"dc/trunk/dir": None})
+ self.client_add("dc/trunk/dir")
+ config_set_scheme(Repository.open(repos_url), TrunkBranchingScheme(0),
+ None, True)
+ self.assertRaises(NotBranchError, WorkingTree.open, "dc")
+ self.assertRaises(NotBranchError, WorkingTree.open, "dc/trunk/dir")
+ tree = WorkingTree.open("dc/trunk")
+
def test_smart_add_file(self):
self.make_client('a', 'dc')
self.build_tree({"dc/bl": "data"})
More information about the bazaar-commits
mailing list