Rev 1229: Fix more imports. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4/
Jelmer Vernooij
jelmer at samba.org
Sun Jun 15 03:48:52 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4/
------------------------------------------------------------
revno: 1229
revision-id: jelmer at samba.org-20080615024851-i8b6fip3rgh4hs1j
parent: jelmer at samba.org-20080615021124-dceio82c5ml5006m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-15 04:48:51 +0200
message:
Fix more imports.
modified:
auth.py auth.py-20071209174622-w8d42k6nm5yhxvi8-1
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
ra.py ra.py-20080615005305-t5221niknu8rm6bt-1
tests/test_commit.py test_commit.py-20060624213521-l5kcufywkh9mnilk-1
tests/test_errors.py test_errors.py-20070129114605-ban03f32t6ja14ez-1
tests/test_fetch.py test_fetch.py-20070624210302-luvgwjmlfysk5qeq-1
tests/test_logwalker.py test_logwalker.py-20060622141944-pkocc3rj8g62ukbi-1
tests/test_mapping.py test_mapping.py-20080201131338-0zd86eznn4bojtee-1
tests/test_push.py test_push.py-20070201165715-g2ievcdfqi33wqsy-1
tests/test_radir.py test_radir.py-20061231173434-31utf9o4byu7wktm-1
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
tests/test_svk.py test_svk.py-20080201164711-h6p64zcglxpvygu2-1
tests/test_transport.py test_transport.py-20060621232111-xh7xvoblzsrgj79t-1
tests/test_tree.py test_tree.py-20070103204350-pr8nupes7e5sd2wr-1
tests/test_workingtree.py test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'auth.py'
--- a/auth.py 2008-06-15 01:46:28 +0000
+++ b/auth.py 2008-06-15 02:48:51 +0000
@@ -22,6 +22,11 @@
get_simple_prompt_provider,
get_ssl_server_trust_prompt_provider,
get_ssl_client_cert_pw_prompt_provider,
+ get_simple_provider,
+ get_username_provider,
+ get_ssl_client_cert_file_provider,
+ get_ssl_client_cert_pw_file_provider,
+ get_ssl_server_trust_file_provider,
Auth
)
@@ -30,8 +35,7 @@
svn_auth_cred_simple_t,
svn_auth_cred_ssl_client_cert_t,
svn_auth_cred_ssl_client_cert_pw_t,
- svn_auth_cred_ssl_server_trust_t,
- svn_auth_open)
+ svn_auth_cred_ssl_server_trust_t)
import urlparse
import urllib
@@ -161,11 +165,11 @@
def get_stock_svn_providers():
- providers = [svn.client.get_simple_provider(),
- svn.client.get_username_provider(),
- svn.client.get_ssl_client_cert_file_provider(),
- svn.client.get_ssl_client_cert_pw_file_provider(),
- svn.client.get_ssl_server_trust_file_provider(),
+ providers = [get_simple_provider(),
+ get_username_provider(),
+ get_ssl_client_cert_file_provider(),
+ get_ssl_client_cert_pw_file_provider(),
+ get_ssl_server_trust_file_provider(),
]
if hasattr(svn.client, 'get_windows_simple_provider'):
=== modified file 'commit.py'
--- a/commit.py 2008-06-15 01:46:28 +0000
+++ b/commit.py 2008-06-15 02:48:51 +0000
@@ -525,7 +525,7 @@
if properties.PROP_REVISION_AUTHOR in override_svn_revprops:
new_revprops[properties.PROP_REVISION_AUTHOR] = self._committer.encode("utf-8")
if properties.PROP_REVISION_DATE in override_svn_revprops:
- new_revprops[properties.PROP_REVISION_DATE] = svn_time_to_cstring(1000000*self._timestamp)
+ new_revprops[properties.PROP_REVISION_DATE] = time_to_cstring(1000000*self._timestamp)
set_svn_revprops(self.repository.transport, self.revision_metadata.revision, new_revprops)
try:
=== modified file 'logwalker.py'
--- a/logwalker.py 2008-06-15 02:11:24 +0000
+++ b/logwalker.py 2008-06-15 02:48:51 +0000
@@ -21,6 +21,7 @@
import bzrlib.ui as ui
from svn.core import Pool
+import svn.delta
from bzrlib.plugins.svn import changes, core
from bzrlib.plugins.svn.cache import CacheTable
=== modified file 'ra.py'
--- a/ra.py 2008-06-15 01:46:28 +0000
+++ b/ra.py 2008-06-15 02:48:51 +0000
@@ -13,12 +13,17 @@
# 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.core, svn.delta
+import svn.core, svn.client, svn.delta
get_username_prompt_provider = svn.core.svn_auth_get_username_prompt_provider
get_simple_prompt_provider = svn.core.svn_auth_get_simple_prompt_provider
get_ssl_client_cert_pw_prompt_provider = svn.core.svn_auth_get_ssl_client_cert_pw_prompt_provider
get_ssl_server_trust_prompt_provider = svn.core.svn_auth_get_ssl_server_trust_prompt_provider
+get_simple_provider = svn.client.get_simple_provider
+get_username_provider = svn.client.get_username_provider
+get_ssl_client_cert_file_provider = svn.client.get_ssl_client_cert_file_provider
+get_ssl_client_cert_pw_file_provider = svn.client.get_ssl_client_cert_pw_file_provider
+get_ssl_server_trust_file_provider = svn.client.get_ssl_server_trust_file_provider
txdelta_send_stream = svn.delta.svn_txdelta_send_stream
=== modified file 'tests/test_commit.py'
--- a/tests/test_commit.py 2008-06-05 10:21:04 +0000
+++ b/tests/test_commit.py 2008-06-15 02:48:51 +0000
@@ -25,15 +25,15 @@
from bzrlib.trace import mutter
from bzrlib.workingtree import WorkingTree
+from copy import copy
+import os
+
+from bzrlib.plugins.svn.core import time_to_cstring
from bzrlib.plugins.svn.commit import set_svn_revprops, _revision_id_to_svk_feature
-from copy import copy
from bzrlib.plugins.svn.errors import RevpropChangeFailed
-import os
from bzrlib.plugins.svn.transport import SvnRaTransport
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
-from svn.core import svn_time_to_cstring
-
class TestNativeCommit(TestCaseWithSubversionRepository):
def test_simple_commit(self):
self.make_client('d', 'dc')
@@ -585,7 +585,7 @@
transport = SvnRaTransport(repos_url)
set_svn_revprops(transport, 1, {"svn:author": "Somebody",
- "svn:date": svn_time_to_cstring(1000000*473385600)})
+ "svn:date": time_to_cstring(1000000*473385600)})
self.assertEquals(("Somebody", "1985-01-01T00:00:00.000000Z", "My commit"),
self.client_log(repos_url)[1][1:])
@@ -599,7 +599,7 @@
transport = SvnRaTransport(repos_url)
self.assertRaises(RevpropChangeFailed,
- lambda: set_svn_revprops(transport, 1, {"svn:author": "Somebody", "svn:date": svn_time_to_cstring(1000000*473385600)}))
+ lambda: set_svn_revprops(transport, 1, {"svn:author": "Somebody", "svn:date": time_to_cstring(1000000*473385600)}))
class SvkTestCase(TestCase):
=== modified file 'tests/test_errors.py'
--- a/tests/test_errors.py 2008-06-05 18:21:31 +0000
+++ b/tests/test_errors.py 2008-06-15 02:48:51 +0000
@@ -20,9 +20,7 @@
from bzrlib.tests import TestCase
from bzrlib.plugins.svn.errors import *
-
-import svn.core
-from svn.core import SubversionException
+from bzrlib.plugins.svn.core import SubversionException
class TestConvertError(TestCase):
def test_decorator_unknown(self):
=== modified file 'tests/test_fetch.py'
--- a/tests/test_fetch.py 2008-06-05 10:21:04 +0000
+++ b/tests/test_fetch.py 2008-06-15 02:48:51 +0000
@@ -26,10 +26,9 @@
from bzrlib.tests import TestSkipped, KnownFailure
from bzrlib.trace import mutter
+from bzrlib.plugins.svn import format, remote
from bzrlib.plugins.svn.convert import load_dumpfile
from bzrlib.plugins.svn.errors import InvalidFileName
-from bzrlib.plugins.svn import format
-from bzrlib.plugins.svn import remote
from bzrlib.plugins.svn.mapping3 import set_branching_scheme
from bzrlib.plugins.svn.mapping3.scheme import TrunkBranchingScheme, NoBranchingScheme
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
=== modified file 'tests/test_logwalker.py'
--- a/tests/test_logwalker.py 2008-06-05 02:09:24 +0000
+++ b/tests/test_logwalker.py 2008-06-15 02:48:51 +0000
@@ -19,8 +19,9 @@
from bzrlib.errors import NoSuchRevision
import os
+from bzrlib import debug
+
from bzrlib.plugins.svn import logwalker
-from bzrlib import debug
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.plugins.svn.transport import SvnRaTransport
=== modified file 'tests/test_mapping.py'
--- a/tests/test_mapping.py 2008-06-04 15:20:12 +0000
+++ b/tests/test_mapping.py 2008-06-15 02:48:51 +0000
@@ -17,6 +17,11 @@
import sha
+from bzrlib.errors import InvalidRevisionId
+from bzrlib.tests import TestCase, adapt_tests, TestNotApplicable
+from bzrlib.revision import Revision
+from bzrlib.trace import mutter
+
from bzrlib.plugins.svn.errors import InvalidPropertyValue
from bzrlib.plugins.svn.mapping import (generate_revision_metadata, parse_revision_metadata,
parse_revid_property, parse_merge_property,
@@ -26,10 +31,6 @@
BzrSvnMappingv3Hybrid)
from bzrlib.plugins.svn.mapping3.scheme import NoBranchingScheme
-from bzrlib.errors import InvalidRevisionId
-from bzrlib.tests import (TestCase, adapt_tests, TestNotApplicable)
-from bzrlib.revision import Revision
-from bzrlib.trace import mutter
class MetadataMarshallerTests(TestCase):
def test_generate_revision_metadata_none(self):
=== modified file 'tests/test_push.py'
--- a/tests/test_push.py 2008-06-04 15:20:12 +0000
+++ b/tests/test_push.py 2008-06-15 02:48:51 +0000
@@ -29,10 +29,10 @@
from bzrlib.workingtree import WorkingTree
import os
+from time import sleep
+
from bzrlib.plugins.svn import format
-import svn.core
from bzrlib.plugins.svn.errors import ChangesRootLHSHistory, MissingPrefix
-from time import sleep
from bzrlib.plugins.svn.commit import push
from bzrlib.plugins.svn.mapping import SVN_PROP_BZR_REVISION_ID
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
=== modified file 'tests/test_radir.py'
--- a/tests/test_radir.py 2008-06-15 01:08:06 +0000
+++ b/tests/test_radir.py 2008-06-15 02:48:51 +0000
@@ -22,8 +22,6 @@
from bzrlib.errors import (NoRepositoryPresent, NotBranchError, NotLocalUrl,
NoWorkingTree, AlreadyBranchError)
-import svn
-
from bzrlib.plugins.svn import core
from bzrlib.plugins.svn.format import SvnRemoteFormat
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
=== modified file 'tests/test_repos.py'
--- a/tests/test_repos.py 2008-06-05 03:29:15 +0000
+++ b/tests/test_repos.py 2008-06-15 02:48:51 +0000
@@ -31,7 +31,7 @@
import os, sys
-import svn.fs, svn
+import svn.fs
from bzrlib.plugins.svn import format
from bzrlib.plugins.svn.mapping import (escape_svn_path, unescape_svn_path,
=== modified file 'tests/test_svk.py'
--- a/tests/test_svk.py 2008-06-04 15:20:12 +0000
+++ b/tests/test_svk.py 2008-06-15 02:48:51 +0000
@@ -14,8 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from bzrlib.tests import TestCase
-from bzrlib.plugins.svn.svk import parse_svk_feature
-from bzrlib.plugins.svn.svk import parse_svk_features
+from bzrlib.plugins.svn.svk import parse_svk_feature, parse_svk_features
class SvkTests(TestCase):
def test_parse_svk_feature_root(self):
=== modified file 'tests/test_transport.py'
--- a/tests/test_transport.py 2008-06-04 15:20:12 +0000
+++ b/tests/test_transport.py 2008-06-15 02:48:51 +0000
@@ -16,14 +16,15 @@
"""Subversion transport tests."""
-from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.errors import NotBranchError, NoSuchFile, FileExists, InvalidURL
from bzrlib import urlutils
+
+from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.plugins.svn.transport import SvnRaTransport, bzr_to_svn_url, _url_unescape_uri
+
+import os
from unittest import TestCase
-import os
-
class SvnRaTest(TestCaseWithSubversionRepository):
def test_open_nonexisting(self):
self.assertRaises(InvalidURL, SvnRaTransport,
=== modified file 'tests/test_tree.py'
--- a/tests/test_tree.py 2008-06-05 03:29:15 +0000
+++ b/tests/test_tree.py 2008-06-15 02:48:51 +0000
@@ -23,11 +23,12 @@
from bzrlib.workingtree import WorkingTree
from bzrlib.plugins.svn import errors
-import os
+from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.plugins.svn.tree import (SvnBasisTree, parse_externals_description,
inventory_add_external)
+
+import os
import sys
-from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
class TestBasisTree(TestCaseWithSubversionRepository):
def test_executable(self):
=== modified file 'tests/test_workingtree.py'
--- a/tests/test_workingtree.py 2008-06-04 15:20:12 +0000
+++ b/tests/test_workingtree.py 2008-06-15 02:48:51 +0000
@@ -25,15 +25,14 @@
from bzrlib.trace import mutter
from bzrlib.workingtree import WorkingTree
-import svn.core
import svn.wc
-import os, sys
-
from bzrlib.plugins.svn.transport import svn_config
from bzrlib.plugins.svn.tests import TestCaseWithSubversionRepository
from bzrlib.plugins.svn.workingtree import generate_ignore_list
+import os, sys
+
class TestWorkingTree(TestCaseWithSubversionRepository):
def test_add_duplicate(self):
self.make_client('a', 'dc')
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-06-15 02:11:24 +0000
+++ b/workingtree.py 2008-06-15 02:48:51 +0000
@@ -36,7 +36,7 @@
from bzrlib.plugins.svn.branch import SvnBranch
from bzrlib.plugins.svn.commit import _revision_id_to_svk_feature
from bzrlib.plugins.svn.convert import SvnConverter
-from bzrlib.plugins.svn.core import SubversionException
+from bzrlib.plugins.svn.core import SubversionException, time_to_cstring
from bzrlib.plugins.svn.errors import LocalCommitsUnsupported, NoCheckoutSupport, NoSvnRepositoryPresent, ERR_FS_TXN_OUT_OF_DATE, ERR_ENTRY_EXISTS, ERR_WC_PATH_NOT_FOUND, ERR_WC_NOT_DIRECTORY
from bzrlib.plugins.svn.mapping import (SVN_PROP_BZR_ANCESTRY, SVN_PROP_BZR_FILEIDS,
SVN_PROP_BZR_REVISION_ID, SVN_PROP_BZR_REVISION_INFO,
@@ -378,7 +378,7 @@
svn.wc.process_committed2(self.abspath(path).rstrip("/"), wc,
False, revnum,
- svn.core.svn_time_to_cstring(newrev.timestamp),
+ time_to_cstring(newrev.timestamp),
newrev.committer, None, False)
if newrevtree.inventory[id].kind != 'directory':
More information about the bazaar-commits
mailing list