Rev 1247: Merge upstream. in file:///data/jelmer/bzr-svn/0.4-ra/

Jelmer Vernooij jelmer at samba.org
Sat Jun 21 17:29:15 BST 2008


At file:///data/jelmer/bzr-svn/0.4-ra/

------------------------------------------------------------
revno: 1247
revision-id: jelmer at samba.org-20080621162914-djsxs1ep4c0bmwad
parent: jelmer at samba.org-20080619172013-73xy4dzdrmin6lmw
parent: jelmer at samba.org-20080621162146-wjwtgd6hijvoz406
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-ra
timestamp: Sat 2008-06-21 18:29:14 +0200
message:
  Merge upstream.
added:
  repos.py                       repos.py-20080621160832-kvb89lus284oufuq-1
modified:
  auth.py                        auth.py-20071209174622-w8d42k6nm5yhxvi8-1
  convert.py                     svn2bzr.py-20051018015439-cb4563bff29e632d
  errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  format.py                      format.py-20070917005147-94kb7zysotf82kqw-1
  ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
    ------------------------------------------------------------
    revno: 1244.1.2
    revision-id: jelmer at samba.org-20080621162146-wjwtgd6hijvoz406
    parent: jelmer at samba.org-20080621160510-eehv5pu62512f9tv
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Sat 2008-06-21 18:21:46 +0200
    message:
      Add wrapper for svn.repos.
    added:
      repos.py                       repos.py-20080621160832-kvb89lus284oufuq-1
    modified:
      convert.py                     svn2bzr.py-20051018015439-cb4563bff29e632d
      errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
      fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
      format.py                      format.py-20070917005147-94kb7zysotf82kqw-1
      tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
    ------------------------------------------------------------
    revno: 1244.1.1
    revision-id: jelmer at samba.org-20080621160510-eehv5pu62512f9tv
    parent: jelmer at samba.org-20080619153347-eysgz8ci9hvjr5r3
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Sat 2008-06-21 18:05:10 +0200
    message:
      Use wrapped API for svn version.
    modified:
      auth.py                        auth.py-20071209174622-w8d42k6nm5yhxvi8-1
      ra.py                          ra.py-20080615005305-t5221niknu8rm6bt-1
=== modified file 'auth.py'
--- a/auth.py	2008-06-19 13:58:42 +0000
+++ b/auth.py	2008-06-21 16:05:10 +0000
@@ -20,7 +20,6 @@
 
 from bzrlib.plugins.svn import ra
 
-import svn.core
 import urlparse
 import urllib
 
@@ -168,7 +167,8 @@
     # rather than prompting the user.
     providers = get_stock_svn_providers()
 
-    if svn.core.SVN_VER_MAJOR == 1 and svn.core.SVN_VER_MINOR >= 5:
+    (major, minor, patch, tag) = ra.version()
+    if major == 1 and minor >= 5:
         providers += auth_config.get_svn_auth_providers()
         providers += [get_ssl_client_cert_pw_provider(1)]
 

=== modified file 'convert.py'
--- a/convert.py	2008-06-19 15:57:42 +0000
+++ b/convert.py	2008-06-21 16:29:14 +0000
@@ -28,7 +28,6 @@
 from bzrlib.plugins.svn.errors import ERR_STREAM_MALFORMED_DATA
 from bzrlib.plugins.svn.format import get_rich_root_format
 
-import svn.core
 
 def transport_makedirs(transport, location_url):
     """Create missing directories.
@@ -79,7 +78,7 @@
         if num == ERR_STREAM_MALFORMED_DATA:
             raise NotDumpFile(dumpfile)
         raise
-    return repos
+    return r
 
 
 def convert_repository(source_repos, output_url, scheme=None, layout=None,

=== modified file 'errors.py'
--- a/errors.py	2008-06-19 15:33:26 +0000
+++ b/errors.py	2008-06-21 16:21:46 +0000
@@ -56,7 +56,6 @@
 ERR_WC_UNSUPPORTED_FORMAT = 155021
 
 
-
 class NotSvnBranchPath(NotBranchError):
     """Error raised when a path was specified that did not exist."""
     _fmt = """%(path)s is not a valid Subversion branch path. 

=== modified file 'fetch.py'
--- a/fetch.py	2008-06-19 14:06:37 +0000
+++ b/fetch.py	2008-06-21 16:21:46 +0000
@@ -429,6 +429,7 @@
 
         self.file_stream = None
 
+
 class WeaveRevisionBuildEditor(RevisionBuildEditor):
     """Subversion commit editor that can write to a weave-based repository.
     """

=== modified file 'format.py'
--- a/format.py	2008-06-17 22:52:33 +0000
+++ b/format.py	2008-06-21 16:21:46 +0000
@@ -83,7 +83,7 @@
         """See BzrDir.initialize_on_transport()."""
         from transport import get_svn_ra_transport
         from bzrlib.transport.local import LocalTransport
-        from svn import repos
+        from bzrlib.plugins.svn import repos
 
         if not isinstance(transport, LocalTransport):
             raise NotImplementedError(self.initialize, 
@@ -91,7 +91,7 @@
                 "non-local transports")
 
         local_path = transport._local_base.rstrip("/")
-        repos.create(local_path, '', '', None, None)
+        repos.create(local_path)
         # All revision property changes
         revprop_hook = os.path.join(local_path, "hooks", "pre-revprop-change")
         open(revprop_hook, 'w').write("#!/bin/sh")

=== modified file 'ra.py'
--- a/ra.py	2008-06-19 14:06:37 +0000
+++ b/ra.py	2008-06-21 16:05:10 +0000
@@ -520,4 +520,7 @@
             raise NotImplementedError(self.reparent)
 
 
+def version():
+    ver = svn.ra.svn_ra_version()
+    return (ver.major, ver.minor, ver.patch, ver.tag)
 

=== added file 'repos.py'
--- a/repos.py	1970-01-01 00:00:00 +0000
+++ b/repos.py	2008-06-21 16:21:46 +0000
@@ -0,0 +1,42 @@
+# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer at samba.org>
+ 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import svn.repos
+
+LOAD_UUID_IGNORE = svn.repos.load_uuid_ignore
+LOAD_UUID_FORCE = svn.repos.load_uuid_force
+LOAD_UUID_DEFAULT = svn.repos.load_uuid_default
+
+def create(path):
+    r = svn.repos.create(path, '', '', None, None)
+    return Repository(path, r)
+
+class Repository:
+    def __init__(self, local_path, _repos=None):
+        if _repos is not None:
+            self.repos = _repos
+        else:
+            self.repos = svn.repos.svn_repos_open(local_path)
+
+    def fs(self):
+        return svn.repos.fs(self.repos)
+
+    def load_fs(self, dumpstream, feedback_stream, uuid_action=LOAD_UUID_DEFAULT,
+                parent_dir="", use_pre_commit_hook=False, use_post_commit_hook=False, 
+                cancel_func=None):
+        return svn.repos.load_fs2(self.repos, dumpstream, feedback_stream, uuid_action,
+                parent_dir, use_pre_commit_hook, use_post_commit_hook, cancel_func)
+
+




More information about the bazaar-commits mailing list