Rev 1993: merge subvertpy. in file:///data/jelmer/bzr-svn/0.5/
Jelmer Vernooij
jelmer at samba.org
Mon Nov 17 00:48:11 GMT 2008
At file:///data/jelmer/bzr-svn/0.5/
------------------------------------------------------------
revno: 1993
revision-id: jelmer at samba.org-20081117004807-c66y2bb0f8rta066
parent: jelmer at samba.org-20081117004651-pgs14je5e4086xou
parent: jelmer at samba.org-20081117004142-gsaizxd9fuj0eyi3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-11-17 01:48:07 +0100
message:
merge subvertpy.
modified:
subvertpy/subvertpy/ra_svn.py ra_svn.py-20081116165419-qplciag3b7ikc6ms-1
------------------------------------------------------------
revno: 1925.2.29
revision-id: jelmer at samba.org-20081117004142-gsaizxd9fuj0eyi3
parent: jelmer at samba.org-20081117003540-wlu3fcovyr3hfq8l
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-11-17 01:41:42 +0100
message:
Implement do_diff().
modified:
subvertpy/ra_svn.py ra_svn.py-20081116165419-qplciag3b7ikc6ms-1
------------------------------------------------------------
revno: 1925.2.28
revision-id: jelmer at samba.org-20081117003540-wlu3fcovyr3hfq8l
parent: jelmer at samba.org-20081116234438-yy8m68wb4p5q015u
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-11-17 01:35:40 +0100
message:
Support svn+ssh.
modified:
subvertpy/ra_svn.py ra_svn.py-20081116165419-qplciag3b7ikc6ms-1
=== modified file 'subvertpy/subvertpy/ra_svn.py'
--- a/subvertpy/subvertpy/ra_svn.py 2008-11-16 23:44:38 +0000
+++ b/subvertpy/subvertpy/ra_svn.py 2008-11-17 00:41:42 +0000
@@ -22,7 +22,6 @@
import os
import socket
import subprocess
-from cStringIO import StringIO
import time
import urllib
from subvertpy import SubversionException, ERR_RA_SVN_UNKNOWN_CMD, NODE_DIR, NODE_FILE, NODE_UNKNOWN, NODE_NONE, ERR_UNSUPPORTED_FEATURE, properties
@@ -366,7 +365,11 @@
if msg[0] == "failure":
if isinstance(msg[1], str):
raise SubversionException(*msg[1])
- raise SubversionException(msg[1][0][1], msg[1][0][0])
+ num = msg[1][0][0]
+ msg = msg[1][0][1]
+ if num == ERR_RA_SVN_UNKNOWN_CMD:
+ raise NotImplementedError(msg)
+ raise SubversionException(msg, num)
assert msg[0] == "success"
assert len(msg) == 2
return msg[1]
@@ -399,10 +402,10 @@
return (self._socket.recv, self._socket.send)
def _connect_ssh(self, host):
- instream = StringIO()
- outstream = StringIO()
- subprocess.Popen(["ssh", host, "svnserve", "-t"], stdin=insteam, stdout=outstream)
- return (outstream.read, instream.write)
+ # FIXME: Support paramiko as well?
+ self._tunnel = subprocess.Popen(["ssh", host, "svnserve", "-t"], stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ return (lambda x: os.read(self._tunnel.stdout.fileno(), x), self._tunnel.stdin.write)
def get_file_revs(self, path, start, end, file_rev_handler):
raise NotImplementedError(self.get_file_revs)
@@ -555,8 +558,19 @@
return Reporter(self, update_editor)
def do_diff(self, revision_to_update, diff_target, versus_url, diff_editor,
- recurse=True, ignore_ancestry=False, text_deltas=False):
- raise NotImplementedError(self.do_diff)
+ recurse=True, ignore_ancestry=False, text_deltas=False, depth=None):
+ args = []
+ if revision_to_update is None or revision_to_update == -1:
+ args.append([])
+ else:
+ args.append([revision_to_update])
+ args += [diff_target, recurse, ignore_ancestry, versus_url, text_deltas]
+ if depth is not None:
+ args.append(literal(depth))
+ self.busy = True
+ self.send_msg([literal("diff"), args])
+ self._recv_ack()
+ return Reporter(self, diff_editor)
def get_repos_root(self):
return self._root_url
More information about the bazaar-commits
mailing list