Rev 1000: Fix some more tests. in file:///data/jelmer/bzr-svn/pyrex/
Jelmer Vernooij
jelmer at samba.org
Mon Mar 17 20:59:08 GMT 2008
At file:///data/jelmer/bzr-svn/pyrex/
------------------------------------------------------------
revno: 1000
revision-id:jelmer at samba.org-20080317205903-a4xf0yc3x6ar87sy
parent: jelmer at samba.org-20080317202554-e17epip0mphf3fyq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Mon 2008-03-17 21:59:03 +0100
message:
Fix some more tests.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
tests/test_commit.py test_commit.py-20060624213521-l5kcufywkh9mnilk-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'commit.py'
--- a/commit.py 2008-03-16 13:40:27 +0000
+++ b/commit.py 2008-03-17 20:59:03 +0000
@@ -324,7 +324,7 @@
elif self.new_inventory[child_ie.file_id].revision is None:
self.mutter('open dir %r' % new_child_path)
- child_editor = self.editor.open_directory(
+ child_editor = dir_editor.open_directory(
urlutils.join(self.branch.get_branch_path(), new_child_path),
self.base_revnum)
else:
=== modified file 'tests/test_commit.py'
--- a/tests/test_commit.py 2008-03-17 20:25:54 +0000
+++ b/tests/test_commit.py 2008-03-17 20:59:03 +0000
@@ -146,10 +146,10 @@
wt.rename_one("foo", "bar")
wt.commit(message="doe")
paths = self.client_log("dc", 2, 0)[2][0]
- self.assertEquals('D', paths["/foo"].action)
- self.assertEquals('A', paths["/bar"].action)
- self.assertEquals('/foo', paths["/bar"].copyfrom_path)
- self.assertEquals(1, paths["/bar"].copyfrom_rev)
+ self.assertEquals('D', paths["/foo"][0])
+ self.assertEquals('A', paths["/bar"][0])
+ self.assertEquals('/foo', paths["/bar"][1])
+ self.assertEquals(1, paths["/bar"][2])
self.assertEquals("bar\t%s\n" % oldid,
self.client_get_prop(repos_url, "bzr:file-ids", 2))
@@ -164,10 +164,10 @@
self.assertTrue(wt.has_filename("bar"))
wt.commit(message="doe")
paths = self.client_log("dc", 2, 0)[2][0]
- self.assertEquals('D', paths["/adir/foo"].action)
- self.assertEquals('A', paths["/bar"].action)
- self.assertEquals('/adir/foo', paths["/bar"].copyfrom_path)
- self.assertEquals(1, paths["/bar"].copyfrom_rev)
+ self.assertEquals('D', paths["/adir/foo"][0])
+ self.assertEquals('A', paths["/bar"][0])
+ self.assertEquals('/adir/foo', paths["/bar"][1])
+ self.assertEquals(1, paths["/bar"][2])
def test_commit_revision_id(self):
repos_url = self.make_client('d', 'dc')
@@ -400,10 +400,10 @@
wt.commit(message="doe")
self.olddir.open_branch().pull(self.newdir.open_branch())
paths = self.client_log(self.repos_url, 3, 0)[3][0]
- self.assertEquals('D', paths["/vla"].action)
- self.assertEquals('A', paths["/bar"].action)
- self.assertEquals('/vla', paths["/bar"].copyfrom_path)
- self.assertEquals(2, paths["/bar"].copyfrom_rev)
+ self.assertEquals('D', paths["/vla"][0])
+ self.assertEquals('A', paths["/bar"][0])
+ self.assertEquals('/vla', paths["/bar"][1])
+ self.assertEquals(2, paths["/bar"][2])
def test_commit_rename_file_from_directory(self):
wt = self.newdir.open_workingtree()
@@ -418,10 +418,10 @@
self.olddir.open_branch().pull(self.newdir.open_branch())
paths = self.client_log(self.repos_url, 3, 0)[3][0]
mutter('paths %r' % paths)
- self.assertEquals('D', paths["/adir/foo"].action)
- self.assertEquals('A', paths["/bar"].action)
- self.assertEquals('/adir/foo', paths["/bar"].copyfrom_path)
- self.assertEquals(2, paths["/bar"].copyfrom_rev)
+ self.assertEquals('D', paths["/adir/foo"][0])
+ self.assertEquals('A', paths["/bar"][0])
+ self.assertEquals('/adir/foo', paths["/bar"][1])
+ self.assertEquals(2, paths["/bar"][2])
def test_commit_remove(self):
wt = self.newdir.open_workingtree()
@@ -433,7 +433,7 @@
self.olddir.open_branch().pull(self.newdir.open_branch())
paths = self.client_log(self.repos_url, 3, 0)[3][0]
mutter('paths %r' % paths)
- self.assertEquals('D', paths["/foob"].action)
+ self.assertEquals('D', paths["/foob"][0])
def test_commit_rename_remove_parent(self):
wt = self.newdir.open_workingtree()
@@ -447,10 +447,10 @@
self.olddir.open_branch().pull(self.newdir.open_branch())
paths = self.client_log(self.repos_url, 3, 0)[3][0]
mutter('paths %r' % paths)
- self.assertEquals('D', paths["/adir"].action)
- self.assertEquals('A', paths["/bar"].action)
- self.assertEquals('/adir/foob', paths["/bar"].copyfrom_path)
- self.assertEquals(2, paths["/bar"].copyfrom_rev)
+ self.assertEquals('D', paths["/adir"][0])
+ self.assertEquals('A', paths["/bar"][0])
+ self.assertEquals('/adir/foob', paths["/bar"][1])
+ self.assertEquals(2, paths["/bar"][2])
def test_commit_remove_nested(self):
wt = self.newdir.open_workingtree()
@@ -463,7 +463,7 @@
self.olddir.open_branch().pull(self.newdir.open_branch())
paths = self.client_log(self.repos_url, 3, 0)[3][0]
mutter('paths %r' % paths)
- self.assertEquals('D', paths["/adir/foob"].action)
+ self.assertEquals('D', paths["/adir/foob"][0])
class TestPushNested(TestCaseWithSubversionRepository):
=== modified file 'tests/test_convert.py'
--- a/tests/test_convert.py 2008-03-16 04:31:39 +0000
+++ b/tests/test_convert.py 2008-03-17 20:59:03 +0000
@@ -51,10 +51,9 @@
PROPS-END
""")
load_dumpfile(dumpfile, "d")
- repos = repos.Repository("d")
- fs = repos.fs()
+ r = repos.Repository("d")
self.assertEqual("6987ef2d-cd6b-461f-9991-6f1abef3bd59",
- svn.fs.get_uuid(fs))
+ r.fs().get_uuid())
def test_loaddumpfile_invalid(self):
dumpfile = os.path.join(self.test_dir, "dumpfile")
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-03-17 20:25:54 +0000
+++ b/workingtree.py 2008-03-17 20:59:03 +0000
@@ -151,7 +151,7 @@
adm = self._get_wc(write_lock=True)
try:
for file in files:
- adm.delete(self.abspath(file), None, None, None)
+ adm.delete(self.abspath(file))
finally:
adm.close()
@@ -180,7 +180,7 @@
to_wc.close()
try:
from_wc = self._get_wc(write_lock=True)
- from_wc.delete(self.abspath(entry), None, None, None)
+ from_wc.delete(self.abspath(entry))
finally:
from_wc.close()
new_name = urlutils.join(to_dir, os.path.basename(entry))
@@ -200,8 +200,8 @@
(from_wc, _) = self._get_rel_wc(from_rel, write_lock=True)
from_id = self.inventory.path2id(from_rel)
try:
- to_wc.copy(self.abspath(from_rel), to_file, None, None)
- from_wc.delete(self.abspath(from_rel), None, None, None)
+ to_wc.copy(self.abspath(from_rel), to_file)
+ from_wc.delete(self.abspath(from_rel))
finally:
to_wc.close()
self._change_fileid_mapping(None, from_rel)
More information about the bazaar-commits
mailing list