Rev 1933: Claim edit-pipeline capability, to make svn 1.5 happy. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Oct 6 16:30:39 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1933
revision-id: jelmer at samba.org-20081006153038-t7m9eeqn3atx2qal
parent: jelmer at samba.org-20081006152256-iuk1jke9n0pzczp6
parent: jelmer at samba.org-20081006152443-bao75mwgf0uqau8l
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-10-06 17:30:38 +0200
message:
  Claim edit-pipeline capability, to make svn 1.5 happy.
modified:
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  server.py                      server.py-20081006150454-t45tvwmbhpesdh7d-1
  subvertpy/subvertpy/server.py  server.py-20081006143330-f9p0l7eih6izgoct-1
    ------------------------------------------------------------
    revno: 1925.1.17
    revision-id: jelmer at samba.org-20081006152443-bao75mwgf0uqau8l
    parent: jelmer at samba.org-20081006152216-2xcsvbuq68k0a3op
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2008-10-06 17:24:43 +0200
    message:
      Send edit-pipeline capability.
    modified:
      subvertpy/server.py            server.py-20081006143330-f9p0l7eih6izgoct-1
=== modified file '__init__.py'
--- a/__init__.py	2008-10-06 15:22:56 +0000
+++ b/__init__.py	2008-10-06 15:30:38 +0000
@@ -578,7 +578,7 @@
                 def handle_connection():
                     server.serve()
                     sock.close()
-                server = SVNServer(directory, lambda: sock.recv(1024), sock.send)
+                server = SVNServer(BzrServerBackend(directory), lambda: sock.recv(1024), sock.send, self.outf)
                 server_thread = threading.Thread(None, handle_connection, name='svn-smart-server')
                 server_thread.setDaemon(True)
                 server_thread.start()

=== modified file 'server.py'
--- a/server.py	2008-10-06 15:22:56 +0000
+++ b/server.py	2008-10-06 15:30:38 +0000
@@ -19,6 +19,8 @@
 
 from subvertpy.server import SVNServer, ServerBackend, ServerRepositoryBackend
 
+import os, time
+
 class RepositoryBackend(ServerRepositoryBackend):
 
     def __init__(self, branch):
@@ -33,6 +35,9 @@
             config.set_user_option('svn_uuid', uuid)
         return str(uuid)
 
+    def get_latest_revnum(self):
+        return self.branch.revno()
+
     def log(self, send_revision, target_path, start_rev, end_rev, changed_paths,
             strict_node, limit):
         i = 0
@@ -57,6 +62,9 @@
 
 class BzrServerBackend(ServerBackend):
 
+    def __init__(self, rootdir):
+        self.rootdir = rootdir
+
     def open_repository(self, path):
-        (branch, relpath) = Branch.open_containing(os.path.join(self.rootdir, location))
+        (branch, relpath) = Branch.open_containing(os.path.join(self.rootdir, path))
         return RepositoryBackend(branch), relpath

=== modified file 'subvertpy/subvertpy/server.py'
--- a/subvertpy/subvertpy/server.py	2008-10-06 15:22:16 +0000
+++ b/subvertpy/subvertpy/server.py	2008-10-06 15:30:38 +0000
@@ -41,8 +41,10 @@
         raise NotImplementedError(self.log)
 
 
-SVN_MAJOR_VERSION = 1
-SVN_MINOR_VERSION = 2
+MAJOR_VERSION = 1
+MINOR_VERSION = 2
+CAPABILITIES = [literal("edit-pipeline")]
+
 
 class SVNServer:
     def __init__(self, backend, recv_fn, send_fn, logf=None):
@@ -55,7 +57,7 @@
 
     def send_greeting(self):
         self.send_success(
-            SVN_MAJOR_VERSION, SVN_MINOR_VERSION, [literal("ANONYMOUS")], [])
+            MAJOR_VERSION, MINOR_VERSION, [literal("ANONYMOUS")], CAPABILITIES)
 
     def send_mechs(self):
         self.send_success([literal("ANONYMOUS")], "")




More information about the bazaar-commits mailing list