Rev 315: Merge 0.4.12. in http://bzr.debian.org/pkg-bazaar/bzr-svn/unstable
Jelmer Vernooij
jelmer at samba.org
Mon Sep 1 16:00:03 BST 2008
At http://bzr.debian.org/pkg-bazaar/bzr-svn/unstable
------------------------------------------------------------
revno: 315
revision-id: jelmer at samba.org-20080901150000-50hdevg6lq7o3vk8
parent: jelmer at samba.org-20080826204437-0jrr04e0a47v0qor
parent: jelmer at samba.org-20080901145741-ffxw9t868r8yb6oa
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: debian
timestamp: Mon 2008-09-01 17:00:00 +0200
message:
Merge 0.4.12.
modified:
AUTHORS AUTHORS-20060508114718-4c90c0062645106d
FAQ faq-20070910195147-p9u38s9wplds2d4o-1
NEWS news-20061231030336-h9fhq245ie0de8bs-1
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
cache.py cache.py-20070520185908-qbtlcet08bllgs0f-1
client.c client.pyx-20080313235339-wbyjbw2namuiql8f-1
debian/changelog changelog-20061009030331-beff4307o0ccq70i-3
editor.h editor.h-20080602191336-frj7az1sdk13o1tw-2
errors.py errors.py-20061226172623-w1sbj8ynpo0eojqp-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
ra.h ra.h-20080621214350-wlaxxs087eiu02me-1
remote.py format.py-20060406233823-b6fa009fe35dfde7
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
repository.py repository.py-20060306123302-1f8c5069b3fe0265
setup.py setup.py-20060502115218-86950492da22353f
stdbool.h stdbool.h-20080727235015-yn3xnbkxaaluvzd0-1
tags.py tags.py-20080822211316-scblu3akdvu0b64c-1
tests/test_workingtree.py test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
util.c util.c-20080531154025-s8ef6ej9tytsnkkw-1
util.h util.h-20080531154025-s8ef6ej9tytsnkkw-2
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
wc.c wc.pyx-20080313142018-10l8l23vha2j9e6b-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 220.36.690
tags: bzr-svn-0.4.12
revision-id: jelmer at samba.org-20080901145741-ffxw9t868r8yb6oa
parent: jelmer at samba.org-20080901143251-cu9sfftxigkvfbfi
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-01 16:57:41 +0200
message:
Release 0.4.12.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
------------------------------------------------------------
revno: 220.36.689
revision-id: jelmer at samba.org-20080901143251-cu9sfftxigkvfbfi
parent: jelmer at samba.org-20080901135109-30etl53iwe91foyb
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-01 16:32:51 +0200
message:
Don't link explicitly against apr libraries.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
setup.py setup.py-20060502115218-86950492da22353f
------------------------------------------------------------
revno: 220.36.688
revision-id: jelmer at samba.org-20080901135109-30etl53iwe91foyb
parent: jelmer at samba.org-20080901022247-3gfm3hutu2tiu8kf
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-01 15:51:09 +0200
message:
Warn that stacking is experimental when it's used.
modified:
repository.py repository.py-20060306123302-1f8c5069b3fe0265
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
------------------------------------------------------------
revno: 220.36.687
revision-id: jelmer at samba.org-20080901022247-3gfm3hutu2tiu8kf
parent: jelmer at samba.org-20080831231630-2ofs47zet20wdhkc
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-01 04:22:47 +0200
message:
Properly encode cache file path.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
repository.py repository.py-20060306123302-1f8c5069b3fe0265
------------------------------------------------------------
revno: 220.36.686
revision-id: jelmer at samba.org-20080831231630-2ofs47zet20wdhkc
parent: jelmer at samba.org-20080831193939-8iirm9frsmq29c95
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-01 01:16:30 +0200
message:
Fix pull into subversion working copies.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
tests/test_workingtree.py test_workingtree.py-20060622191524-0di7bc3q1ckdbybb-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 220.36.685
revision-id: jelmer at samba.org-20080831193939-8iirm9frsmq29c95
parent: jelmer at samba.org-20080831185749-62h5j0e8b8hxedum
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 21:39:39 +0200
message:
Add NEWS entry about fixed stdbool.h.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
------------------------------------------------------------
revno: 220.36.684
revision-id: jelmer at samba.org-20080831185749-62h5j0e8b8hxedum
parent: jelmer at samba.org-20080831183105-6frofg6ba1tq0uo8
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 20:57:49 +0200
message:
make sure bool is a char.
modified:
stdbool.h stdbool.h-20080727235015-yn3xnbkxaaluvzd0-1
------------------------------------------------------------
revno: 220.36.683
revision-id: jelmer at samba.org-20080831183105-6frofg6ba1tq0uo8
parent: jelmer at samba.org-20080831155123-i8f3it1nbdyi3bux
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 20:31:05 +0200
message:
Disable explicit reporting of revnum for all inventory entries.
modified:
AUTHORS AUTHORS-20060508114718-4c90c0062645106d
NEWS news-20061231030336-h9fhq245ie0de8bs-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
------------------------------------------------------------
revno: 220.36.682
revision-id: jelmer at samba.org-20080831155123-i8f3it1nbdyi3bux
parent: jelmer at samba.org-20080831142026-lhix2s9qpgp8vbv0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 17:51:23 +0200
message:
Improve mutters.
modified:
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
------------------------------------------------------------
revno: 220.36.681
revision-id: jelmer at samba.org-20080831142026-lhix2s9qpgp8vbv0
parent: jelmer at samba.org-20080831141955-q7spyujgevjfdrgj
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 16:20:26 +0200
message:
Add more mutters.
modified:
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
------------------------------------------------------------
revno: 220.36.680
revision-id: jelmer at samba.org-20080831141955-q7spyujgevjfdrgj
parent: jelmer at samba.org-20080831133914-0agydumldcdsowza
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 16:19:55 +0200
message:
Make sure we don't set the push location from a read transaction.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
------------------------------------------------------------
revno: 220.36.679
revision-id: jelmer at samba.org-20080831133914-0agydumldcdsowza
parent: jelmer at samba.org-20080831132941-bh4lny7uq6tlk7i1
author: Alexey Borzenkov <snaury at gmail.com>
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 15:39:14 +0200
message:
Use native Windows password prompter on Windows.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
------------------------------------------------------------
revno: 220.36.678
revision-id: jelmer at samba.org-20080831132941-bh4lny7uq6tlk7i1
parent: jelmer at samba.org-20080831113441-0vvugc9a2li9phsp
author: Alexey Borzenkov <snaury at gmail.com>
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 15:29:41 +0200
message:
Fix compilation on mingw.
modified:
AUTHORS AUTHORS-20060508114718-4c90c0062645106d
NEWS news-20061231030336-h9fhq245ie0de8bs-1
client.c client.pyx-20080313235339-wbyjbw2namuiql8f-1
editor.h editor.h-20080602191336-frj7az1sdk13o1tw-2
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
ra.h ra.h-20080621214350-wlaxxs087eiu02me-1
repos.c repos.pyx-20080314114432-g2b5lqe776tkbl4k-1
wc.c wc.pyx-20080313142018-10l8l23vha2j9e6b-1
------------------------------------------------------------
revno: 220.36.677
revision-id: jelmer at samba.org-20080831113441-0vvugc9a2li9phsp
parent: jelmer at samba.org-20080830224836-bs0k7tivuo4u7sad
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 13:34:41 +0200
message:
Fix syntax error.
modified:
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 220.36.676
revision-id: jelmer at samba.org-20080830224836-bs0k7tivuo4u7sad
parent: jelmer at samba.org-20080830220223-6s7zqpi7bwoz66pr
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 00:48:36 +0200
message:
Add NEWS entry for no longer showing backtrace on generic DAV request.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
------------------------------------------------------------
revno: 220.36.675
revision-id: jelmer at samba.org-20080830220223-6s7zqpi7bwoz66pr
parent: jelmer at samba.org-20080830215319-3debvjvecj23xq1v
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-08-31 00:02:23 +0200
message:
Use local application data directory on Windows for bzr-svn cache.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
cache.py cache.py-20070520185908-qbtlcet08bllgs0f-1
------------------------------------------------------------
revno: 220.36.674
revision-id: jelmer at samba.org-20080830215319-3debvjvecj23xq1v
parent: jelmer at samba.org-20080830151834-8c9m7ccojm5ldhu7
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sat 2008-08-30 23:53:19 +0200
message:
Don't show traceback on generic dav failure.
modified:
errors.py errors.py-20061226172623-w1sbj8ynpo0eojqp-1
------------------------------------------------------------
revno: 220.36.673
revision-id: jelmer at samba.org-20080830151834-8c9m7ccojm5ldhu7
parent: jelmer at samba.org-20080829101059-7nq9t0ifwdz7cbtx
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sat 2008-08-30 17:18:34 +0200
message:
Recommend --rich-root-pack for now.
modified:
FAQ faq-20070910195147-p9u38s9wplds2d4o-1
------------------------------------------------------------
revno: 220.36.672
revision-id: jelmer at samba.org-20080829101059-7nq9t0ifwdz7cbtx
parent: jelmer at samba.org-20080829085504-2halcduygazwdl46
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Fri 2008-08-29 12:10:59 +0200
message:
Fix compatibility with bzr 1.7.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
remote.py format.py-20060406233823-b6fa009fe35dfde7
------------------------------------------------------------
revno: 220.36.671
revision-id: jelmer at samba.org-20080829085504-2halcduygazwdl46
parent: jelmer at samba.org-20080828155955-9pf7dza4ll2iitel
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Fri 2008-08-29 10:55:04 +0200
message:
Fix warnings.
modified:
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
util.c util.c-20080531154025-s8ef6ej9tytsnkkw-1
------------------------------------------------------------
revno: 220.36.670
revision-id: jelmer at samba.org-20080828155955-9pf7dza4ll2iitel
parent: jelmer at samba.org-20080827182313-wpw7e6bh6zh79i10
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-08-28 17:59:55 +0200
message:
Fix contents of files when using stacked branching.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
------------------------------------------------------------
revno: 220.36.669
revision-id: jelmer at samba.org-20080827182313-wpw7e6bh6zh79i10
parent: jelmer at samba.org-20080827181449-bbyk5l7lo6gb35j3
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-27 20:23:13 +0200
message:
Canonicalize url.
modified:
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
------------------------------------------------------------
revno: 220.36.668
revision-id: jelmer at samba.org-20080827181449-bbyk5l7lo6gb35j3
parent: jelmer at samba.org-20080827173912-nn377l0t8yj0nfkq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-27 20:14:49 +0200
message:
Canonicalize more paths.
modified:
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
util.c util.c-20080531154025-s8ef6ej9tytsnkkw-1
util.h util.h-20080531154025-s8ef6ej9tytsnkkw-2
------------------------------------------------------------
revno: 220.36.667
revision-id: jelmer at samba.org-20080827173912-nn377l0t8yj0nfkq
parent: jelmer at samba.org-20080827173248-mhzk5odpw8w413dm
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-27 19:39:12 +0200
message:
Cope with svn+ prefix when setting tags.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
repository.py repository.py-20060306123302-1f8c5069b3fe0265
tags.py tags.py-20080822211316-scblu3akdvu0b64c-1
transport.py transport.py-20060406231150-b3472d06b3a0818d
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 220.36.666
revision-id: jelmer at samba.org-20080827173248-mhzk5odpw8w413dm
parent: jelmer at samba.org-20080827095753-8f2uiz5jzkvfjecl
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-27 19:32:48 +0200
message:
Remove evil _backing_url hack.
modified:
transport.py transport.py-20060406231150-b3472d06b3a0818d
------------------------------------------------------------
revno: 220.36.665
revision-id: jelmer at samba.org-20080827095753-8f2uiz5jzkvfjecl
parent: jelmer at samba.org-20080826204339-otrwrazsho6rme9m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-08-27 11:57:53 +0200
message:
Open 0.4.12 for development.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
setup.py setup.py-20060502115218-86950492da22353f
=== modified file 'AUTHORS'
--- a/AUTHORS 2008-08-22 14:56:28 +0000
+++ b/AUTHORS 2008-08-31 18:31:05 +0000
@@ -8,6 +8,8 @@
Erik Bågfors
Alexander Belchenko
Andrew Bennetts
+Wouter Bolsterlee
+Alexey Borzenkov
Andrew Cowie
Aaron Bentley
Max Bowser
=== modified file 'FAQ'
--- a/FAQ 2008-08-21 17:46:18 +0000
+++ b/FAQ 2008-08-30 15:18:34 +0000
@@ -17,7 +17,7 @@
::
- $ bzr upgrade --1.6-rich-root
+ $ bzr upgrade --rich-root-pack
Pushing a branch that didn't exist in Subversion yet with `bzr push` fails.
---------------------------------------------------------------------------
=== modified file 'NEWS'
--- a/NEWS 2008-08-26 20:44:10 +0000
+++ b/NEWS 2008-09-01 15:00:00 +0000
@@ -1,6 +1,43 @@
-bzr-svn-0.4.11 2008-08-26
-
-bzr-svn-0.4.11~rc2 2008-08-26
+bzr-svn 0.4.12 2008-09-01
+
+ BUG FIXES
+
+ * Cope with svn+ prefix when setting tags. (#261748)
+
+ * Fix contents of files when using stacked branching. (#262314)
+
+ * Fix compatibility with Bazaar 1.7.
+
+ * Use local application data directory on Windows for bzr-svn cache.
+ (#231041)
+
+ * No longer show backtrace when a generic DAV error occurs, as
+ this is usually a sign of a server-side error rather than a bug.
+ (#255159)
+
+ * Fix forward declarations of Python types, fixes
+ compilation on mingw. (#263284)
+
+ * Avoid explicit revnum reporting for inventory entries during fetch.
+ (It caused severe speed regressions and is not necessary).
+
+ * Fix size of bool variable in replacement stdbool.h. This was
+ causing strange errors on Windows, most notably slow fetches.
+
+ * Fix pull into Subversion working copies.
+
+ * Properly encode cache file path in case it contains non-ascii
+ characters. (#262923)
+
+ * Don't link explicitly against apr libraries. (#262711)
+
+ FEATURES
+
+ * Use native Windows password prompter on Windows. (#263287)
+
+bzr-svn 0.4.11 2008-08-26
+
+bzr-svn 0.4.11~rc2 2008-08-26
CHANGES
=== modified file '__init__.py'
--- a/__init__.py 2008-08-26 20:44:10 +0000
+++ b/__init__.py 2008-09-01 15:00:00 +0000
@@ -45,7 +45,7 @@
# versions ending in 'exp' mean experimental mappings
# versions ending in 'dev' mean development version
# versions ending in 'final' mean release (well tested, etc)
-version_info = (0, 4, 11, 'final', 0)
+version_info = (0, 4, 12, 'final', 0)
if version_info[3] == 'final':
version_string = '%d.%d.%d' % version_info[:3]
@@ -419,11 +419,11 @@
target_branch.unlock()
except NotBranchError:
target_branch = bzrdir.import_branch(source_branch, revision_id, _push_merged=merged)
- # We successfully created the target, remember it
- if source_branch.get_push_location() is None or remember:
- source_branch.set_push_location(target_branch.base)
finally:
source_branch.unlock()
+ # We successfully created the target, remember it
+ if source_branch.get_push_location() is None or remember:
+ source_branch.set_push_location(target_branch.base)
register_command(cmd_svn_push)
=== modified file 'cache.py'
--- a/cache.py 2008-08-26 04:49:14 +0000
+++ b/cache.py 2008-09-01 15:00:00 +0000
@@ -21,7 +21,7 @@
from bzrlib.trace import mutter, warning
from bzrlib.plugins.svn import version_info
-import os
+import os, sys
def create_cache_dir():
"""Create the top-level bzr-svn cache directory.
@@ -35,7 +35,17 @@
else:
name = 'svn-cache'
extra = ""
- cache_dir = os.path.join(config_dir(), name)
+ if sys.platform == "nt":
+ try:
+ from bzrlib.win32utils import get_local_appdata_location
+ except ImportError:
+ base_cache_dir = config_dir()
+ else:
+ base_cache_dir = get_local_appdata_location()
+ assert base_cache_dir is not None
+ else:
+ base_cache_dir = config_dir()
+ cache_dir = os.path.join(base_cache_dir, name)
if not os.path.exists(cache_dir):
os.mkdir(cache_dir)
=== modified file 'client.c'
--- a/client.c 2008-08-01 20:55:49 +0000
+++ b/client.c 2008-08-31 13:29:41 +0000
@@ -27,9 +27,9 @@
#include "ra.h"
#include "wc.h"
-PyAPI_DATA(PyTypeObject) Client_Type;
-PyAPI_DATA(PyTypeObject) Config_Type;
-PyAPI_DATA(PyTypeObject) ConfigItem_Type;
+extern PyTypeObject Client_Type;
+extern PyTypeObject Config_Type;
+extern PyTypeObject ConfigItem_Type;
typedef struct {
PyObject_HEAD
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-08-26 20:44:37 +0000
+++ b/debian/changelog 2008-09-01 15:00:00 +0000
@@ -1,3 +1,9 @@
+bzr-svn (0.4.12-1) experimental; urgency=low
+
+ * New upstream release.
+
+ -- Jelmer Vernooij <jelmer at samba.org> Mon, 01 Sep 2008 16:59:26 +0200
+
bzr-svn (0.4.11-1) experimental; urgency=low
* New upstream release.
=== modified file 'editor.h'
--- a/editor.h 2008-06-19 15:33:26 +0000
+++ b/editor.h 2008-08-31 13:29:41 +0000
@@ -22,10 +22,10 @@
#pragma GCC visibility push(hidden)
-PyAPI_DATA(PyTypeObject) DirectoryEditor_Type;
-PyAPI_DATA(PyTypeObject) FileEditor_Type;
-PyAPI_DATA(PyTypeObject) Editor_Type;
-PyAPI_DATA(PyTypeObject) TxDeltaWindowHandler_Type;
+extern PyTypeObject DirectoryEditor_Type;
+extern PyTypeObject FileEditor_Type;
+extern PyTypeObject Editor_Type;
+extern PyTypeObject TxDeltaWindowHandler_Type;
PyObject *new_editor_object(const svn_delta_editor_t *editor, void *baton, apr_pool_t *pool, PyTypeObject *type, void (*done_cb) (void *baton), void *done_baton);
#define DirectoryEditor_Check(op) PyObject_TypeCheck(op, &DirectoryEditor_Type)
=== modified file 'errors.py'
--- a/errors.py 2008-08-26 04:49:14 +0000
+++ b/errors.py 2008-09-01 15:00:00 +0000
@@ -110,6 +110,14 @@
self.name = name
+class DavRequestFailed(BzrError):
+ _fmt = """%(msg)s"""
+
+ def __init__(self, msg):
+ BzrError.__init__(self)
+ self.msg = msg
+
+
def convert_error(err):
"""Convert a Subversion exception to the matching BzrError.
@@ -134,6 +142,8 @@
return RaRequestFailed(msg)
elif num == ERR_UNKNOWN_HOSTNAME:
return ConnectionError(msg=msg)
+ elif num == ERR_RA_DAV_REQUEST_FAILED:
+ return DavRequestFailed(msg)
elif num > 0 and num < 1000:
return OSError(num, msg)
else:
=== modified file 'fetch.py'
--- a/fetch.py 2008-08-26 04:49:14 +0000
+++ b/fetch.py 2008-09-01 15:00:00 +0000
@@ -585,11 +585,6 @@
def report_inventory_contents(reporter, inv, revnum, start_empty):
try:
reporter.set_path("", revnum, start_empty)
-
- # Report status of existing paths
- for path, entry in inv.iter_entries():
- if path != "":
- reporter.set_path(path.encode("utf-8"), revnum, start_empty)
except:
reporter.abort()
raise
@@ -755,15 +750,17 @@
try:
conn = None
try:
- conn = self.source.transport.connections.get(urlutils.join(repos_root, parent_branch))
+ conn = self.source.transport.get_connection(parent_branch)
assert revmeta.revnum > parent_revnum or start_empty
if parent_branch != revmeta.branch_path:
+ self.source.transport.mutter("svn switch -r%d:%d -> %s" % (parent_revnum, revmeta.revnum, revmeta.branch_path))
reporter = conn.do_switch(revmeta.revnum, "", True,
_url_escape_uri(urlutils.join(repos_root, revmeta.branch_path)),
editor)
else:
+ self.source.transport.mutter("svn update -r%d:%d" % (parent_revnum, revmeta.revnum))
reporter = conn.do_update(revmeta.revnum, "", True, editor)
report_inventory_contents(reporter, parent_inv, parent_revnum, start_empty)
=== modified file 'ra.c'
--- a/ra.c 2008-08-26 01:52:33 +0000
+++ b/ra.c 2008-08-31 13:39:14 +0000
@@ -32,11 +32,11 @@
static PyObject *busy_exc;
-PyAPI_DATA(PyTypeObject) Reporter_Type;
-PyAPI_DATA(PyTypeObject) RemoteAccess_Type;
-PyAPI_DATA(PyTypeObject) AuthProvider_Type;
-PyAPI_DATA(PyTypeObject) CredentialsIter_Type;
-PyAPI_DATA(PyTypeObject) TxDeltaWindowHandler_Type;
+extern PyTypeObject Reporter_Type;
+extern PyTypeObject RemoteAccess_Type;
+extern PyTypeObject AuthProvider_Type;
+extern PyTypeObject CredentialsIter_Type;
+extern PyTypeObject TxDeltaWindowHandler_Type;
static svn_error_t *py_commit_callback(const svn_commit_info_t *commit_info, void *baton, apr_pool_t *pool)
{
@@ -766,7 +766,7 @@
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- err = svn_ra_open2(&ret->ra, apr_pstrdup(ret->pool, url),
+ err = svn_ra_open2(&ret->ra, svn_path_canonicalize(url, ret->pool),
callbacks2, ret, config_hash, ret->pool);
Py_END_ALLOW_THREADS
if (!check_error(err)) {
@@ -874,7 +874,7 @@
* so tweak our own parameters a bit. */
apr_paths = apr_array_make(temp_pool, 1, sizeof(char *));
APR_ARRAY_PUSH(apr_paths, char *) = apr_pstrdup(temp_pool, "");
- } else if (!string_list_to_apr_array(temp_pool, paths, &apr_paths)) {
+ } else if (!path_list_to_apr_array(temp_pool, paths, &apr_paths)) {
apr_pool_destroy(temp_pool);
return NULL;
}
@@ -1251,9 +1251,11 @@
const svn_delta_editor_t *editor;
void *edit_baton;
RemoteAccessObject *ra = (RemoteAccessObject *)self;
- apr_hash_t *hash_lock_tokens, *hash_revprops;
+ apr_hash_t *hash_lock_tokens;
#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 5
PyObject *py_log_msg;
+#else
+ apr_hash_t *hash_revprops;
#endif
svn_error_t *err;
@@ -1763,7 +1765,7 @@
if (temp_pool == NULL)
return NULL;
- if (!string_list_to_apr_array(temp_pool, paths, &apr_paths)) {
+ if (!path_list_to_apr_array(temp_pool, paths, &apr_paths)) {
apr_pool_destroy(temp_pool);
return NULL;
}
@@ -2727,12 +2729,38 @@
return (PyObject *)auth;
}
+#if defined(WIN32)
+static PyObject *get_windows_simple_provider(PyObject* self)
+{
+ AuthProviderObject *auth = PyObject_New(AuthProviderObject, &AuthProvider_Type);
+ auth->pool = Pool(NULL);
+ if (auth->pool == NULL)
+ return NULL;
+ svn_auth_get_windows_simple_provider(&auth->provider, auth->pool);
+ return (PyObject *)auth;
+}
+
+static PyObject *get_windows_ssl_server_trust_provider(PyObject *self)
+{
+ AuthProviderObject *auth = PyObject_New(AuthProviderObject, &AuthProvider_Type);
+ auth->pool = Pool(NULL);
+ if (auth->pool == NULL)
+ return NULL;
+ svn_auth_get_windows_ssl_server_trust_provider(&auth->provider, auth->pool);
+ return (PyObject *)auth;
+}
+#endif
+
static PyMethodDef ra_module_methods[] = {
{ "version", (PyCFunction)version, METH_NOARGS, NULL },
{ "get_ssl_client_cert_pw_file_provider", (PyCFunction)get_ssl_client_cert_pw_file_provider, METH_NOARGS, NULL },
{ "get_ssl_client_cert_file_provider", (PyCFunction)get_ssl_client_cert_file_provider, METH_NOARGS, NULL },
{ "get_ssl_server_trust_file_provider", (PyCFunction)get_ssl_server_trust_file_provider, METH_NOARGS, NULL },
{ "get_simple_provider", (PyCFunction)get_simple_provider, METH_NOARGS, NULL },
+#if defined(WIN32)
+ { "get_windows_simple_provider", (PyCFunction)get_windows_simple_provider, METH_NOARGS, NULL },
+ { "get_windows_ssl_server_trust_provider", (PyCFunction)get_windows_ssl_server_trust_provider, METH_NOARGS, NULL },
+#endif
{ "get_username_prompt_provider", (PyCFunction)get_username_prompt_provider, METH_VARARGS, NULL },
{ "get_simple_prompt_provider", (PyCFunction)get_simple_prompt_provider, METH_VARARGS, NULL },
{ "get_ssl_server_trust_prompt_provider", (PyCFunction)get_ssl_server_trust_prompt_provider, METH_VARARGS, NULL },
=== modified file 'ra.h'
--- a/ra.h 2008-06-21 21:44:04 +0000
+++ b/ra.h 2008-08-31 13:29:41 +0000
@@ -20,7 +20,7 @@
#ifndef _BZR_SVN_RA_H_
#define _BZR_SVN_RA_H_
-PyAPI_DATA(PyTypeObject) Auth_Type;
+extern PyTypeObject Auth_Type;
typedef struct {
PyObject_HEAD
=== modified file 'remote.py'
--- a/remote.py 2008-08-26 04:49:14 +0000
+++ b/remote.py 2008-09-01 15:00:00 +0000
@@ -85,9 +85,12 @@
transport = transport.clone_root()
return SvnRepository(self, transport, self.branch_path)
- def cloning_metadir(self):
+ def cloning_metadir(self, stacked=False):
"""Produce a metadir suitable for cloning with."""
- return bzrlib.bzrdir.format_registry.make_bzrdir("rich-root-pack")
+ if stacked:
+ return bzrlib.bzrdir.format_registry.make_bzrdir("1.6-rich-root")
+ else:
+ return bzrlib.bzrdir.format_registry.make_bzrdir("rich-root-pack")
def open_workingtree(self, _unsupported=False,
recommend_upgrade=True):
=== modified file 'repos.c'
--- a/repos.c 2008-08-24 03:34:05 +0000
+++ b/repos.c 2008-08-31 13:29:41 +0000
@@ -24,8 +24,8 @@
#include "util.h"
-PyAPI_DATA(PyTypeObject) Repository_Type;
-PyAPI_DATA(PyTypeObject) FileSystem_Type;
+extern PyTypeObject Repository_Type;
+extern PyTypeObject FileSystem_Type;
typedef struct {
PyObject_HEAD
=== modified file 'repository.py'
--- a/repository.py 2008-08-26 04:49:14 +0000
+++ b/repository.py 2008-09-01 15:00:00 +0000
@@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""Subversion repository access."""
-from bzrlib import osutils, ui, urlutils, xml7
+from bzrlib import osutils, ui, urlutils, xml6
from bzrlib.branch import BranchCheckResult
from bzrlib.errors import (InvalidRevisionId, NoSuchRevision, NotBranchError,
UninitializableFormat)
@@ -186,7 +186,7 @@
assert self.uuid is not None
self.base = transport.base
assert self.base is not None
- self._serializer = xml7.serializer_v7
+ self._serializer = xml6.serializer_v6
self.get_config().add_location(self.base)
self._log = logwalker.LogWalker(transport=transport)
self.fileid_map = FileIdMap(simple_apply_changes, self)
@@ -202,7 +202,7 @@
cache_dir = self.create_cache_dir()
cache_file = os.path.join(cache_dir, 'cache-v%d' % CACHE_DB_VERSION)
if not cachedbs.has_key(cache_file):
- cachedbs[cache_file] = sqlite3.connect(cache_file)
+ cachedbs[cache_file] = sqlite3.connect(cache_file.encode(osutils._fs_enc))
self.cachedb = cachedbs[cache_file]
self._log = logwalker.CachingLogWalker(self._log, cache_db=self.cachedb)
cachedir_transport = get_transport(cache_dir)
@@ -353,7 +353,7 @@
self.get_fileid_map(revision.svn_meta.revnum,
revision.svn_meta.branch_path,
revision.svn_mapping), parentfileidmap)
- conn = self.transport.connections.get(urlutils.join(self.transport.get_svn_repos_root(), parent_branch_path))
+ conn = self.transport.get_connection(parent_branch_path)
try:
reporter = conn.do_diff(revision.svn_meta.revnum, "", urlutils.join(self.transport.get_svn_repos_root(), revision.svn_meta.branch_path), editor, True, True, False)
reporter.set_path("", parentrevnum, start_empty)
=== modified file 'setup.py'
--- a/setup.py 2008-08-26 20:44:10 +0000
+++ b/setup.py 2008-09-01 15:00:00 +0000
@@ -86,8 +86,7 @@
includedir = apr_config("--includedir")
if not os.path.isdir(includedir):
raise Exception("APR development headers not found")
- ldflags = filter(lambda x: x != "", apr_config("--link-ld").split(" "))
- return (includedir, ldflags)
+ return (includedir,)
def svn_build_data():
@@ -114,7 +113,7 @@
# just clobber the functions above we can't use
# for simplicitly, everything is done in the 'svn' one
def apr_build_data():
- return '.', ''
+ return '.',
def svn_build_data():
# environment vars for the directories we need.
@@ -164,13 +163,12 @@
return includes, lib_dirs, libs,
-(apr_includedir, apr_ldflags) = apr_build_data()
+(apr_includedir, ) = apr_build_data()
(svn_includedirs, svn_libdirs, extra_libs) = svn_build_data()
def SvnExtension(name, *args, **kwargs):
kwargs["include_dirs"] = [apr_includedir] + svn_includedirs
kwargs["library_dirs"] = svn_libdirs
- kwargs["extra_link_args"] = apr_ldflags
if os.name == 'nt':
# on windows, just ignore and overwrite the libraries!
kwargs["libraries"] = extra_libs
@@ -219,7 +217,7 @@
setup(name='bzr-svn',
description='Support for Subversion branches in Bazaar',
keywords='plugin bzr svn',
- version='0.4.11',
+ version='0.4.12',
url='http://bazaar-vcs.org/BzrForeignBranches/Subversion',
download_url='http://bazaar-vcs.org/BzrSvn',
license='GPL',
=== modified file 'stdbool.h'
--- a/stdbool.h 2008-07-27 23:50:52 +0000
+++ b/stdbool.h 2008-08-31 18:57:49 +0000
@@ -1,7 +1,9 @@
#ifndef _STDBOOL_H_
#define _STDBOOL_H_
-typedef enum { false, true } bool;
+typedef char bool;
+#define true 1
+#define false 0
#endif
=== modified file 'tags.py'
--- a/tags.py 2008-08-26 04:29:43 +0000
+++ b/tags.py 2008-08-27 17:39:12 +0000
@@ -73,7 +73,7 @@
if from_bp == path:
return
self._ensure_tag_parent_exists(parent)
- conn = self.repository.transport.connections.get(urlutils.join(self.repository.base, parent))
+ conn = self.repository.transport.get_connection(parent)
deletefirst = (conn.check_path(urlutils.basename(path), self.repository.get_latest_revnum()) != core.NODE_NONE)
try:
ci = conn.get_commit_editor({properties.PROP_REVISION_LOG: "Add tag %s" % tag_name.encode("utf-8")})
@@ -116,7 +116,7 @@
def delete_tag(self, tag_name):
path = self.branch.layout.get_tag_path(tag_name, self.branch.project)
parent = urlutils.dirname(path)
- conn = self.repository.transport.connections.get(urlutils.join(self.repository.base, parent))
+ conn = self.repository.transport.get_connection(parent)
try:
if conn.check_path(urlutils.basename(path), self.repository.get_latest_revnum()) != core.NODE_DIR:
raise NoSuchTag(tag_name)
=== modified file 'tests/test_workingtree.py'
--- a/tests/test_workingtree.py 2008-08-26 04:49:14 +0000
+++ b/tests/test_workingtree.py 2008-09-01 15:00:00 +0000
@@ -346,6 +346,18 @@
tree.basis_tree()
delta = tree.changes_from(tree.basis_tree())
self.assertEqual("bl", delta.modified[0][0])
+
+ def test_pull(self):
+ repos_url = self.make_client('a', 'dc')
+
+ dc = self.get_commit_editor(repos_url)
+ dc.add_dir("bar")
+ dc.close()
+
+ tree = WorkingTree.open("dc")
+ br = Branch.open(repos_url)
+ tree.pull(br)
+ self.assertEquals(tree.last_revision(), br.last_revision())
def test_working_inventory(self):
self.make_client('a', 'dc')
=== modified file 'transport.py'
--- a/transport.py 2008-08-26 20:44:10 +0000
+++ b/transport.py 2008-09-01 15:00:00 +0000
@@ -173,21 +173,16 @@
This implements just as much of Transport as is necessary
to fool Bazaar. """
@convert_svn_error
- def __init__(self, url="", _backing_url=None, pool=None, _uuid=None, _repos_root=None):
+ def __init__(self, url="", pool=None, _uuid=None, _repos_root=None):
bzr_url = url
self.svn_url = bzr_to_svn_url(url)
- # _backing_url is an evil hack so the root directory of a repository
- # can be accessed on some HTTP repositories.
- if _backing_url is None:
- _backing_url = self.svn_url
- self._backing_url = _backing_url.rstrip("/")
Transport.__init__(self, bzr_url)
if pool is None:
self.connections = ConnectionPool()
# Make sure that the URL is valid by connecting to it.
- self.connections.add(self.connections.get(self._backing_url))
+ self.connections.add(self.connections.get(self.svn_url))
else:
self.connections = pool
@@ -198,8 +193,12 @@
from bzrlib.plugins.svn import lazy_check_versions
lazy_check_versions()
- def get_connection(self):
- return self.connections.get(self._backing_url)
+ def get_connection(self, repos_path=None):
+ if repos_path is not None:
+ return self.connections.get(urlutils.join(self.get_svn_repos_root(),
+ repos_path))
+ else:
+ return self.connections.get(self.svn_url)
def add_connection(self, conn):
self.connections.add(conn)
@@ -308,8 +307,8 @@
if paths is None:
newpaths = None
else:
- newpaths = [self._request_path(path) for path in paths]
-
+ newpaths = [p.rstrip("/") for p in paths]
+
fetcher = logfetcher(self, paths=newpaths, start=from_revnum, end=to_revnum, limit=limit, discover_changed_paths=discover_changed_paths, strict_node_history=strict_node_history, include_merged_revisions=include_merged_revisions, revprops=revprops)
fetcher.start()
return iter(fetcher.next, None)
@@ -331,7 +330,7 @@
if paths is None:
newpaths = None
else:
- newpaths = [self._request_path(path) for path in paths]
+ newpaths = [p.rstrip("/") for p in paths]
conn = self.get_connection()
try:
@@ -343,11 +342,6 @@
finally:
self.add_connection(conn)
- def _open_real_transport(self):
- if self._backing_url != self.svn_url:
- return self.connections.get(self.svn_url)
- return self.get_connection()
-
def change_rev_prop(self, revnum, name, value):
conn = self.get_connection()
self.mutter('svn change-revprop -r%d %s=%s' % (revnum, name, value))
@@ -357,7 +351,6 @@
self.add_connection(conn)
def get_dir(self, path, revnum, kind=False):
- path = self._request_path(path)
conn = self.get_connection()
self.mutter('svn get-dir -r%d %s' % (revnum, path))
try:
@@ -366,7 +359,6 @@
self.add_connection(conn)
def get_file(self, path, stream, revnum):
- path = self._request_path(path)
conn = self.get_connection()
self.mutter('svn get-file -r%d %s' % (revnum, path))
try:
@@ -378,16 +370,6 @@
if 'transport' in debug.debug_flags:
mutter(text, *args)
- def _request_path(self, relpath):
- if self._backing_url == self.svn_url:
- return relpath.strip("/")
- newsvnurl = urlutils.join(self.svn_url, relpath)
- if newsvnurl == self._backing_url:
- return ""
- newrelpath = urlutils.relative_url(self._backing_url+"/", newsvnurl+"/").strip("/")
- self.mutter('request path %r -> %r', relpath, newrelpath)
- return newrelpath
-
def list_dir(self, relpath):
assert len(relpath) == 0 or relpath[0] != "/"
if relpath == ".":
@@ -401,7 +383,6 @@
return dirents.keys()
def check_path(self, path, revnum):
- path = self._request_path(path)
conn = self.get_connection()
self.mutter('svn check-path -r%d %s' % (revnum, path))
try:
=== modified file 'util.c'
--- a/util.c 2008-08-24 16:44:21 +0000
+++ b/util.c 2008-08-29 08:55:04 +0000
@@ -25,6 +25,7 @@
#include <svn_error_codes.h>
#include <svn_config.h>
#include <svn_version.h>
+#include <svn_path.h>
#include "util.h"
@@ -121,6 +122,32 @@
return true;
}
+bool path_list_to_apr_array(apr_pool_t *pool, PyObject *l, apr_array_header_t **ret)
+{
+ int i;
+ if (l == Py_None) {
+ *ret = NULL;
+ return true;
+ }
+ if (!PyList_Check(l)) {
+ PyErr_Format(PyExc_TypeError, "Expected list of strings, got: %s",
+ l->ob_type->tp_name);
+ return false;
+ }
+ *ret = apr_array_make(pool, PyList_Size(l), sizeof(char *));
+ for (i = 0; i < PyList_GET_SIZE(l); i++) {
+ PyObject *item = PyList_GET_ITEM(l, i);
+ if (!PyString_Check(item)) {
+ PyErr_Format(PyExc_TypeError, "Expected list of strings, item was %s", item->ob_type->tp_name);
+ return false;
+ }
+ APR_ARRAY_PUSH(*ret, const char *) = svn_path_canonicalize(PyString_AsString(item), pool);
+ }
+ return true;
+}
+
+
+
PyObject *prop_hash_to_dict(apr_hash_t *props)
{
const char *key;
=== modified file 'util.h'
--- a/util.h 2008-08-24 14:51:43 +0000
+++ b/util.h 2008-08-27 18:14:49 +0000
@@ -30,6 +30,7 @@
__attribute__((warn_unused_result)) apr_pool_t *Pool(apr_pool_t *parent);
__attribute__((warn_unused_result)) bool check_error(svn_error_t *error);
bool string_list_to_apr_array(apr_pool_t *pool, PyObject *l, apr_array_header_t **);
+bool path_list_to_apr_array(apr_pool_t *pool, PyObject *l, apr_array_header_t **);
PyObject *prop_hash_to_dict(apr_hash_t *props);
apr_hash_t *prop_dict_to_hash(apr_pool_t *pool, PyObject *py_props);
svn_error_t *py_svn_log_wrapper(void *baton, apr_hash_t *changed_paths,
=== modified file 'versionedfiles.py'
--- a/versionedfiles.py 2008-08-23 17:55:26 +0000
+++ b/versionedfiles.py 2008-09-01 13:51:09 +0000
@@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from bzrlib import osutils, urlutils
+from bzrlib.trace import warning
from bzrlib.versionedfile import FulltextContentFactory, VersionedFiles, VirtualVersionedFiles
from bzrlib.plugins.svn.core import SubversionException
@@ -21,6 +22,8 @@
from cStringIO import StringIO
+_warned_experimental = False
+
class SvnTexts(VersionedFiles):
"""Subversion texts backend."""
@@ -34,6 +37,10 @@
raise NotImplementedError(self.add_mpdiffs)
def get_record_stream(self, keys, ordering, include_delta_closure):
+ global _warned_experimental
+ if not _warned_experimental:
+ warning("stacking support in bzr-svn is experimental.")
+ _warned_experimental = True
# TODO: there may be valid text revisions that only exist as
# ghosts in the repository itself. This function will
# not be able to report them.
@@ -49,6 +56,7 @@
try:
stream = StringIO()
self.repository.transport.get_file(urlutils.join(branch, k), stream, revnum)
+ stream.seek(0)
lines = stream.readlines()
except SubversionException, (_, num):
if num == ERR_FS_NOT_FILE:
=== modified file 'wc.c'
--- a/wc.c 2008-08-25 02:51:10 +0000
+++ b/wc.c 2008-08-31 13:29:41 +0000
@@ -26,8 +26,8 @@
#include "util.h"
#include "editor.h"
-PyAPI_DATA(PyTypeObject) Entry_Type;
-PyAPI_DATA(PyTypeObject) Adm_Type;
+extern PyTypeObject Entry_Type;
+extern PyTypeObject Adm_Type;
static PyObject *py_entry(const svn_wc_entry_t *entry);
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-08-26 04:49:14 +0000
+++ b/workingtree.py 2008-09-01 15:00:00 +0000
@@ -159,7 +159,7 @@
revnum = self.branch.get_revnum()
adm = self._get_wc(write_lock=True)
try:
- conn = self.branch.repository.transport.connections.get(bzr_to_svn_url(self.branch.base))
+ conn = self.branch.repository.transport.get_connection(self.branch.get_branch_path())
try:
update_wc(adm, self.basedir, conn, revnum)
finally:
@@ -592,7 +592,7 @@
if stop_revision is None:
stop_revision = self.branch.last_revision()
revnumber = self.branch.lookup_revision_id(stop_revision)
- fetched = self._update(revnum)
+ fetched = self._update(revnumber)
self.base_revnum = fetched
self.base_revid = self.branch.generate_revision_id(fetched)
self.base_tree = None
More information about the bazaar-commits
mailing list