Rev 1861: Fix file id handling. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Mon Sep 8 06:01:00 BST 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1861
revision-id: jelmer at samba.org-20080908050058-wueqodp1h3et76om
parent: jelmer at samba.org-20080908040330-puze69qhyxmcknam
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-09-08 07:00:58 +0200
message:
Fix file id handling.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== modified file 'commit.py'
--- a/commit.py 2008-09-08 04:03:30 +0000
+++ b/commit.py 2008-09-08 05:00:58 +0000
@@ -38,7 +38,6 @@
from bzrlib.plugins.svn.mapping import mapping_registry
from bzrlib.plugins.svn.repository import SvnRepositoryFormat, SvnRepository
-
def _revision_id_to_svk_feature(revid):
"""Create a SVK feature identifier from a revision id.
@@ -650,7 +649,7 @@
return self._get_delta(ie, self.old_inv, self.new_inventory.id2path(ie.file_id)), version_recorded
-def replay_delta(builder, old_tree, new_tree):
+def replay_delta(builder, old_trees, new_tree):
"""Replays a delta to a commit builder.
:param builder: The commit builder.
@@ -658,8 +657,9 @@
:param new_tree: New tree that should be committed
"""
for path, ie in new_tree.inventory.iter_entries():
- builder.record_entry_contents(ie.copy(), [old_tree.inventory],
- path, new_tree, None)
+ builder.record_entry_contents(ie.copy(),
+ [old_tree.inventory for old_tree in old_trees],
+ path, new_tree, None)
builder.finish_inventory()
@@ -803,7 +803,7 @@
graph=graph, opt_signature=opt_signature,
append_revisions_only=append_revisions_only)
- replay_delta(builder, base_tree, old_tree)
+ replay_delta(builder, source_repo.revision_trees(rev.parent_ids), old_tree)
try:
revid = builder.commit(rev.message)
except SubversionException, (_, num):
=== modified file 'fetch.py'
--- a/fetch.py 2008-09-08 04:03:30 +0000
+++ b/fetch.py 2008-09-08 05:00:58 +0000
@@ -228,7 +228,9 @@
ie.revision = self.editor.revid
text_revision = self.editor._get_text_revid(self.path) or ie.revision
- text_parents = self.editor._get_text_parents(self.path) or self.parent_revids
+ text_parents = self.editor._get_text_parents(self.path)
+ if text_parents is None:
+ text_parents = self.parent_revids
self.editor.texts.add_lines(
(self.new_id, text_revision),
[(self.new_id, revid) for revid in text_parents], [])
@@ -343,7 +345,9 @@
assert checksum is None or checksum == actual_checksum
text_revision = self.editor._get_text_revid(self.path) or self.editor.revid
- text_parents = self.editor._get_text_parents(self.path) or self.file_parents
+ text_parents = self.editor._get_text_parents(self.path)
+ if text_parents is None:
+ text_parents = self.file_parents
self.editor.texts.add_lines((self.file_id, text_revision),
[(self.file_id, revid) for revid in text_parents], lines)
More information about the bazaar-commits
mailing list