Use global configuration object.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 14 Jan 2007 23:38:09 +0000 (00:38 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 14 Jan 2007 23:38:09 +0000 (00:38 +0100)
branch.py
checkout.py
commit.py
tests/test_workingtree.py
transport.py

index 5c05d336ae3a2f426d76f4b3f689272a502951ea..87c9f2c364befb937bf0a850c3cc169e1df8a000 100644 (file)
--- a/branch.py
+++ b/branch.py
@@ -33,7 +33,7 @@ from svn.core import SubversionException
 
 from commit import push_as_merged
 from repository import SvnRepository
-from transport import bzr_to_svn_url
+from transport import bzr_to_svn_url, svn_config
 from tree import SvnRevisionTree
 
 
@@ -101,6 +101,7 @@ class SvnBranch(Branch):
             mutter('hist: %r' % self.revision_history())
 
         client_ctx = svn.client.create_context()
+        client_ctx.config = svn_config
         svn.client.checkout(bzr_to_svn_url(self.base), to_location, rev, 
                             True, client_ctx)
 
index 4f37987f54b6f02270e370ef0dc4625f7f8d8300..e401aeb9d7d9c307362a29e63091af1210f4b3b5 100644 (file)
@@ -62,8 +62,9 @@ class SvnWorkingTree(WorkingTree):
         self.bzrdir = bzrdir
         self._branch = branch
         self.base_revnum = 0
-        self.client_ctx = svn.client.create_context()
         self.pool = Pool()
+        self.client_ctx = svn.client.create_context()
+        self.client_ctx.config = svn_config
         self.client_ctx.log_msg_func2 = svn.client.svn_swig_py_get_commit_log_func
         self.client_ctx.auth_baton = _create_auth_baton(self.pool)
 
index a25a12796f47c16226f55f8497a55cc8f4be915b..52d9bff5127b31f171236b7bc211e6ea0cea3aa2 100644 (file)
--- a/commit.py
+++ b/commit.py
@@ -289,7 +289,7 @@ class SvnCommitBuilder(RootCommitBuilder):
             self.date = date
             self.author = author
             mutter('committed %r, author: %r, date: %r' % (revision, author, date))
-
+        
         mutter('obtaining commit editor')
         self.editor, editor_baton = self.repository.transport.get_commit_editor(
             message, done, None, False)
index a9ae04d79475cf33eb75bca6d627317ef4c70f66..592de3b10babd410eea5f1f3662944498cde2ef4 100644 (file)
@@ -338,6 +338,17 @@ class TestWorkingTree(TestCaseWithSubversionRepository):
         orig_tree = tree.basis_tree()
         tree.commit(message_callback=lambda x: "data")
 
+    def test_commit_nested(self):
+        repos_url = self.make_client('a', 'dc')
+        self.build_tree({"dc/branches/foobranch/file": "data"})
+        self.client_add("dc/branches")
+        self.client_commit("dc", "initial changes")
+        self.make_checkout(repos_url + "/branches/foobranch", "de")
+        tree = WorkingTree.open("de")
+        self.build_tree({'de/file': "foo"})
+        orig_tree = tree.basis_tree()
+        tree.commit(message="data")
+
     def test_update_after_commit(self):
         self.make_client('a', 'dc')
         self.build_tree({"dc/bl": "data"})
index 2b80a023587d6db07fd0bc657c3127920889d64a..1584ffe9a7ba99dbcd24bdd0e634eb100319b4da 100644 (file)
@@ -104,6 +104,7 @@ class SvnRaTransport(Transport):
 
         self._client = svn.client.create_context(self.pool)
         self._client.auth_baton = _create_auth_baton(self.pool)
+        self._client.config = svn_config
 
         try:
             mutter('opening SVN RA connection to %r' % self.svn_url)