Rev 1021: Properlyt warn when trying to open a working copy that uses a (too) new format. in file:///data/jelmer/bzr-svn/pyrex/
Jelmer Vernooij
jelmer at samba.org
Fri Mar 21 13:01:37 GMT 2008
At file:///data/jelmer/bzr-svn/pyrex/
------------------------------------------------------------
revno: 1021
revision-id: jelmer at samba.org-20080321130135-6jfpe16ffcxr3lvk
parent: jelmer at samba.org-20080321124458-92ulq3k4e9lijzsv
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: pyrex
timestamp: Fri 2008-03-21 14:01:35 +0100
message:
Properlyt warn when trying to open a working copy that uses a (too) new format.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
constants.py constants.py-20080313210342-fuq3eruf2102bwml-1
ra.pyx ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'NEWS'
--- a/NEWS 2008-03-16 14:51:30 +0000
+++ b/NEWS 2008-03-21 13:01:35 +0000
@@ -16,6 +16,8 @@
* Be a bit quieter with messages about experimental mappings. (#162496)
+ * Properly warn when trying to open a working copy with a newer version.
+
INTERNALS
* Allow multiple mappings to be available at the same time.
=== modified file 'constants.py'
--- a/constants.py 2008-03-16 17:57:35 +0000
+++ b/constants.py 2008-03-21 13:01:35 +0000
@@ -36,6 +36,7 @@
ERR_ENTRY_EXISTS = 150002
ERR_WC_PATH_NOT_FOUND = 155010
ERR_CANCELLED = 200015
+ERR_WC_UNSUPPORTED_FORMAT = 155021
AUTH_SSL_NOTYETVALID = 0x00000001
AUTH_SSL_EXPIRED = 0x00000002
=== modified file 'ra.pyx'
--- a/ra.pyx 2008-03-19 22:46:47 +0000
+++ b/ra.pyx 2008-03-21 13:01:35 +0000
@@ -864,6 +864,7 @@
cdef AuthProvider provider
cdef svn_auth_provider_object_t **el
self.pool = Pool(NULL)
+ self.providers = providers
c_providers = apr_array_make(self.pool, len(providers), 4)
for p in providers:
el = <svn_auth_provider_object_t **>apr_array_push(c_providers)
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-03-21 04:01:28 +0000
+++ b/workingtree.py 2008-03-21 13:01:35 +0000
@@ -21,7 +21,7 @@
from bzrlib.bzrdir import BzrDirFormat, BzrDir
from bzrlib.errors import (InvalidRevisionId, NotBranchError, NoSuchFile,
NoRepositoryPresent, BzrError, UninitializableFormat,
- OutOfDateTree)
+ OutOfDateTree, UnsupportedFormatError)
from bzrlib.inventory import Inventory, InventoryFile, InventoryLink
from bzrlib.lockable_files import TransportLock, LockableFiles
from bzrlib.lockdir import LockDir
@@ -742,7 +742,10 @@
self.local_path = transport.local_abspath(".")
# Open related remote repository + branch
- adm = wc.WorkingCopy(None, self.local_path, False, 0, None)
+ try:
+ adm = wc.WorkingCopy(None, self.local_path, False, 0, None)
+ except SubversionException, (msg, constants.ERR_WC_UNSUPPORTED_FORMAT):
+ raise UnsupportedFormatError(msg, kind='workingtree')
try:
svn_url = adm.entry(self.local_path, True).url
finally:
More information about the bazaar-commits
mailing list