Rev 1290: Cope with new get_log API. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4
Jelmer Vernooij
jelmer at samba.org
Sun Jun 22 23:44:41 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4
------------------------------------------------------------
revno: 1290
revision-id: jelmer at samba.org-20080622224440-9pvj22asefpw38yg
parent: jelmer at samba.org-20080622224431-u6ro2nqm89vnh0ab
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-06-23 00:44:40 +0200
message:
Cope with new get_log API.
modified:
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_ra.py test_ra.py-20080313141743-uzsm7ejitrlqone5-1
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py 2008-06-22 08:51:56 +0000
+++ b/tests/__init__.py 2008-06-22 22:44:40 +0000
@@ -165,7 +165,7 @@
def client_log(self, path, start_revnum=None, stop_revnum=None):
assert isinstance(path, str)
ret = {}
- def rcvr(orig_paths, rev, revprops):
+ def rcvr(orig_paths, rev, revprops, has_children):
ret[rev] = (orig_paths, revprops.get(properties.PROP_REVISION_AUTHOR), revprops.get(properties.PROP_REVISION_DATE), revprops.get(properties.PROP_REVISION_LOG))
self.client_ctx.log([path], rcvr, None, self.revnum_to_opt_rev(start_revnum),
self.revnum_to_opt_rev(stop_revnum), 0,
=== modified file 'tests/test_ra.py'
--- a/tests/test_ra.py 2008-06-22 20:35:33 +0000
+++ b/tests/test_ra.py 2008-06-22 22:44:40 +0000
@@ -79,21 +79,21 @@
returned.append(args)
def check_results(returned):
self.assertEquals(2, len(returned))
- (paths, revnum, props) = returned[0]
+ (paths, revnum, props, has_children) = returned[0]
self.assertEquals(None, paths)
self.assertEquals(revnum, 0)
self.assertEquals(["svn:date"], props.keys())
- (paths, revnum, props) = returned[1]
+ (paths, revnum, props, has_children) = returned[1]
self.assertEquals({'/foo': ('A', None, -1)}, paths)
self.assertEquals(revnum, 1)
self.assertEquals(set(["svn:date", "svn:author", "svn:log"]),
set(props.keys()))
- self.ra.get_log(cb, [""], 0, 0)
+ self.ra.get_log(cb, [""], 0, 0, revprops=["svn:date", "svn:author", "svn:log"])
self.assertEquals(1, len(returned))
self.do_commit()
returned = []
self.ra.get_log(cb, None, 0, 1, discover_changed_paths=True,
- strict_node_history=False)
+ strict_node_history=False, revprops=["svn:date", "svn:author", "svn:log"])
check_results(returned)
def test_get_commit_editor_busy(self):
@@ -161,3 +161,13 @@
self.assertEquals(("somebody2", 0), creds.next())
self.assertEquals(("somebody3", 0), creds.next())
self.assertRaises(StopIteration, creds.next)
+
+ def test_set_default_username(self):
+ a = ra.Auth([])
+ a.set_parameter("svn:auth:username", "foo")
+ self.assertEquals("foo", a.get_parameter("svn:auth:username"))
+
+ def test_set_default_password(self):
+ a = ra.Auth([])
+ a.set_parameter("svn:auth:password", "bar")
+ self.assertEquals("bar", a.get_parameter("svn:auth:password"))
More information about the bazaar-commits
mailing list