Rev 1037: Fix a couple of tests. in file:///data/jelmer/bzr-svn/pyrex/
Jelmer Vernooij
jelmer at samba.org
Sat May 31 03:14:58 BST 2008
At file:///data/jelmer/bzr-svn/pyrex/
------------------------------------------------------------
revno: 1037
revision-id: jelmer at samba.org-20080531021456-a3ti8t4olg7ufet2
parent: jelmer at samba.org-20080530023827-acd2nqcjvtmlieav
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Sat 2008-05-31 04:14:56 +0200
message:
Fix a couple of tests.
modified:
auth.py auth.py-20071209174622-w8d42k6nm5yhxvi8-1
client.pyx client.pyx-20080313235339-wbyjbw2namuiql8f-1
core.pyx core.pyx-20080313210413-17k59slolpfe5kdq-1
mapping.py mapping.py-20080128201303-6cp01phc0dmc0kiv-1
ra.pyx ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
repos.pyx repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
wc.pyx wc.pyx-20080313142018-10l8l23vha2j9e6b-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'auth.py'
--- a/auth.py 2008-05-30 02:30:03 +0000
+++ b/auth.py 2008-05-31 02:14:56 +0000
@@ -153,7 +153,7 @@
if hasattr(ra, 'get_windows_ssl_server_trust_provider'):
providers.append(ra.get_windows_ssl_server_trust_provider())
- return Auth(providers)
+ return providers
def create_auth_baton(url):
@@ -169,17 +169,16 @@
# 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)]
- auth_baton = svn.core.svn_auth_open(providers)
+ auth_baton = Auth(providers)
if creds is not None:
- (auth_baton.user, auth_baton.password) = urllib.splitpasswd(creds)
- if auth_baton.user is not None:
- svn.core.svn_auth_set_parameter(auth_baton,
- svn.core.SVN_AUTH_PARAM_DEFAULT_USERNAME, auth_baton.user)
- if auth_baton.password is not None:
- svn.core.svn_auth_set_parameter(auth_baton,
- svn.core.SVN_AUTH_PARAM_DEFAULT_PASSWORD, auth_baton.password)
+ (user, password) = urllib.splitpasswd(creds)
+ if user is not None:
+ auth_baton.set_parameter(svn.core.SVN_AUTH_PARAM_DEFAULT_USERNAME, user)
+ if password is not None:
+ auth_baton.set_parameter(svn.core.SVN_AUTH_PARAM_DEFAULT_PASSWORD, password)
return auth_baton
=== modified file 'client.pyx'
--- a/client.pyx 2008-03-21 19:02:36 +0000
+++ b/client.pyx 2008-05-31 02:14:56 +0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+# Copyright © 2008 Jelmer Vernooij <jelmer at samba.org>
+# -*- coding: utf-8 -*-
# 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
=== modified file 'core.pyx'
--- a/core.pyx 2008-03-21 15:32:57 +0000
+++ b/core.pyx 2008-05-31 02:14:56 +0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+# Copyright © 2008 Jelmer Vernooij <jelmer at samba.org>
+# -*- coding: utf-8 -*-
# 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
=== modified file 'mapping.py'
--- a/mapping.py 2008-05-30 02:30:03 +0000
+++ b/mapping.py 2008-05-31 02:14:56 +0000
@@ -23,7 +23,6 @@
import calendar
import core
import errors
-from scheme import BranchingScheme, guess_scheme_from_branch_path
import sha
import time
import urllib
=== modified file 'ra.pyx'
--- a/ra.pyx 2008-03-21 15:40:04 +0000
+++ b/ra.pyx 2008-05-31 02:14:56 +0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+# Copyright © 2008 Jelmer Vernooij <jelmer at samba.org>
+# -*- coding: utf-8 -*-
# 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
@@ -447,7 +448,7 @@
"""
cdef svn_version_t *ver
ver = svn_ra_version()
- return (ver.major, ver.minor, ver.minor, ver.tag)
+ return (ver.major, ver.minor, ver.patch, ver.tag)
cdef svn_error_t *py_editor_set_target_revision(void *edit_baton, svn_revnum_t target_revision, apr_pool_t *pool) except *:
self = <object>edit_baton
=== modified file 'repos.pyx'
--- a/repos.pyx 2008-03-19 22:46:47 +0000
+++ b/repos.pyx 2008-05-31 02:14:56 +0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+# Copyright © 2008 Jelmer Vernooij <jelmer at samba.org>
+# -*- coding: utf-8 -*-
# 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
=== modified file 'transport.py'
--- a/transport.py 2008-05-30 02:38:27 +0000
+++ b/transport.py 2008-05-31 02:14:56 +0000
@@ -103,7 +103,7 @@
try:
self.mutter('opening SVN RA connection to %r' % url)
self._ra = ra.RemoteAccess(url.encode('utf8'),
- auth=create_auth_baton())
+ auth=create_auth_baton(self.url))
# FIXME: Callbacks
except SubversionException, (_, num):
if num in (constants.ERR_RA_SVN_REPOS_NOT_FOUND,):
@@ -270,7 +270,7 @@
tokens = {}
def lock_cb(baton, path, do_lock, lock, ra_err, pool):
tokens[path] = lock
- svn.ra.lock(self._ra, path_revs, comment, steal_lock, lock_cb)
+ self._ra.lock(path_revs, comment, steal_lock, lock_cb)
return SvnLock(self, tokens)
@convert_svn_error
@@ -280,46 +280,20 @@
pool=None):
# No paths starting with slash, please
assert paths is None or all([not p.startswith("/") for p in paths])
- if (paths is None and
- (svn.core.SVN_VER_MINOR < 6 or svn.core.SVN_VER_REVISION < 31470)):
- paths = ["/"]
self.mutter('svn log %r:%r %r (limit: %r)' % (from_revnum, to_revnum, paths, limit))
- if hasattr(svn.ra, 'get_log2'):
- return svn.ra.get_log2(self._ra, paths,
- from_revnum, to_revnum, limit,
- discover_changed_paths, strict_node_history, False,
- revprops, rcvr, pool)
-
- class LogEntry(object):
- def __init__(self, changed_paths, rev, author, date, message):
- self.changed_paths = changed_paths
- self.revprops = {}
- if svn.core.SVN_PROP_REVISION_AUTHOR in revprops:
- self.revprops[svn.core.SVN_PROP_REVISION_AUTHOR] = author
- if svn.core.SVN_PROP_REVISION_LOG in revprops:
- self.revprops[svn.core.SVN_PROP_REVISION_LOG] = message
- if svn.core.SVN_PROP_REVISION_DATE in revprops:
- self.revprops[svn.core.SVN_PROP_REVISION_DATE] = date
- # FIXME: Check other revprops
- # FIXME: Handle revprops is None
- self.revision = rev
- self.has_children = None
-
- def rcvr_convert(orig_paths, rev, author, date, message, pool):
- rcvr(LogEntry(orig_paths, rev, author, date, message), pool)
-
- return svn.ra.get_log(self._ra, paths,
- from_revnum, to_revnum, limit, discover_changed_paths,
- strict_node_history, rcvr_convert, pool)
+ return self._ra.get_log(rcvr, paths,
+ from_revnum, to_revnum, limit,
+ discover_changed_paths, strict_node_history,
+ revprops)
@convert_svn_error
@needs_busy
def reparent(self, url):
if self.url == url:
return
- if hasattr(svn.ra, 'reparent'):
+ if hasattr(self._ra, 'reparent'):
self.mutter('svn reparent %r' % url)
- svn.ra.reparent(self._ra, url)
+ self._ra.reparent(url)
self.url = url
else:
raise NotImplementedError(self.reparent)
@@ -363,7 +337,6 @@
to fool Bazaar. """
@convert_svn_error
def __init__(self, url="", _backing_url=None, pool=None):
- self.pool = Pool()
bzr_url = url
self.svn_url = bzr_to_svn_url(url)
# _backing_url is an evil hack so the root directory of a repository
@@ -550,7 +523,7 @@
try:
(dirents, _, _) = self.get_dir(relpath, self.get_latest_revnum())
except SubversionException, (msg, num):
- if num == svn.core.SVN_ERR_FS_NOT_DIRECTORY:
+ if num == constants.ERR_FS_NOT_DIRECTORY:
raise NoSuchFile(relpath)
raise
return dirents.keys()
=== modified file 'tree.py'
--- a/tree.py 2008-05-30 02:38:27 +0000
+++ b/tree.py 2008-05-31 02:14:56 +0000
@@ -154,7 +154,6 @@
ie.revision = revision_id
return DirectoryTreeEditor(self.tree, file_id)
-<<<<<<< TREE
def change_prop(self, name, value):
from mapping import (SVN_PROP_BZR_ANCESTRY,
SVN_PROP_BZR_PREFIX, SVN_PROP_BZR_REVISION_INFO,
=== modified file 'wc.pyx'
--- a/wc.pyx 2008-03-21 04:08:25 +0000
+++ b/wc.pyx 2008-05-31 02:14:56 +0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+# Copyright © 2008 Jelmer Vernooij <jelmer at samba.org>
+# -*- coding: utf-8 -*-
# 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
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-05-30 02:38:27 +0000
+++ b/workingtree.py 2008-05-31 02:14:56 +0000
@@ -44,8 +44,7 @@
from repository import SvnRepository
from svk import SVN_PROP_SVK_MERGE, parse_svk_features, serialize_svk_features
from bzrlib.plugins.svn.mapping import escape_svn_path
-from transport import (SvnRaTransport, bzr_to_svn_url, create_svn_client,
- svn_config)
+from transport import (SvnRaTransport, bzr_to_svn_url, svn_config)
from tree import SvnBasisTree
import os
More information about the bazaar-commits
mailing list