Rev 1350: Cope with new required attributes on Repository implementations. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4
Jelmer Vernooij
jelmer at samba.org
Thu Jun 26 14:41:46 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4
------------------------------------------------------------
revno: 1350
revision-id: jelmer at samba.org-20080626134146-f6592jdvqbotci9e
parent: jelmer at samba.org-20080626132606-i33g9so2280g78ui
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-06-26 15:41:46 +0200
message:
Cope with new required attributes on Repository implementations.
added:
versionedfiles.py versionedfiles.py-20080626134117-j8g0ntz1pj228iox-1
modified:
fileids.py fileids.py-20060714013623-u5iiyqqnko11grcf-1
repository.py repository.py-20060306123302-1f8c5069b3fe0265
=== modified file 'fileids.py'
--- a/fileids.py 2008-06-26 13:26:06 +0000
+++ b/fileids.py 2008-06-26 13:41:46 +0000
@@ -210,7 +210,7 @@
def load(self, revid):
map = {}
- for (line, version_id) in self.idmap_knit.iter_lines_added_or_present_in_keys([revid]):
+ for (line, version_id) in self.idmap_knit.annotate((revid,)):
(filename, id, create_revid) = line.rstrip("\n").split("\t", 3)
map[urllib.unquote(filename).decode("utf-8")] = (urllib.unquote(id), urllib.unquote(create_revid))
assert isinstance(map[urllib.unquote(filename)][0], str)
=== modified file 'repository.py'
--- a/repository.py 2008-06-26 13:26:06 +0000
+++ b/repository.py 2008-06-26 13:41:46 +0000
@@ -47,6 +47,8 @@
from bzrlib.plugins.svn.svk import (SVN_PROP_SVK_MERGE, svk_features_merged_since,
parse_svk_feature)
from bzrlib.plugins.svn.tree import SvnRevisionTree
+from bzrlib.plugins.svn.versionedfiles import (SvnTexts, FakeRevisionTexts,
+ FakeInventoryTexts)
import urllib
def full_paths(find_children, paths, bp, from_bp, from_rev):
@@ -158,6 +160,9 @@
control_files = LockableFiles(transport, '', TransportLock)
Repository.__init__(self, SvnRepositoryFormat(), bzrdir, control_files)
+ self.texts = SvnTexts()
+ self.revisions = FakeRevisionTexts()
+ self.inventories = FakeInventoryTexts()
self._cached_revnum = None
self._lock_mode = None
self._lock_count = 0
=== added file 'versionedfiles.py'
--- a/versionedfiles.py 1970-01-01 00:00:00 +0000
+++ b/versionedfiles.py 2008-06-26 13:41:46 +0000
@@ -0,0 +1,27 @@
+# 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/>.
+
+from bzrlib.versionedfile import VersionedFiles
+
+class SvnTexts(VersionedFiles):
+ """Subversion texts backend."""
+
+class FakeRevisionTexts(VersionedFiles):
+ """Fake revisions backend."""
+
+class FakeInventoryTexts(VersionedFiles):
+ """Fake inventories backend."""
+
+
More information about the bazaar-commits
mailing list