Rev 584: Merge 0.4 branch. in file:///data/jelmer/bzr-svn/revprops/
Jelmer Vernooij
jelmer at samba.org
Wed Oct 17 00:31:32 BST 2007
At file:///data/jelmer/bzr-svn/revprops/
------------------------------------------------------------
revno: 584
revision-id: jelmer at samba.org-20071016233131-kblc1ggco23224na
parent: jelmer at samba.org-20071016233013-91wqwzb14vkqj4oz
parent: jelmer at samba.org-20071016232541-ph07b3y33c3wg4c8
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Wed 2007-10-17 01:31:31 +0200
message:
Merge 0.4 branch.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
remote.py format.py-20060406233823-b6fa009fe35dfde7
scheme.py scheme.py-20060516195850-95181aae6b272f9e
tests/test_scheme.py test_scheme.py-20060621221855-va2xabhlxpmc9llx-1
tests/test_transport.py test_transport.py-20060621232111-xh7xvoblzsrgj79t-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 579.1.147
revision-id: jelmer at samba.org-20071016232541-ph07b3y33c3wg4c8
parent: jelmer at samba.org-20071016124017-kmwoodryt9t90x1r
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2007-10-17 01:25:41 +0200
message:
Fix 'bzr checkout --lightweight' for http and https branches. (#144032)
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
transport.py transport.py-20060406231150-b3472d06b3a0818d
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 579.1.146
revision-id: jelmer at samba.org-20071016124017-kmwoodryt9t90x1r
parent: jelmer at samba.org-20071010232417-mydh3vng3z78oi9v
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2007-10-16 14:40:17 +0200
message:
Avoid = in property names (#125751).
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
scheme.py scheme.py-20060516195850-95181aae6b272f9e
tests/test_scheme.py test_scheme.py-20060621221855-va2xabhlxpmc9llx-1
------------------------------------------------------------
revno: 579.1.145
revision-id: jelmer at samba.org-20071010232417-mydh3vng3z78oi9v
parent: jelmer at samba.org-20071009122742-6225g53fkeloojea
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2007-10-11 01:24:17 +0200
message:
Avoid args/kwargs.
modified:
transport.py transport.py-20060406231150-b3472d06b3a0818d
------------------------------------------------------------
revno: 579.1.144
revision-id: jelmer at samba.org-20071009122742-6225g53fkeloojea
parent: jelmer at samba.org-20071005131929-gr11wakccqjyqcd1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2007-10-09 14:27:42 +0200
message:
Support svn+ hack when committing in bound branches. (#150699)
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
remote.py format.py-20060406233823-b6fa009fe35dfde7
tests/test_transport.py test_transport.py-20060621232111-xh7xvoblzsrgj79t-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
------------------------------------------------------------
revno: 579.1.143
revision-id: jelmer at samba.org-20071005131929-gr11wakccqjyqcd1
parent: jelmer at samba.org-20071002010530-gabzblnbdcd9xyzy
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Fri 2007-10-05 15:19:29 +0200
message:
Add mutter for revision properties.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
=== modified file 'NEWS'
--- a/NEWS 2007-10-02 01:05:30 +0000
+++ b/NEWS 2007-10-16 23:25:41 +0000
@@ -28,6 +28,14 @@
* Give proper warning message when running 'bzr svn-import' on
something that is not a Subversion repository.
+ * Support svn+ hack when committing in bound branches. (#150699)
+
+ * Encode = in list branching scheme names (unusable in Subversion property
+ names). (#125751)
+
+ * Fix 'bzr checkout --lightweight' for http and https branches.
+ (#144032)
+
DOCUMENTATION
* Add simple FAQ file. (#144388)
=== modified file 'branch.py'
--- a/branch.py 2007-09-17 13:18:46 +0000
+++ b/branch.py 2007-10-16 23:25:41 +0000
@@ -25,13 +25,13 @@
from bzrlib.workingtree import WorkingTree
import svn.client, svn.core
-from svn.core import SubversionException
+from svn.core import SubversionException, Pool
from commit import push
from errors import NotSvnBranchPath
from format import get_rich_root_format
from repository import SvnRepository
-from transport import bzr_to_svn_url, svn_config
+from transport import bzr_to_svn_url, create_svn_client
class FakeControlFiles(object):
@@ -169,8 +169,7 @@
rev.kind = svn.core.svn_opt_revision_number
rev.value.number = revnum
- client_ctx = svn.client.create_context()
- client_ctx.config = svn_config
+ client_ctx = create_svn_client(Pool())
svn.client.checkout(bzr_to_svn_url(self.base), to_location, rev,
True, client_ctx)
=== modified file 'commit.py'
--- a/commit.py 2007-10-02 01:05:30 +0000
+++ b/commit.py 2007-10-05 13:19:29 +0000
@@ -461,6 +461,7 @@
value = value.encode('utf-8')
self.editor.change_dir_prop(branch_batons[-1], prop, value,
self.pool)
+ self.mutter("setting revision property %r to %r" % (prop, value))
for baton in reversed(branch_batons):
self.editor.close_directory(baton, self.pool)
=== modified file 'fetch.py'
--- a/fetch.py 2007-09-23 23:27:45 +0000
+++ b/fetch.py 2007-10-09 12:27:42 +0000
@@ -428,7 +428,7 @@
# Nothing to fetch
return
- repos_root = self.source.transport.get_repos_root()
+ repos_root = self.source.transport.get_svn_repos_root()
prev_revid = None
transport = self.source.transport
=== modified file 'logwalker.py'
--- a/logwalker.py 2007-09-20 19:28:59 +0000
+++ b/logwalker.py 2007-10-09 12:27:42 +0000
@@ -335,7 +335,7 @@
edit, baton = svn.delta.make_editor(editor, pool)
old_base = transport.base
try:
- root_repos = transport.get_repos_root()
+ root_repos = transport.get_svn_repos_root()
transport.reparent(urlutils.join(root_repos, path))
reporter = transport.do_update(revnum, True, edit, baton, pool)
reporter.set_path("", revnum, True, None, pool)
=== modified file 'remote.py'
--- a/remote.py 2007-09-17 13:18:46 +0000
+++ b/remote.py 2007-10-09 12:27:42 +0000
@@ -46,7 +46,8 @@
self.root_transport = _transport
svn_url = bzr_to_svn_url(self.root_transport.base)
- self.svn_root_url = _transport.get_repos_root()
+ self.svn_root_url = _transport.get_svn_repos_root()
+ self.root_url = _transport.get_repos_root()
assert svn_url.startswith(self.svn_root_url)
self.branch_path = svn_url[len(self.svn_root_url):]
@@ -95,7 +96,7 @@
:return: instance of SvnRepository.
"""
transport = self.root_transport
- if self.svn_root_url != transport.base:
+ if self.root_url != transport.base:
transport = transport.clone_root()
return SvnRepository(self, transport, self.branch_path)
=== modified file 'scheme.py'
--- a/scheme.py 2007-09-24 19:07:59 +0000
+++ b/scheme.py 2007-10-16 12:40:17 +0000
@@ -19,7 +19,7 @@
from bzrlib.errors import NotBranchError, BzrError
from bzrlib.trace import mutter
-import base64
+from base64 import urlsafe_b64decode, urlsafe_b64encode
import bz2
class BranchingScheme:
@@ -130,12 +130,12 @@
:param branch_list: List of know branch locations.
"""
if isinstance(branch_list, basestring):
- branch_list = bz2.decompress(base64.b64decode(branch_list)).splitlines()
+ branch_list = bz2.decompress(urlsafe_b64decode(branch_list.replace(".", "="))).splitlines()
self.branch_list = [p.strip("/") for p in branch_list]
self.split_branch_list = [p.split("/") for p in self.branch_list]
def __str__(self):
- return "list-%s" % base64.b64encode(bz2.compress("".join(map(lambda x:x+"\n", self.branch_list))))
+ return "list-%s" % urlsafe_b64encode(bz2.compress("".join(map(lambda x:x+"\n", self.branch_list)))).replace("=", ".")
def is_tag(self, path):
"""See BranchingScheme.is_tag()."""
=== modified file 'tests/test_scheme.py'
--- a/tests/test_scheme.py 2007-09-24 19:07:59 +0000
+++ b/tests/test_scheme.py 2007-10-16 12:40:17 +0000
@@ -252,7 +252,7 @@
self.assertEqual(self.scheme.unprefix("bar/bloe"), ("bar/bloe", ""))
def test_str(self):
- self.assertEqual("list-QlpoOTFBWSZTWSDz6woAAAPRgAAQAACzBJAAIAAiDRo9QgyYjmbjatAeLuSKcKEgQefWFA==", str(self.scheme))
+ self.assertEqual("list-QlpoOTFBWSZTWSDz6woAAAPRgAAQAACzBJAAIAAiDRo9QgyYjmbjatAeLuSKcKEgQefWFA..", str(self.scheme))
def test_parse_text(self):
self.assertEqual(["bla/bloe"], parse_list_scheme_text("bla/bloe\n"))
=== modified file 'tests/test_transport.py'
--- a/tests/test_transport.py 2007-08-28 01:54:14 +0000
+++ b/tests/test_transport.py 2007-10-09 12:27:42 +0000
@@ -167,7 +167,7 @@
self.client_commit("dc", "Bla")
t = SvnRaTransport("%s/dir" % repos_url)
- root = t.get_repos_root()
+ root = t.get_svn_repos_root()
self.assertEqual(repos_url, root)
def test_local_abspath(self):
=== modified file 'transport.py'
--- a/transport.py 2007-10-02 01:05:30 +0000
+++ b/transport.py 2007-10-16 23:25:41 +0000
@@ -45,6 +45,13 @@
return svn.core.svn_auth_open(providers, pool)
+def create_svn_client(pool):
+ client = svn.client.create_context(pool)
+ client.auth_baton = _create_auth_baton(pool)
+ client.config = svn_config
+ return client
+
+
# Don't run any tests on SvnTransport as it is not intended to be
# a full implementation of Transport
def get_test_permutations():
@@ -122,10 +129,10 @@
*args, **kwargs)
@convert_svn_error
- def change_dir_prop(self, baton, *args, **kwargs):
+ def change_dir_prop(self, baton, name, value, pool=None):
assert self.recent_baton[-1] == baton
return svn.delta.editor_invoke_change_dir_prop(self.editor, baton,
- *args, **kwargs)
+ name, value, pool)
@convert_svn_error
def delete_entry(self, *args, **kwargs):
@@ -148,10 +155,10 @@
return baton
@convert_svn_error
- def change_file_prop(self, baton, *args, **kwargs):
+ def change_file_prop(self, baton, name, value, pool=None):
assert self.recent_baton[-1] == baton
- svn.delta.editor_invoke_change_file_prop(self.editor, baton, *args,
- **kwargs)
+ svn.delta.editor_invoke_change_file_prop(self.editor, baton, name,
+ value, pool)
@convert_svn_error
def close_file(self, baton, *args, **kwargs):
@@ -193,10 +200,7 @@
self._backing_url = _backing_url.rstrip("/")
Transport.__init__(self, bzr_url)
- self._client = svn.client.create_context(self.pool)
- self._client.auth_baton = _create_auth_baton(self.pool)
- self._client.config = svn_config
-
+ self._client = create_svn_client(self.pool)
try:
self.mutter('opening SVN RA connection to %r' % self._backing_url)
self._ra = svn.client.open_ra_session(self._backing_url.encode('utf8'),
@@ -282,9 +286,16 @@
self.mutter('svn get-uuid')
return svn.ra.get_uuid(self._ra)
- @convert_svn_error
- @needs_busy
def get_repos_root(self):
+ root = self.get_svn_repos_root()
+ if (self.base.startswith("svn+http:") or
+ self.base.startswith("svn+https:")):
+ return "svn+%s" % root
+ return root
+
+ @convert_svn_error
+ @needs_busy
+ def get_svn_repos_root(self):
if self._root is None:
self.mutter("svn get-repos-root")
self._root = svn.ra.get_repos_root(self._ra)
@@ -313,12 +324,13 @@
def _open_real_transport(self):
if self._backing_url != self.svn_url:
- self.reparent(self.svn_url)
+ self.reparent(self.base)
assert self._backing_url == self.svn_url
def reparent_root(self):
if self._is_http_transport():
- self.svn_url = self.base = self.get_repos_root()
+ self.svn_url = self.get_svn_repos_root()
+ self.base = self.get_repos_root()
else:
self.reparent(self.get_repos_root())
@@ -327,17 +339,17 @@
def reparent(self, url):
url = url.rstrip("/")
self.base = url
- self.svn_url = url
- if url == self._backing_url:
+ self.svn_url = bzr_to_svn_url(url)
+ if self.svn_url == self._backing_url:
return
if hasattr(svn.ra, 'reparent'):
self.mutter('svn reparent %r' % url)
- svn.ra.reparent(self._ra, url, self.pool)
+ svn.ra.reparent(self._ra, self.svn_url, self.pool)
else:
self.mutter('svn reparent (reconnect) %r' % url)
self._ra = svn.client.open_ra_session(self.svn_url.encode('utf8'),
self._client, self.pool)
- self._backing_url = url
+ self._backing_url = self.svn_url
@convert_svn_error
@needs_busy
=== modified file 'tree.py'
--- a/tree.py 2007-08-09 14:54:13 +0000
+++ b/tree.py 2007-10-09 12:27:42 +0000
@@ -68,7 +68,7 @@
self.editor = TreeBuildEditor(self, pool)
self.file_data = {}
editor, baton = svn.delta.make_editor(self.editor, pool)
- root_repos = repository.transport.get_repos_root()
+ root_repos = repository.transport.get_svn_repos_root()
reporter = repository.transport.do_switch(
self.revnum, True,
urlutils.join(root_repos, self.branch_path), editor, baton, pool)
=== modified file 'workingtree.py'
--- a/workingtree.py 2007-09-17 13:18:46 +0000
+++ b/workingtree.py 2007-10-16 23:25:41 +0000
@@ -41,8 +41,7 @@
revision_id_to_svk_feature, generate_revision_metadata)
from revids import escape_svn_path
from scheme import BranchingScheme
-from transport import (SvnRaTransport, svn_config, bzr_to_svn_url,
- _create_auth_baton)
+from transport import (SvnRaTransport, bzr_to_svn_url, create_svn_client)
from tree import SvnBasisTree
import os
@@ -71,11 +70,9 @@
self._branch = branch
self.base_revnum = 0
self.pool = Pool()
- self.client_ctx = svn.client.create_context()
- self.client_ctx.config = svn_config
+ self.client_ctx = create_svn_client(self.pool)
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)
self._get_wc()
status = svn.wc.revision_status(self.basedir, None, True, None, None)
More information about the bazaar-commits
mailing list