Rev 1775: Fix more tests. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Tue Sep 2 02:00:44 BST 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1775
revision-id: jelmer at samba.org-20080902010035-e6xuyyiywyun5aht
parent: jelmer at samba.org-20080902002700-u5ycoktrqlh50bz3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Tue 2008-09-02 03:00:35 +0200
message:
Fix more tests.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
tests/test_logwalker.py test_logwalker.py-20060622141944-pkocc3rj8g62ukbi-1
tests/test_push.py test_push.py-20070201165715-g2ievcdfqi33wqsy-1
tests/test_repository.py test_repos.py-20060508151940-ddc49a59257ca712
=== modified file '__init__.py'
--- a/__init__.py 2008-09-02 00:27:00 +0000
+++ b/__init__.py 2008-09-02 01:00:35 +0000
@@ -30,9 +30,9 @@
For more information about bzr-svn, see the bzr-svn FAQ.
"""
-import bzrlib, bzrlib.repository
-from bzrlib import log
-from bzrlib.bzrdir import BzrDirFormat, format_registry
+import bzrlib
+from bzrlib import bzrdir, log, repository
+from bzrlib.bzrdir import BzrDirFormat
from bzrlib.errors import BzrError
from bzrlib.commands import Command, register_command, display_command
from bzrlib.help_topics import topic_registry
@@ -128,7 +128,7 @@
check_subversion_version()
-from bzrlib.plugins.svn import format, revspec, repository
+from bzrlib.plugins.svn import format, revspec
register_transport_proto('svn+ssh://',
help="Access using the Subversion smart server tunneled over SSH.")
@@ -150,14 +150,13 @@
BzrDirFormat.register_control_format(format.SvnRemoteFormat)
BzrDirFormat.register_control_format(format.SvnWorkingTreeDirFormat)
-format_registry.register("subversion", format.SvnRemoteFormat,
+bzrdir.format_registry.register("subversion", format.SvnRemoteFormat,
"Subversion repository. ",
native=False)
-format_registry.register("subversion-wc", format.SvnWorkingTreeDirFormat,
+bzrdir.format_registry.register("subversion-wc", format.SvnWorkingTreeDirFormat,
"Subversion working copy. ",
native=False, hidden=True)
SPEC_TYPES.append(revspec.RevisionSpec_svn)
-bzrlib.repository.SvnRepositoryFormat = repository.SvnRepositoryFormat
log.properties_handler_registry.register_lazy("subversion",
"bzrlib.plugins.svn.log",
=== modified file 'tests/test_logwalker.py'
--- a/tests/test_logwalker.py 2008-09-01 23:30:56 +0000
+++ b/tests/test_logwalker.py 2008-09-02 01:00:35 +0000
@@ -423,31 +423,6 @@
'trunk/afile': ('A', None, -1),
'trunk': (u'A', None, -1)}, 1)], items)
- def test_get_previous_root(self):
- repos_url = self.make_repository("a")
-
- walker = self.get_log_walker(transport=SvnRaTransport(repos_url))
-
- self.assertEqual((None, -1), walker.get_previous("", 0))
-
- def test_get_previous_simple(self):
- repos_url = self.make_repository("a")
-
- cb = self.get_commit_editor(repos_url)
- t = cb.add_dir("trunk")
- t.add_file("trunk/file").modify()
- cb.close()
-
- cb = self.get_commit_editor(repos_url)
- t = cb.open_dir("trunk")
- t.add_file("trunk/afile").modify()
- t.change_prop("myprop", "mydata")
- cb.close()
-
- walker = self.get_log_walker(transport=SvnRaTransport(repos_url))
-
- self.assertEqual(("trunk", 1), walker.get_previous("trunk", 2))
-
def test_find_children_empty(self):
repos_url = self.make_repository("a")
@@ -660,14 +635,3 @@
self.cache.insert_path(42, "foo", "A")
self.assertEquals(42, self.cache.find_latest_change("foo", 42))
self.assertEquals(42, self.cache.find_latest_change("foo", 45))
-
- def test_changes_path(self):
- self.cache.insert_path(42, "foo", "A")
- self.assertTrue(self.cache.changes_path("foo", 42))
- self.assertFalse(self.cache.changes_path("foo", 41))
-
- def test_path_added(self):
- self.cache.insert_path(42, "foo", "A")
- self.assertEquals(42, self.cache.path_added("foo", 41, 43))
- self.assertEquals(None, self.cache.path_added("foo", 42, 43))
- self.assertEquals(None, self.cache.path_added("foo", 44, 49))
=== modified file 'tests/test_push.py'
--- a/tests/test_push.py 2008-08-30 23:45:11 +0000
+++ b/tests/test_push.py 2008-09-02 01:00:35 +0000
@@ -616,7 +616,7 @@
self.assertTrue(os.path.exists("bzrco1/bar2.txt"))
wt1.branch.push(Branch.open(repos_url+"/trunk"))
r = Repository.open(repos_url)
- props = r.branchprop_list.get_changed_properties("trunk", 3)
+ props = r._revmeta("trunk", 3).get_changed_fileprops()
self.assertEquals(props['bzr:text-parents'], 'bar2.txt\tside1\n')
os.mkdir("cpy")
=== modified file 'tests/test_repository.py'
--- a/tests/test_repository.py 2008-08-31 15:16:11 +0000
+++ b/tests/test_repository.py 2008-09-02 01:00:35 +0000
@@ -137,7 +137,7 @@
self.assertEqual([
('', {'foo': ('A', None, -1)}, 1),
('', {'': ('A', None, -1)}, 0)],
- [(l.branch_path, l.paths, l.revnum) for l in repos.iter_reverse_branch_changes("", 1, 0, repos.get_mapping())])
+ [(l.branch_path, l.get_paths(), l.revnum) for l in repos.iter_reverse_branch_changes("", 1, 0, repos.get_mapping())])
def test_iter_changes_parent_rename(self):
repos_url = self.make_repository("a")
@@ -234,7 +234,7 @@
self.client_update("dc")
self.client_commit("dc", "commit")
repos = Repository.open(repos_url)
- results = [(l.branch_path, l.paths, l.revnum) for l in repos.iter_reverse_branch_changes("pygments/trunk", 3, 0, TrunkBranchingScheme(1))]
+ results = [(l.branch_path, l.get_paths(), l.revnum) for l in repos.iter_reverse_branch_changes("pygments/trunk", 3, 0, TrunkBranchingScheme(1))]
# Results differ per Subversion version, yay
# For <= 1.4:
@@ -276,7 +276,7 @@
self.assertEquals([('pygments',
{'pygments/bla': ('A', None, -1), 'pygments': ('A', None, -1)},
2)],
- [(l.branch_path, l.paths, l.revnum) for l in changes])
+ [(l.branch_path, l.get_paths(), l.revnum) for l in changes])
def test_history_all(self):
repos_url = self.make_repository("a")
@@ -1119,7 +1119,7 @@
self.assertEquals([('trunk', {'trunk': (u'M', None, -1)}, 3),
('trunk', {'trunk': (u'M', None, -1)}, 2),
('trunk', {'trunk/bla': (u'A', None, -1), 'trunk': (u'A', None, -1)}, 1)],
- [(l.branch_path, l.paths, l.revnum) for l in oldrepos.iter_reverse_branch_changes("trunk", 3, 0, TrunkBranchingScheme())])
+ [(l.branch_path, l.get_paths(), l.revnum) for l in oldrepos.iter_reverse_branch_changes("trunk", 3, 0, TrunkBranchingScheme())])
def test_control_code_msg(self):
if ra.version()[1] >= 5:
More information about the bazaar-commits
mailing list