Rev 1261: Cope with changed return value of commit function. in file:///data/jelmer/bzr-svn/0.4-ra-cext/
Jelmer Vernooij
jelmer at samba.org
Sun Jun 22 02:50:33 BST 2008
At file:///data/jelmer/bzr-svn/0.4-ra-cext/
------------------------------------------------------------
revno: 1261
revision-id: jelmer at samba.org-20080622015032-4dqkqo13gqygwsed
parent: jelmer at samba.org-20080622014959-p7glrnba1rpcsyu9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-ra-cext
timestamp: Sun 2008-06-22 03:50:32 +0200
message:
Cope with changed return value of commit function.
modified:
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py 2008-06-21 21:47:34 +0000
+++ b/tests/__init__.py 2008-06-22 01:50:32 +0000
@@ -31,7 +31,7 @@
import svn.core
-from bzrlib.plugins.svn import ra, repos
+from bzrlib.plugins.svn import properties, ra, repos
from bzrlib.plugins.svn.client import Client
from bzrlib.plugins.svn.ra import Auth, RemoteAccess, txdelta_send_stream
@@ -49,7 +49,7 @@
ra.get_ssl_server_trust_file_provider()])
self.client_ctx.log_msg_func = self.log_message_func
- def log_message_func(self, items, pool):
+ def log_message_func(self, items):
return self.next_message
def make_repository(self, relpath, allow_revprop_changes=True):
@@ -146,7 +146,7 @@
info = self.client_ctx.commit(["."], recursive, False)
os.chdir(olddir)
assert info is not None
- return (info.revision, info.date, info.author)
+ return info
def client_add(self, relpath, recursive=True):
"""Add specified files to working copy.
@@ -166,11 +166,11 @@
def client_log(self, path, start_revnum=None, stop_revnum=None):
assert isinstance(path, str)
ret = {}
- def rcvr(orig_paths, rev, author, date, message, pool):
- ret[rev] = (orig_paths, author, date, message)
- self.client_ctx.log([path], self.revnum_to_opt_rev(start_revnum),
- self.revnum_to_opt_rev(stop_revnum),
- True, True, rcvr)
+ def rcvr(orig_paths, rev, revprops):
+ ret[rev] = (orig_paths, revprops[properties.PROP_REVISION_AUTHOR], revprops[properties.PROP_REVISION_DATE], revprops[properties.PROP_REVISION_LOG])
+ self.client_ctx.log([path], rcvr, self.revnum_to_opt_rev(start_revnum),
+ self.revnum_to_opt_rev(stop_revnum), 0,
+ True, True)
return ret
def client_delete(self, relpath):
@@ -190,7 +190,7 @@
rev = "HEAD"
else:
rev = revnum
- self.client_ctx.copy(oldpath, rev, newpath)
+ self.client_ctx.copy(oldpath, newpath, rev)
def client_update(self, path):
self.client_ctx.update([path], "HEAD", True)
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-06-21 21:47:34 +0000
+++ b/workingtree.py 2008-06-22 01:50:32 +0000
@@ -414,16 +414,16 @@
specific_files = [self.basedir.encode('utf8')]
if message_callback is not None:
- def log_message_func(items, pool):
+ def log_message_func(items):
""" Simple log message provider for unit tests. """
return message_callback(self).encode("utf-8")
else:
assert isinstance(message, basestring)
- def log_message_func(items, pool):
+ def log_message_func(items):
""" Simple log message provider for unit tests. """
return message.encode("utf-8")
- self.client_ctx.client_ctx.log_msg_baton2 = log_message_func
+ self.client_ctx.log_msg_func = log_message_func
if rev_id is not None:
extra = "%d %s\n" % (self.branch.revno()+1, rev_id)
else:
@@ -444,7 +444,7 @@
try:
try:
- commit_info = self.client_ctx.commit(specific_files, True, False)
+ (revision, _, _) = self.client_ctx.commit(specific_files, True, False)
except SubversionException, (_, num):
if num == ERR_FS_TXN_OUT_OF_DATE:
raise OutOfDateTree(self)
@@ -462,12 +462,12 @@
wc.close()
raise
- self.client_ctx.client_ctx.log_msg_baton2 = None
+ self.client_ctx.log_msg_func = None
- revid = self.branch.generate_revision_id(commit_info.revision)
+ revid = self.branch.generate_revision_id(revision)
self.base_revid = revid
- self.base_revnum = commit_info.revision
+ self.base_revnum = revision
self.base_tree = SvnBasisTree(self)
return revid
More information about the bazaar-commits
mailing list