Rev 1352: Fix loading from fileid map cache. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4
Jelmer Vernooij
jelmer at samba.org
Thu Jun 26 16:38:44 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4
------------------------------------------------------------
revno: 1352
revision-id: jelmer at samba.org-20080626153843-84q1a5oace6460oc
parent: jelmer at samba.org-20080626134308-3w8x7k9pzvz3at98
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Thu 2008-06-26 17:38:43 +0200
message:
Fix loading from fileid map cache.
modified:
fileids.py fileids.py-20060714013623-u5iiyqqnko11grcf-1
tests/test_fetch.py test_fetch.py-20070624210302-luvgwjmlfysk5qeq-1
=== modified file 'fileids.py'
--- a/fileids.py 2008-06-26 13:43:08 +0000
+++ b/fileids.py 2008-06-26 15:38:43 +0000
@@ -210,7 +210,7 @@
def load(self, revid):
map = {}
- for (line, version_id) in self.idmap_knit.annotate((revid,)):
+ for ((create_revid,), line) 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 'tests/test_fetch.py'
--- a/tests/test_fetch.py 2008-06-23 02:56:49 +0000
+++ b/tests/test_fetch.py 2008-06-26 15:38:43 +0000
@@ -1693,13 +1693,13 @@
newrepos = dir.create_repository()
oldrepos.copy_content_into(newrepos)
mapping = oldrepos.get_mapping()
- self.assertEquals([
+ self.assertEquals(set([
oldrepos.generate_revision_id(0, "", mapping),
oldrepos.generate_revision_id(1, "", mapping),
oldrepos.generate_revision_id(2, "", mapping),
oldrepos.generate_revision_id(3, "", mapping),
oldrepos.generate_revision_id(4, "", mapping),
- ], newrepos.all_revision_ids())
+ ]), newrepos.all_revision_ids())
def test_fetch_property_change_only_trunk(self):
repos_url = self.make_repository('d')
@@ -1729,12 +1729,12 @@
newrepos = dir.create_repository()
oldrepos.copy_content_into(newrepos)
mapping = oldrepos.get_mapping()
- self.assertEquals([
+ self.assertEquals(set([
oldrepos.generate_revision_id(1, "trunk", mapping),
oldrepos.generate_revision_id(2, "trunk", mapping),
oldrepos.generate_revision_id(3, "trunk", mapping),
oldrepos.generate_revision_id(4, "trunk", mapping),
- ], newrepos.all_revision_ids())
+ ]), newrepos.all_revision_ids())
def test_fetch_crosscopy(self):
repos_url = self.make_client('d', 'dc')
More information about the bazaar-commits
mailing list