Rev 1940: Give appropriate error during commit. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Mon Oct 6 18:57:30 BST 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1940
revision-id: jelmer at samba.org-20081006175729-h3cwvfutq0sodd3r
parent: jelmer at samba.org-20081006174417-xr6i7jj81t7huhm6
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-10-06 19:57:29 +0200
message:
Give appropriate error during commit.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
subvertpy/subvertpy/__init__.py core.pyx-20080313210413-17k59slolpfe5kdq-1
subvertpy/subvertpy/server.py server.py-20081006143330-f9p0l7eih6izgoct-1
=== modified file '__init__.py'
--- a/__init__.py 2008-10-06 15:30:38 +0000
+++ b/__init__.py 2008-10-06 17:57:29 +0000
@@ -578,7 +578,8 @@
def handle_connection():
server.serve()
sock.close()
- server = SVNServer(BzrServerBackend(directory), lambda: sock.recv(1024), sock.send, self.outf)
+ sock.setblocking(True)
+ server = SVNServer(BzrServerBackend(directory), sock.recv, sock.send, self.outf)
server_thread = threading.Thread(None, handle_connection, name='svn-smart-server')
server_thread.setDaemon(True)
server_thread.start()
=== modified file 'subvertpy/subvertpy/__init__.py'
--- a/subvertpy/subvertpy/__init__.py 2008-10-06 16:49:49 +0000
+++ b/subvertpy/subvertpy/__init__.py 2008-10-06 17:57:29 +0000
@@ -25,7 +25,7 @@
NODE_UNKNOWN = 3
ERR_UNKNOWN_HOSTNAME = 670002
-ERR_UNKNOWN_HOSTNAME = 670002
+ERR_UNSUPPORTED_FEATURE = 200007
ERR_RA_SVN_UNKNOWN_CMD = 210001
ERR_RA_SVN_CONNECTION_CLOSED = 210002
ERR_WC_LOCKED = 155004
=== modified file 'subvertpy/subvertpy/server.py'
--- a/subvertpy/subvertpy/server.py 2008-10-06 17:44:17 +0000
+++ b/subvertpy/subvertpy/server.py 2008-10-06 17:57:29 +0000
@@ -18,7 +18,7 @@
import os
import time
-from subvertpy import ERR_RA_SVN_UNKNOWN_CMD, NODE_DIR, NODE_FILE, NODE_UNKNOWN, NODE_NONE
+from subvertpy import ERR_RA_SVN_UNKNOWN_CMD, NODE_DIR, NODE_FILE, NODE_UNKNOWN, NODE_NONE, ERR_UNSUPPORTED_FEATURE
from subvertpy.marshall import marshall, unmarshall, literal, MarshallError
@@ -46,7 +46,7 @@
def check_path(self, path, revnum):
raise NotImplementedError(self.check_path)
- def stat(self, path, revnum)
+ def stat(self, path, revnum):
raise NotImplementedError(self.stat)
@@ -149,6 +149,10 @@
dirent["has-props"], dirent["created-rev"],
dirent["created-date"], dirent["last-author"])
+ def commit(self, logmsg, locks, keep_locks=False, rev_props=None):
+ self.send_failure([ERR_UNSUPPORTED_FEATURE,
+ "commit not yet supported", __file__, 42])
+
def update(self, rev, target, recurse, depth=None, send_copyfrom_param=True):
self.send_ack()
while True:
@@ -217,6 +221,7 @@
"check-path": check_path,
"reparent": reparent,
"stat": stat,
+ "commit": commit,
# FIXME: get-dated-rev
# FIXME: rev-proplist
# FIXME: rev-prop
@@ -269,12 +274,13 @@
# FIXME: Blocking read?
while True:
try:
- self.inbuffer += self.recv_fn()
+ self.inbuffer += self.recv_fn(512)
(self.inbuffer, ret) = unmarshall(self.inbuffer)
self.mutter("IN: %r" % ret)
return ret
except MarshallError, e:
self.mutter('ERROR: %r' % e)
+ raise
def send_msg(self, data):
self.mutter("OUT: %r" % data)
More information about the bazaar-commits
mailing list