Rev 1108: Merge 0.4 branch. in http://people.samba.org/bzr/jelmer/bzr-svn/cext
Jelmer Vernooij
jelmer at samba.org
Thu Jun 19 15:03:36 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/cext
------------------------------------------------------------
revno: 1108
revision-id: jelmer at samba.org-20080619140332-8lnsdcix06pj2t45
parent: jelmer at samba.org-20080618120137-yldzyf34qt35z342
parent: jelmer at samba.org-20080619135842-8kg5be1na8cgdptp
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Thu 2008-06-19 16:03:32 +0200
message:
Merge 0.4 branch.
modified:
auth.py auth.py-20071209174622-w8d42k6nm5yhxvi8-1
convert.py svn2bzr.py-20051018015439-cb4563bff29e632d
delta.py delta.py-20080316001917-xyng7m3jlxvdc4c9-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
revspec.py revspec.py-20071106211507-q4fz2en91yrmjjl8-1
tests/test_commit.py test_commit.py-20060624213521-l5kcufywkh9mnilk-1
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
workingtree.py workingtree.py-20060306120941-b083cb0fdd4a69de
------------------------------------------------------------
revno: 950.3.182
revision-id: jelmer at samba.org-20080619135842-8kg5be1na8cgdptp
parent: jelmer at samba.org-20080618115824-vzo020t2d83ik66x
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-06-19 15:58:42 +0200
message:
Make editor API more object oriented.
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
auth.py auth.py-20071209174622-w8d42k6nm5yhxvi8-1
convert.py svn2bzr.py-20051018015439-cb4563bff29e632d
delta.py delta.py-20080617225125-jeg43afui0czkuwk-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
logwalker.py logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
ra.py ra.py-20080615005305-t5221niknu8rm6bt-1
revspec.py revspec.py-20071106211507-q4fz2en91yrmjjl8-1
tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1
=== modified file 'auth.py'
--- a/auth.py 2008-06-18 12:01:37 +0000
+++ b/auth.py 2008-06-19 14:03:32 +0000
@@ -141,13 +141,13 @@
ra.get_ssl_server_trust_file_provider(),
]
- if hasattr(ra, 'get_windows_simple_provider'):
+ if getattr(ra, 'get_windows_simple_provider', None):
providers.append(ra.get_windows_simple_provider())
- if hasattr(ra, 'get_keychain_simple_provider'):
+ if getattr(ra, 'get_keychain_simple_provider', None):
providers.append(ra.get_keychain_simple_provider())
- if hasattr(ra, 'get_windows_ssl_server_trust_provider'):
+ if getattr(ra, 'get_windows_ssl_server_trust_provider', None):
providers.append(ra.get_windows_ssl_server_trust_provider())
return providers
=== modified file 'convert.py'
--- a/convert.py 2008-06-05 18:08:34 +0000
+++ b/convert.py 2008-06-19 14:03:32 +0000
@@ -139,7 +139,7 @@
if all:
inter.fetch()
elif (target_repos.is_shared() and
- hasattr(inter, '_supports_branches') and
+ getattr(inter, '_supports_branches', None) and
inter._supports_branches):
inter.fetch(branches=[branch.last_revision() for branch in existing_branches])
=== modified file 'delta.py'
--- a/delta.py 2008-03-17 20:25:54 +0000
+++ b/delta.py 2008-06-19 14:03:32 +0000
@@ -24,6 +24,7 @@
target_stream.write(tview)
return apply_window
+
def txdelta_apply_ops(src_ops, ops, new_data, sview):
tview = ""
for (action, offset, length) in ops:
=== modified file 'fetch.py'
--- a/fetch.py 2008-06-18 12:01:37 +0000
+++ b/fetch.py 2008-06-19 14:03:32 +0000
@@ -208,6 +208,7 @@
return
self.inventory.rename(file_id, parent_id, urlutils.basename(path))
+
class DirectoryBuildEditor:
def __init__(self, editor, old_id, new_id, parent_revids=[]):
self.editor = editor
@@ -217,6 +218,8 @@
def close(self):
self.editor.inventory[self.new_id].revision = self.editor.revid
+
+ # Only record root if the target repository supports it
self.editor._store_directory(self.new_id, self.parent_revids)
if self.new_id == self.editor.inventory.root.file_id:
@@ -252,7 +255,7 @@
def open_directory(self, path, base_revnum):
assert isinstance(path, str)
path = path.decode("utf-8")
- assert isinstance(base_revnum, int)
+ assert base_revnum >= 0
base_file_id = self.editor._get_old_id(self.old_id, path)
base_revid = self.editor.old_inventory[base_file_id].revision
file_id = self.editor._get_existing_id(self.old_id, self.new_id, path)
@@ -304,7 +307,7 @@
if copyfrom_path is None:
# This should ideally never happen
copyfrom_path = self.editor.old_inventory.id2path(file_id)
- mutter('no copyfrom path set, assuming %r' % copyfrom_path)
+ mutter('no copyfrom path set, assuming %r', copyfrom_path)
assert copyfrom_path == self.editor.old_inventory.id2path(file_id)
assert copyfrom_path not in self.editor._premature_deletes
self.editor._premature_deletes.add(copyfrom_path)
@@ -341,6 +344,7 @@
else:
self.editor.inventory.remove_recursive_id(self.editor._get_old_id(self.old_id, path))
+
class FileBuildEditor:
def __init__(self, editor, path, file_id, file_parents=[], data="",
is_symlink=False):
@@ -501,7 +505,7 @@
:param repository: Repository to obtain the buildeditor for.
:return: Class object of class descending from RevisionBuildEditor
"""
- if hasattr(repository, '_packs'):
+ if getattr(repository, '_packs', None):
return PackRevisionBuildEditor
return WeaveRevisionBuildEditor
=== modified file 'revspec.py'
--- a/revspec.py 2008-03-24 04:52:30 +0000
+++ b/revspec.py 2008-06-19 13:58:42 +0000
@@ -34,7 +34,7 @@
def _match_on(self, branch, revs):
loc = self.spec.find(':')
- if not hasattr(branch.repository, 'uuid'):
+ if not getattr(branch.repository, 'uuid', None):
raise BzrError("the svn: revisionspec can only be used with Subversion branches")
try:
return RevisionInfo.from_revision_id(branch, branch.generate_revision_id(int(self.spec[loc+1:])), branch.revision_history())
=== modified file 'tests/test_commit.py'
--- a/tests/test_commit.py 2008-06-15 02:54:00 +0000
+++ b/tests/test_commit.py 2008-06-19 14:03:32 +0000
@@ -587,7 +587,7 @@
set_svn_revprops(transport, 1, {"svn:author": "Somebody",
"svn:date": time_to_cstring(1000000*473385600)})
- self.assertEquals(1, transport.get_latest_revnum())
+ self.assertEquals(1, transport.get_latest_revnum())
self.assertEquals(("Somebody", "1985-01-01T00:00:00.000000Z", "My commit"),
self.client_log(repos_url)[1][1:])
=== modified file 'tree.py'
--- a/tree.py 2008-06-18 12:01:37 +0000
+++ b/tree.py 2008-06-19 14:03:32 +0000
@@ -145,6 +145,7 @@
def abort(self):
pass
+
class DirectoryTreeEditor:
def __init__(self, tree, file_id):
self.tree = tree
@@ -173,6 +174,8 @@
def add_file(self, path, copyfrom_path=None, copyfrom_revnum=-1):
path = path.decode("utf-8")
+ self.is_symlink = False
+ self.is_executable = False
return FileTreeEditor(self.tree, path)
def close(self):
@@ -188,8 +191,6 @@
self.last_file_rev = None
def change_prop(self, name, value):
- from mapping import SVN_PROP_BZR_PREFIX
-
if name == properties.PROP_EXECUTABLE:
self.is_executable = (value != None)
elif name == properties.PROP_SPECIAL:
@@ -241,7 +242,7 @@
self.file_stream = None
- def apply_textdelta(self, base_checksum=None):
+ def apply_textdelta(self, base_checksum):
self.file_stream = StringIO()
return apply_txdelta_handler("", self.file_stream)
=== modified file 'workingtree.py'
--- a/workingtree.py 2008-06-18 12:01:37 +0000
+++ b/workingtree.py 2008-06-19 14:03:32 +0000
@@ -41,7 +41,6 @@
from bzrlib.plugins.svn.mapping import (SVN_PROP_BZR_ANCESTRY, SVN_PROP_BZR_FILEIDS,
SVN_PROP_BZR_REVISION_ID, SVN_PROP_BZR_REVISION_INFO,
escape_svn_path, generate_revision_metadata)
-from bzrlib.plugins.svn.ra import create_svn_client
from bzrlib.plugins.svn.remote import SvnRemoteAccess
from bzrlib.plugins.svn.repository import SvnRepository
from bzrlib.plugins.svn.svk import SVN_PROP_SVK_MERGE, parse_svk_features, serialize_svk_features
More information about the bazaar-commits
mailing list