Rev 418: Remove tests for lightweight .bzr checkouts of Subversion branches. This doesn't work with in file:///home/jelmer/bzr-svn/0.3/

Jelmer Vernooij jelmer at samba.org
Sun Mar 11 01:59:32 GMT 2007


At file:///home/jelmer/bzr-svn/0.3/

------------------------------------------------------------
revno: 418
revision-id: jelmer at samba.org-20070311015848-s4599kx059ggwd6s
parent: jelmer at samba.org-20070311015822-bnsnpxp4i6fbk56d
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.3
timestamp: Sun 2007-03-11 02:58:48 +0100
message:
  Remove tests for lightweight .bzr checkouts of Subversion branches. This doesn't work with 
  dirstate (and doesn't have to, anyway)
modified:
  tests/test_commit.py           test_commit.py-20060624213521-l5kcufywkh9mnilk-1
=== modified file 'tests/test_commit.py'
--- a/tests/test_commit.py	2007-01-09 04:25:01 +0000
+++ b/tests/test_commit.py	2007-03-11 01:58:48 +0000
@@ -18,6 +18,7 @@
 from bzrlib.bzrdir import BzrDir, BzrDirFormat
 from bzrlib.errors import DivergedBranches
 from bzrlib.inventory import Inventory
+from bzrlib.trace import mutter
 from bzrlib.workingtree import WorkingTree
 
 import os
@@ -82,113 +83,6 @@
         self.assertEqual("some-ghost-revision\n", 
                 self.client_get_prop(repos_url, "bzr:merge", 1))
 
-class TestCommitFromBazaar(TestCaseWithSubversionRepository):
-    def setUp(self):
-        super(TestCommitFromBazaar, self).setUp()
-        self.repos_url = self.make_repository('d')
-        source = BzrDir.open("svn+"+self.repos_url)
-        os.mkdir('dc')
-        self.checkout = BzrDirFormat.get_default_format().initialize('dc')
-        BranchReferenceFormat().initialize(self.checkout, source.open_branch())
-
-    def test_simple_commit(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/bla': "data"})
-        wt.add('bla')
-        wt.commit(message='commit from Bazaar')
-        self.assertNotEqual(None, wt.branch.last_revision())
-
-    def test_commit_executable(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/bla': "data"})
-        wt.add('bla')
-        os.chmod(os.path.join(self.test_dir, 'dc', 'bla'), 0755)
-        wt.commit(message='commit from Bazaar')
-
-        inv = wt.branch.repository.get_inventory(wt.branch.last_revision())
-        self.assertTrue(inv[inv.path2id("bla")].executable)
-
-    def test_commit_symlink(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/bla': "data"})
-        wt.add('bla')
-        os.symlink('bla', 'dc/foo')
-        wt.add('foo')
-        wt.commit(message='commit from Bazaar')
-
-        inv = wt.branch.repository.get_inventory(wt.branch.last_revision())
-        self.assertEqual('symlink', inv[inv.path2id("foo")].kind)
-        self.assertEqual('bla', inv[inv.path2id("foo")].symlink_target)
-
-    def test_commit_remove_executable(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/bla': "data"})
-        wt.add('bla')
-        os.chmod(os.path.join(self.test_dir, 'dc', 'bla'), 0755)
-        wt.commit(message='commit from Bazaar')
-
-        os.chmod(os.path.join(self.test_dir, 'dc', 'bla'), 0644)
-        wt.commit(message='remove executable')
-
-        inv = wt.branch.repository.get_inventory(wt.branch.last_revision())
-        self.assertFalse(inv[inv.path2id("bla")].executable)
-
-    def test_commit_parents(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/foo/bla': "data", 'dc/bla': "otherdata"})
-        wt.add('bla')
-        wt.commit(message="data")
-        wt.add('foo')
-        wt.add('foo/bla')
-        self.assertTrue(wt.inventory.has_filename("bla"))
-        self.assertTrue(wt.inventory.has_filename("foo/bla"))
-        wt.set_pending_merges(["some-ghost-revision"])
-        wt.commit(message="data")
-        self.assertEqual([
-            wt.branch.generate_revision_id(1),
-            "some-ghost-revision"],
-            wt.branch.repository.revision_parents(wt.branch.last_revision()))
-        self.assertEqual("some-ghost-revision\n", 
-                self.client_get_prop(self.repos_url, "bzr:merge", 2))
-
-    def test_commit_fileids(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/file': 'data'})
-        wt.add('file')
-        wt.commit(message="Commit from Bzr")
-        self.assertEqual("file\t%s\n" % wt.inventory.path2id("file"), 
-                self.client_get_prop(self.repos_url, "bzr:file-ids", 1))
-
-    def test_commit_fileids_added(self):
-    
-        rev = svn.core.svn_opt_revision_t()
-        rev.kind = svn.core.svn_opt_revision_head
-
-        svn.client.checkout2(self.repos_url, "db", 
-                rev, rev, True, False, self.client_ctx)
-
-        self.build_tree({'dc/file1': 'data', 'db/file2': "otherdata"})
-        self.client_add("db/file2")
-        self.client_commit("db", "amesg")
-        branch = Branch.open(self.repos_url)
-        inv = branch.repository.get_inventory(branch.last_revision())
-        wt = self.checkout.create_workingtree()
-        self.assertEqual(wt.inventory.root.file_id, inv.root.file_id)
-        wt.add('file1')
-        wt.commit(message="Commit from Bzr")
-        self.assertEqual("file1\t%s\n" % wt.inventory.path2id("file1"), 
-                self.client_get_prop(self.repos_url, "bzr:file-ids", 2))
-
-    def test_commit_branchnick(self):
-        wt = self.checkout.create_workingtree()
-        self.build_tree({'dc/foo/bla': "data", 'dc/bla': "otherdata"})
-        wt.add('bla')
-        wt.commit(message="data")
-        wt.add('foo')
-        wt.add('foo/bla')
-        wt.commit(message="data", revprops={"branch-nick": "mybranch"})
-        self.assertEqual("mybranch", 
-                self.client_get_prop(self.repos_url, "bzr:revprop:branch-nick", 2))
 
 class TestPush(TestCaseWithSubversionRepository):
     def setUp(self):




More information about the bazaar-commits mailing list