At file:///data/jelmer/bzr-svn/fileids/ ------------------------------------------------------------ revno: 2320 revision-id: [email protected] parent: [email protected] parent: [email protected] committer: Jelmer Vernooij <[email protected]> branch nick: fileids timestamp: Sat 2009-01-17 16:39:21 +0100 message: Merge 0.5. modified: tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1 ------------------------------------------------------------ revno: 2314.1.10 revision-id: [email protected] parent: [email protected] committer: Jelmer Vernooij <[email protected]> branch nick: 0.5 timestamp: Sat 2009-01-17 16:38:42 +0100 message: Use convenience functions in a couple more places. modified: tree.py tree.py-20060624222557-dudlwqcmkf22lt2s-1 === modified file 'tree.py' --- a/tree.py 2009-01-15 01:28:44 +0000 +++ b/tree.py 2009-01-17 15:38:42 +0000 @@ -29,6 +29,8 @@ from subvertpy import delta, wc, NODE_DIR, properties +from bzrlib.plugins.svn.fileids import idmap_lookup + def inventory_add_external(inv, parent_id, path, revid, ref_revnum, url): """Add an svn:externals entry to an inventory as a tree-reference. @@ -105,7 +107,7 @@ self.revnum = revnum def open_root(self, revnum): - file_id, revision_id = self.tree.id_map[""] + file_id, revision_id = idmap_lookup(self.tree.id_map, "") ie = self.tree._inventory.add_path("", 'directory', file_id) ie.revision = revision_id return DirectoryTreeEditor(self.tree, file_id) @@ -124,7 +126,7 @@ def add_directory(self, path, copyfrom_path=None, copyfrom_revnum=-1): path = path.decode("utf-8") - file_id, revision_id = self.tree.id_map[path] + file_id, revision_id = idmap_lookup(self.tree.id_map, path) ie = self.tree._inventory.add_path(path, 'directory', file_id) ie.revision = revision_id return DirectoryTreeEditor(self.tree, file_id) @@ -181,7 +183,7 @@ mutter('unsupported file property %r', name) def close(self, checksum=None): - file_id, revision_id = self.tree.id_map[self.path] + file_id, revision_id = idmap_lookup(self.tree.id_map, self.path) if self.file_stream: self.file_stream.seek(0) @@ -261,7 +263,7 @@ if entry.schedule in (wc.SCHEDULE_NORMAL, wc.SCHEDULE_DELETE, wc.SCHEDULE_REPLACE): - return self.id_map[workingtree.branch.unprefix(relpath.decode("utf-8"))] + return idmap_lookup(self.id_map, workingtree.branch.unprefix(relpath.decode("utf-8"))) return (None, None) def add_dir_to_inv(relpath, adm, parent_id):
-- bazaar-commits mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/bazaar-commits
