Rev 128: Deal with ghost parents in svn-upgrade. in file:///home/jelmer/bzr-rebase/trunk/
Jelmer Vernooij
jelmer at samba.org
Fri Feb 13 04:00:37 GMT 2009
At file:///home/jelmer/bzr-rebase/trunk/
------------------------------------------------------------
revno: 128
revision-id: jelmer at samba.org-20090213040037-ws86crjqtpgfxvhf
parent: jelmer at samba.org-20090213035623-o3q3plyq4fk5fs0z
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Fri 2009-02-13 05:00:37 +0100
message:
Deal with ghost parents in svn-upgrade.
modified:
NEWS news-20070721005510-kbjm9yxqoeczq9fl-1
rebase.py rebase.py-20070626221123-ellanmf93nw8z9r1-1
=== modified file 'NEWS'
--- a/NEWS 2009-02-01 02:54:07 +0000
+++ b/NEWS 2009-02-13 04:00:37 +0000
@@ -2,7 +2,7 @@
BUG FIXES
- * Cope with ghosts in svn-upgrade. (#323140)
+ * Cope with ghosts in svn-upgrade. (#323140, #325402)
PERFORMANCE
=== modified file 'rebase.py'
--- a/rebase.py 2009-02-13 03:56:23 +0000
+++ b/rebase.py 2009-02-13 04:00:37 +0000
@@ -335,13 +335,15 @@
try:
# Check what new_ie.file_id should be
# use old and new parent inventories to generate new_id map
- fileid_map = map_file_ids(repository, oldrev.parent_ids, new_parents)
+ nonghost_oldparents = tuple([p for p in oldrev.parent_ids if repository.has_revision(p)])
+ nonghost_newparents = tuple([p for p in new_parents if repository.has_revision(p)])
+ fileid_map = map_file_ids(repository, nonghost_oldparents, nonghost_newparents)
oldtree = repository.revision_tree(oldrevid)
mappedtree = MapTree(oldtree, fileid_map)
pb = ui.ui_factory.nested_progress_bar()
try:
- old_parent_invs = list(repository.iter_inventories(oldrev.parent_ids))
- new_parent_invs = list(repository.iter_inventories(new_parents))
+ old_parent_invs = list(repository.iter_inventories(nonghost_oldparents))
+ new_parent_invs = list(repository.iter_inventories(nonghost_newparents))
for i, (path, old_ie) in enumerate(mappedtree.inventory.iter_entries()):
pb.update('upgrading file', i, len(mappedtree.inventory))
ie = old_ie.copy()
More information about the bazaar-commits
mailing list