Rev 1115: Merge 0.4. in http://people.samba.org/bzr/jelmer/bzr-svn/cext
Jelmer Vernooij
jelmer at samba.org
Sun Jun 22 09:12:18 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/cext
------------------------------------------------------------
revno: 1115
revision-id: jelmer at samba.org-20080622081216-b8vfyk8pxcffvl7w
parent: jelmer at samba.org-20080622073426-ajyouu17dpj8h0c3
parent: jelmer at samba.org-20080622080910-mchppe3df4fwkw0s
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Sun 2008-06-22 10:12:16 +0200
message:
Merge 0.4.
removed:
repos.py repos.py-20080621160832-kvb89lus284oufuq-1
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
core.c core.pyx-20080313210413-17k59slolpfe5kdq-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
format.py format.py-20070917005147-94kb7zysotf82kqw-1
mapping.py mapping.py-20080128201303-6cp01phc0dmc0kiv-1
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
tests/test_repository.py test_repos.py-20060508151940-ddc49a59257ca712
------------------------------------------------------------
revno: 950.3.201
revision-id: jelmer at samba.org-20080622080910-mchppe3df4fwkw0s
parent: jelmer at samba.org-20080622080839-a7eguz5nac4njw9g
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 10:09:10 +0200
message:
Update docs about new build instructions.
modified:
FAQ faq-20070910195147-p9u38s9wplds2d4o-1
NEWS news-20061231030336-h9fhq245ie0de8bs-1
README README-20051120210643-bd274a2fef9aed6a
------------------------------------------------------------
revno: 950.3.200
revision-id: jelmer at samba.org-20080622080839-a7eguz5nac4njw9g
parent: jelmer at samba.org-20080622080044-rhp1ksghhe0rg9iv
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 10:08:39 +0200
message:
Move last py file to C. There are no dependencies on the upstream bindings anymore now.
removed:
core.py core.py-20080615010310-67lnibnp889hlarb-1
added:
core.c core.pyx-20080313210413-17k59slolpfe5kdq-1
modified:
mapping.py mapping.py-20080128201303-6cp01phc0dmc0kiv-1
setup.py setup.py-20060502115218-86950492da22353f
------------------------------------------------------------
revno: 950.3.199
revision-id: jelmer at samba.org-20080622080044-rhp1ksghhe0rg9iv
parent: jelmer at samba.org-20080622074304-a2bbhhxj8sskh0gj
parent: jelmer at samba.org-20080622080012-ei0y16lts2z3hcb6
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 10:00:44 +0200
message:
Merge use of C-based repos bindings.
removed:
repos.py repos.py-20080621160832-kvb89lus284oufuq-1
added:
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
modified:
setup.py setup.py-20060502115218-86950492da22353f
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
------------------------------------------------------------
revno: 950.12.5
revision-id: jelmer at samba.org-20080622080012-ei0y16lts2z3hcb6
parent: jelmer at samba.org-20080622074440-ag2v3unt934qpmej
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-repos-cext
timestamp: Sun 2008-06-22 10:00:12 +0200
message:
Fix build with C-based repos module.
removed:
repos.py repos.py-20080621160832-kvb89lus284oufuq-1
modified:
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
------------------------------------------------------------
revno: 950.12.4
revision-id: jelmer at samba.org-20080622074440-ag2v3unt934qpmej
parent: jelmer at samba.org-20080621162914-djsxs1ep4c0bmwad
parent: jelmer at samba.org-20080622074304-a2bbhhxj8sskh0gj
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-repos-cext
timestamp: Sun 2008-06-22 09:44:40 +0200
message:
Merge 0.4.
removed:
delta.py delta.py-20080617225125-jeg43afui0czkuwk-1
ra.py ra.py-20080615005305-t5221niknu8rm6bt-1
added:
client.c client.pyx-20080313235339-wbyjbw2namuiql8f-1
delta.py delta.py-20080316001917-xyng7m3jlxvdc4c9-1
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
ra.h ra.h-20080621214350-wlaxxs087eiu02me-1
wc.h wc.h-20080622050149-ir7xe34a497adbmp-1
modified:
Makefile makefile.other-20080311181537-5svhje3v1flh1n4f-1
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
auth.py auth.py-20071209174622-w8d42k6nm5yhxvi8-1
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
core.py core.py-20080615010310-67lnibnp889hlarb-1
editor.c editor.c-20080602191336-frj7az1sdk13o1tw-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
format.py format.py-20070917005147-94kb7zysotf82kqw-1
layout.py layout.py-20080323165407-y9qw8nx4oykvoe1k-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
repos.py repos.py-20080621160832-kvb89lus284oufuq-1
setup.py setup.py-20060502115218-86950492da22353f
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_commit.py test_commit.py-20060624213521-l5kcufywkh9mnilk-1
tests/test_fetch.py test_fetch.py-20070624210302-luvgwjmlfysk5qeq-1
tests/test_push.py test_push.py-20070201165715-g2ievcdfqi33wqsy-1
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
tests/test_workingtree.py test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
util.c util.c-20080531154025-s8ef6ej9tytsnkkw-1
util.h util.h-20080531154025-s8ef6ej9tytsnkkw-2
wc.c wc.pyx-20080313142018-10l8l23vha2j9e6b-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 950.12.3
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: 950.12.2
revision-id: jelmer at samba.org-20080619172013-73xy4dzdrmin6lmw
parent: jelmer at samba.org-20080619155742-cb10ki8v5ceflqyw
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-ra
timestamp: Thu 2008-06-19 19:20:13 +0200
message:
Cherrypick repository C bindings.
modified:
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
------------------------------------------------------------
revno: 950.12.1
revision-id: jelmer at samba.org-20080619155742-cb10ki8v5ceflqyw
parent: jelmer at samba.org-20080619153347-eysgz8ci9hvjr5r3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4-ra
timestamp: Thu 2008-06-19 17:57:42 +0200
message:
Import own bindings for Subversion repos library.
added:
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
modified:
convert.py svn2bzr.py-20051018015439-cb4563bff29e632d
setup.py setup.py-20060502115218-86950492da22353f
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
------------------------------------------------------------
revno: 950.3.198
revision-id: jelmer at samba.org-20080622074304-a2bbhhxj8sskh0gj
parent: jelmer at samba.org-20080622073816-k3b3c3jkddeqr287
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 09:43:04 +0200
message:
Fix dependency on svn.repos
modified:
repos.py repos.py-20080621160832-kvb89lus284oufuq-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
------------------------------------------------------------
revno: 950.3.197
revision-id: jelmer at samba.org-20080622073816-k3b3c3jkddeqr287
parent: jelmer at samba.org-20080622073715-ygjbmezdws9aru0i
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 09:38:16 +0200
message:
Skip test that breaks with svn 1.5.
modified:
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
------------------------------------------------------------
revno: 950.3.196
revision-id: jelmer at samba.org-20080622073715-ygjbmezdws9aru0i
parent: jelmer at samba.org-20080622072225-p8pu2abk18l72gp1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-22 09:37:15 +0200
message:
Remove unused imports.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
branch.py svnbranch.py-20051017135706-11c749eb0dab04a7
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
format.py format.py-20070917005147-94kb7zysotf82kqw-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
tests/test_convert.py test_convert.py-20060705203611-b1l0bapeku6foco0-1
tests/test_repos.py test_repos.py-20060508151940-ddc49a59257ca712
=== modified file '__init__.py'
--- a/__init__.py 2008-06-22 07:34:26 +0000
+++ b/__init__.py 2008-06-22 08:12:16 +0000
@@ -64,6 +64,22 @@
if not (bzrlib_version[0], bzrlib_version[1]-1) in desired:
raise BzrError('Version mismatch')
+def check_subversion_version():
+ """Check that Subversion is compatible.
+
+ """
+ try:
+ from bzrlib.plugins.svn import core
+ except:
+ warning("Unable to load bzr-svn extensions - did you build it?")
+ from bzrlib.plugins.svn.ra import version
+ ra_version = version()
+ if (ra_version[0] >= 5 and getattr(ra, 'SVN_REVISION', None) and 27729 <= ra.SVN_REVISION < 31470):
+ warning('Installed Subversion has buggy svn.ra.get_log() implementation, please install newer.')
+
+ mutter("bzr-svn: using Subversion %d.%d.%d (%s)" % ra_version)
+
+
def check_rebase_version(min_version):
"""Check what version of bzr-rebase is installed.
@@ -82,24 +98,6 @@
raise RebaseNotPresent(e)
-def check_subversion_version():
- """Check that Subversion is compatible.
-
- """
- try:
- from bzrlib.plugins.svn import core
- except:
- warning("Unable to load bzr-svn extensions - did you build it?")
- from bzrlib.plugins.svn.ra import version
- ra_version = version()
- if (ra_version[0] >= 5 and getattr(ra, 'SVN_REVISION', None) and 27729 <= ra.SVN_REVISION < 31470):
- warning('Installed Subversion has buggy svn.ra.get_log() implementation, please install newer.')
-
- mutter("bzr-svn: using Subversion %d.%d.%d (%s)" % ra_version)
-
-
-
-
register_transport_proto('svn+ssh://',
help="Access using the Subversion smart server tunneled over SSH.")
register_transport_proto('svn+file://',
=== modified file 'core.c'
--- a/core.c 2008-06-04 22:09:09 +0000
+++ b/core.c 2008-06-22 08:12:16 +0000
@@ -35,7 +35,7 @@
apr_time_t when;
if (!PyArg_ParseTuple(args, "L", &when))
return NULL;
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return NULL;
ret = PyString_FromString(svn_time_to_cstring(when, pool));
@@ -53,7 +53,7 @@
if (!PyArg_ParseTuple(args, "s", &data))
return NULL;
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return NULL;
RUN_SVN_WITH_POOL(pool, svn_time_from_cstring(&when, data, pool));
@@ -87,7 +87,7 @@
if (!PyArg_ParseTuple(args, "|z", &config_dir))
return NULL;
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return NULL;
@@ -123,7 +123,7 @@
return;
apr_initialize();
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return;
svn_utf_initialize(pool);
=== modified file 'fetch.py'
--- a/fetch.py 2008-06-22 07:34:26 +0000
+++ b/fetch.py 2008-06-22 08:12:16 +0000
@@ -40,8 +40,6 @@
from bzrlib.plugins.svn.tree import (parse_externals_description,
inventory_add_external)
-import svn.delta
-
def _escape_commit_message(message):
"""Replace xml-incompatible control characters."""
if message is None:
=== modified file 'format.py'
--- a/format.py 2008-06-22 07:34:26 +0000
+++ b/format.py 2008-06-22 08:12:16 +0000
@@ -125,11 +125,11 @@
raise bzr_errors.NotBranchError(path=transport.base)
def _open(self, transport):
- from bzrlib.plugins.svn.core import SubversionException
from workingtree import SvnCheckout
+ from bzrlib.plugins.svn import core
try:
return SvnCheckout(transport, self)
- except SubversionException, (_, num):
+ except core.SubversionException, (_, num):
if num in (errors.ERR_RA_LOCAL_REPOS_OPEN_FAILED,):
raise errors.NoSvnRepositoryPresent(transport.base)
raise
=== modified file 'mapping.py'
--- a/mapping.py 2008-06-15 00:41:08 +0000
+++ b/mapping.py 2008-06-22 08:12:16 +0000
@@ -19,7 +19,7 @@
from bzrlib.errors import InvalidRevisionId
from bzrlib.trace import mutter
-from bzrlib.plugins.svn import core, constants, version_info, errors, properties
+from bzrlib.plugins.svn import core, errors, properties, version_info
import calendar
import sha
import time
=== modified file 'repos.c'
--- a/repos.c 2008-06-03 05:32:05 +0000
+++ b/repos.c 2008-06-22 08:12:16 +0000
@@ -45,12 +45,12 @@
if (!PyArg_ParseTuple(args, "s|OO", &path, &config, &fs_config))
return NULL;
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return NULL;
- hash_config = NULL; /* FIXME */
- hash_fs_config = NULL; /* FIXME */
- RUN_SVN_WITH_POOL(pool, svn_repos_create(&repos, path, "", "",
+ hash_config = apr_hash_make(pool); /* FIXME */
+ hash_fs_config = apr_hash_make(pool); /* FIXME */
+ RUN_SVN_WITH_POOL(pool, svn_repos_create(&repos, path, NULL, NULL,
hash_config, hash_fs_config, pool));
ret = PyObject_New(RepositoryObject, &Repository_Type);
@@ -83,7 +83,7 @@
if (ret == NULL)
return NULL;
- ret->pool = Pool();
+ ret->pool = Pool(NULL);
if (ret->pool == NULL)
return NULL;
if (!check_error(svn_repos_open(&ret->repos, path, ret->pool))) {
@@ -110,6 +110,11 @@
fs = svn_repos_fs(reposobj->repos);
+ if (fs == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "Unable to obtain fs handle");
+ return NULL;
+ }
+
ret = PyObject_New(FileSystemObject, &FileSystem_Type);
if (ret == NULL)
return NULL;
@@ -129,7 +134,7 @@
PyObject *ret;
apr_pool_t *temp_pool;
- temp_pool = Pool();
+ temp_pool = Pool(NULL);
if (temp_pool == NULL)
return NULL;
RUN_SVN_WITH_POOL(temp_pool, svn_fs_get_uuid(fsobj->fs, &uuid, temp_pool));
@@ -179,7 +184,7 @@
&cancel_func))
return NULL;
- temp_pool = Pool();
+ temp_pool = Pool(NULL);
if (temp_pool == NULL)
return NULL;
RUN_SVN_WITH_POOL(temp_pool, svn_repos_load_fs2(reposobj->repos,
@@ -224,9 +229,10 @@
return;
apr_initialize();
- pool = Pool();
+ pool = Pool(NULL);
if (pool == NULL)
return;
+
svn_fs_initialize(pool);
mod = Py_InitModule3("repos", repos_module_methods, "Local repository management");
=== removed file 'repos.py'
--- a/repos.py 2008-06-22 04:41:33 +0000
+++ b/repos.py 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
-# 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(object):
- 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)
-
-
=== modified file 'tests/test_convert.py'
--- a/tests/test_convert.py 2008-06-05 10:23:08 +0000
+++ b/tests/test_convert.py 2008-06-22 08:12:16 +0000
@@ -25,14 +25,14 @@
from bzrlib.trace import mutter
import os, sys
+
+from bzrlib.plugins.svn import repos
from bzrlib.plugins.svn.convert import convert_repository, NotDumpFile, load_dumpfile
from bzrlib.plugins.svn.format import get_rich_root_format
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
-from bzrlib.plugins.svn import repos
-
class TestLoadDumpfile(TestCaseInTempDir):
def test_loaddumpfile(self):
dumpfile = os.path.join(self.test_dir, "dumpfile")
@@ -52,9 +52,9 @@
PROPS-END
""")
load_dumpfile(dumpfile, "d")
- r = repos.Repository("d")
+ fs = repos.Repository("d").fs()
self.assertEqual("6987ef2d-cd6b-461f-9991-6f1abef3bd59",
- r.fs().get_uuid())
+ fs.get_uuid())
def test_loaddumpfile_invalid(self):
dumpfile = os.path.join(self.test_dir, "dumpfile")
=== modified file 'tests/test_repository.py'
--- a/tests/test_repository.py 2008-06-22 07:34:26 +0000
+++ b/tests/test_repository.py 2008-06-22 08:12:16 +0000
@@ -27,7 +27,7 @@
from bzrlib.osutils import has_symlinks
from bzrlib.repository import Repository
from bzrlib.revision import NULL_REVISION, Revision
-from bzrlib.tests import TestCase
+from bzrlib.tests import TestCase, TestSkipped
import os, sys
@@ -973,6 +973,8 @@
[(l.branch_path, l.paths, l.revnum) for l in oldrepos.iter_reverse_branch_changes("trunk", 3, TrunkBranchingScheme())])
def test_control_code_msg(self):
+ if ra.version()[1] >= 5:
+ raise TestSkipped("Test not runnable with Subversion >= 1.5")
repos_url = self.make_client('d', 'dc')
self.build_tree({'dc/trunk': None})
More information about the bazaar-commits
mailing list