Rev 1552: Store text-parents when committing. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Tue Aug 5 01:39:03 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1552
revision-id: jelmer at samba.org-20080805003901-rsefqwyhuoorn66x
parent: jelmer at samba.org-20080805001432-0zs61d1lyvzbtk68
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-08-05 02:39:01 +0200
message:
Store text-parents when committing.
modified:
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
=== modified file 'commit.py'
--- a/commit.py 2008-08-04 16:23:24 +0000
+++ b/commit.py 2008-08-05 00:39:01 +0000
@@ -457,8 +457,9 @@
if (not child_ie.file_id in old_inv or
old_inv.id2path(child_ie.file_id) != new_child_path or
+ old_inv[child_ie.file_id].revision != child_ie.revision or
old_inv[child_ie.file_id].parent_id != child_ie.parent_id):
- ret.append((child_ie.file_id, new_child_path))
+ ret.append((child_ie.file_id, new_child_path, child_ie.revision))
if (child_ie.kind == 'directory' and
child_ie.file_id in self.modified_dirs):
@@ -466,14 +467,22 @@
return ret
fileids = {}
+ text_parents = {}
+
+ changes = []
if (self.old_inv.root is None or
self.new_inventory.root.file_id != self.old_inv.root.file_id):
- fileids[""] = self.new_inventory.root.file_id
-
- for id, path in _dir_process_file_id(self.old_inv, self.new_inventory, "", self.new_inventory.root.file_id):
+ changes.append((self.new_inventory.root.file_id, "", self.new_inventory.root.revision))
+
+ changes += _dir_process_file_id(self.old_inv, self.new_inventory, "", self.new_inventory.root.file_id)
+
+ for id, path, revid in changes:
fileids[path] = id
+ if revid is not None and revid != self.base_revid:
+ text_parents[path] = revid
+ self.bsae_mapping.export_text_parents(text_parents, self._svn_revprops, self._svn_props)
self.base_mapping.export_fileid_map(fileids, self._svn_revprops, self._svnprops)
if self._config.get_log_strip_trailing_newline():
self.base_mapping.export_message(message, self._svn_revprops, self._svnprops)
More information about the bazaar-commits
mailing list