Rev 1071: Fix a couple more tests. in file:///data/jelmer/bzr-svn/cext/
Jelmer Vernooij
jelmer at samba.org
Tue Jun 3 12:15:11 BST 2008
At file:///data/jelmer/bzr-svn/cext/
------------------------------------------------------------
revno: 1071
revision-id: jelmer at samba.org-20080603111510-tzr72q62auor1mm2
parent: jelmer at samba.org-20080603105022-ifqgt9jbia67uzqd
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Tue 2008-06-03 13:15:10 +0200
message:
Fix a couple more tests.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
editor.c editor.c-20080602191336-frj7az1sdk13o1tw-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
tests/test_checkout.py test_checkout.py-20070101154110-eevkc29qj0q7udz5-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'commit.py'
--- a/commit.py 2008-05-31 04:01:48 +0000
+++ b/commit.py 2008-06-03 11:15:10 +0000
@@ -548,6 +548,7 @@
it is a candidate to commit.
"""
self.new_inventory.add(ie)
+ return self._get_delta(ie, parent_invs[0], path), True
def replay_delta(builder, old_tree, new_tree):
=== modified file 'editor.c'
--- a/editor.c 2008-06-03 05:32:05 +0000
+++ b/editor.c 2008-06-03 11:15:10 +0000
@@ -296,7 +296,7 @@
static PyObject *py_editor_open_root(PyObject *self, PyObject *args)
{
- int base_revision=-1;
+ svn_revnum_t base_revision=-1;
void *root_baton;
EditorObject *editor = (EditorObject *)self;
=== modified file 'fetch.py'
--- a/fetch.py 2008-05-31 04:01:48 +0000
+++ b/fetch.py 2008-06-03 11:15:10 +0000
@@ -640,7 +640,7 @@
editor.branch_path)
conn = self.source.transport.connections.get(branch_url)
- reporter = conn.do_update(editor.revnum, True,
+ reporter = conn.do_update(editor.revnum, "", True,
editor)
try:
@@ -655,11 +655,11 @@
conn = self.source.transport.connections.get(urlutils.join(repos_root, parent_branch))
if parent_branch != editor.branch_path:
- reporter = conn.do_switch(editor.revnum, True,
+ reporter = conn.do_switch(editor.revnum, "", True,
urlutils.join(repos_root, editor.branch_path),
editor)
else:
- reporter = conn.do_update(editor.revnum, True, editor)
+ reporter = conn.do_update(editor.revnum, "", True, editor)
try:
# Report status of existing paths
=== modified file 'ra.c'
--- a/ra.c 2008-06-03 10:49:37 +0000
+++ b/ra.c 2008-06-03 11:15:10 +0000
@@ -84,15 +84,6 @@
/* TODO: What to do with exceptions raised here ? */
}
-char *c_lock_token(PyObject *py_lock_token)
-{
- if (py_lock_token == Py_None) {
- return NULL;
- } else {
- return PyString_AsString(py_lock_token);
- }
-}
-
#define RA_UNBUSY(pool, ra) ra->busy = false;
typedef struct {
@@ -108,7 +99,7 @@
char *path;
svn_revnum_t revision;
bool start_empty;
- PyObject *lock_token = Py_None;
+ char *lock_token = NULL;
ReporterObject *reporter = (ReporterObject *)self;
if (!PyArg_ParseTuple(args, "slb|z", &path, &revision, &start_empty,
@@ -117,7 +108,7 @@
if (!check_error(reporter->reporter->set_path(reporter->report_baton,
path, revision, start_empty,
- c_lock_token(lock_token), reporter->pool)))
+ lock_token, reporter->pool)))
return NULL;
Py_RETURN_NONE;
@@ -142,14 +133,14 @@
char *path, *url;
svn_revnum_t revision;
bool start_empty;
- PyObject *lock_token = Py_None;
+ char *lock_token = NULL;
ReporterObject *reporter = (ReporterObject *)self;
- if (!PyArg_ParseTuple(args, "sslb|O", &path, &url, &revision, &start_empty, &lock_token))
+ if (!PyArg_ParseTuple(args, "sslb|z", &path, &url, &revision, &start_empty, &lock_token))
return NULL;
if (!check_error(reporter->reporter->link_path(reporter->report_baton, path, url,
- revision, start_empty, c_lock_token(lock_token), reporter->pool)))
+ revision, start_empty, lock_token, reporter->pool)))
return NULL;
Py_RETURN_NONE;
=== modified file 'tests/test_checkout.py'
--- a/tests/test_checkout.py 2008-03-29 14:37:29 +0000
+++ b/tests/test_checkout.py 2008-06-03 11:15:10 +0000
@@ -29,10 +29,10 @@
class TestWorkingTreeFormat(TestCase):
def setUp(self):
super(TestWorkingTreeFormat, self).setUp()
- self.format = SvnWorkingTreeFormat()
+ self.format = SvnWorkingTreeFormat(4)
def test_get_format_desc(self):
- self.assertEqual("Subversion Working Copy",
+ self.assertEqual("Subversion Working Copy Version 4",
self.format.get_format_description())
def test_initialize(self):
=== modified file 'transport.py'
--- a/transport.py 2008-06-03 10:43:21 +0000
+++ b/transport.py 2008-06-03 11:15:10 +0000
@@ -391,7 +391,7 @@
conn = self.get_connection()
self.mutter('svn revprop-list -r%d' % (revnum,))
try:
- return conn.revprop_list(revnum)
+ return conn.rev_proplist(revnum)
finally:
self.add_connection(conn)
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-06-03 10:50:22 +0000
+++ b/workingtree.py 2008-06-03 11:15:10 +0000
@@ -141,6 +141,7 @@
def _update(self, revnum=None):
if revnum is None:
+ # FIXME: should be able to use -1 here
revnum = self.branch.get_revnum()
adm = self._get_wc()
# FIXME: honor SVN_CONFIG_SECTION_HELPERS:SVN_CONFIG_OPTION_DIFF3_CMD
More information about the bazaar-commits
mailing list