Rev 411: Disable working tree support when using an old version of python-subversion in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev
Jelmer Vernooij
jelmer at samba.org
Sat Jan 20 23:11:28 GMT 2007
------------------------------------------------------------
revno: 411
revision-id: jelmer at samba.org-20070120231109-vq4a8bef2c9fscyu
parent: jelmer at samba.org-20070120230110-3qrbo5iqx7z56sdl
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Sun 2007-01-21 00:11:09 +0100
message:
Disable working tree support when using an old version of python-subversion
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
repository.py repository.py-20060306123302-1f8c5069b3fe0265
=== modified file '__init__.py'
--- a/__init__.py 2007-01-20 22:40:27 +0000
+++ b/__init__.py 2007-01-20 23:11:09 +0000
@@ -101,7 +101,13 @@
BzrDirFormat.register_control_format(format.SvnFormat)
-BzrDirFormat.register_control_format(checkout.SvnWorkingTreeDirFormat)
+import svn.core
+subr_version = svn.core.svn_subr_version()
+
+if subr_version.major == 1 and subr_version.minor < 4:
+ warning('Subversion version too old for working tree support.')
+else:
+ BzrDirFormat.register_control_format(checkout.SvnWorkingTreeDirFormat)
InterRepository.register_optimiser(InterSvnRepository)
=== modified file 'repository.py'
--- a/repository.py 2007-01-20 23:01:10 +0000
+++ b/repository.py 2007-01-20 23:11:09 +0000
@@ -86,12 +86,13 @@
return (uuid, unescape_svn_path(branch_path), int(srevnum))
-def generate_svn_revision_id(uuid, revnum, path):
+def generate_svn_revision_id(uuid, revnum, path, scheme="undefined"):
"""Generate a unambiguous revision id.
:param uuid: UUID of the repository.
:param revnum: Subversion revision number.
:param path: Branch path.
+ :param scheme: Name of the branching scheme in use
:return: New revision id.
"""
@@ -100,7 +101,7 @@
assert revnum >= 0
if revnum == 0:
return NULL_REVISION
- return unicode("%sundefined:%s:%s:%d" % (REVISION_ID_PREFIX, uuid, \
+ return unicode("%s%s:%s:%s:%d" % (REVISION_ID_PREFIX, scheme, uuid, \
escape_svn_path(path.strip("/")), revnum))
More information about the bazaar-commits
mailing list