Rev 4540: Review feedback. in http://bazaar.launchpad.net/~lifeless/bzr/apply-inventory-delta

Robert Collins robertc at robertcollins.net
Fri Jul 17 02:45:01 BST 2009


At http://bazaar.launchpad.net/~lifeless/bzr/apply-inventory-delta

------------------------------------------------------------
revno: 4540
revision-id: robertc at robertcollins.net-20090717014453-m43axxegxr0ehtfc
parent: robertc at robertcollins.net-20090717004902-w5zoag3sbg3ha0sj
committer: Robert Collins <robertc at robertcollins.net>
branch nick: apply-inventory-delta
timestamp: Fri 2009-07-17 11:44:53 +1000
message:
  Review feedback.
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py	2009-07-14 04:53:19 +0000
+++ b/bzrlib/dirstate.py	2009-07-17 01:44:53 +0000
@@ -1380,7 +1380,7 @@
                     "Wrong path for old path.")
             if file_id != entry[0][2]:
                 raise errors.InconsistentDelta(path, file_id,
-                    "Attempt to remove wrong has wrong id - found %r."
+                    "Attempt to remove path has wrong id - found %r."
                     % entry[0][2])
             self._make_absent(entry)
             # See if we have a malformed delta: deleting a directory must not
@@ -2714,6 +2714,7 @@
                                 ("%s/%s" % key[0:2]).decode('utf8'), key[2],
                                 "Attempt to add item at path already occupied by "
                                 "id %r" % entry[0][2])
+                        low_index += 1
                     else:
                         break
             # new entry, synthesis cross reference here,

=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2009-07-17 00:46:37 +0000
+++ b/bzrlib/inventory.py	2009-07-17 01:44:53 +0000
@@ -1733,7 +1733,10 @@
             # to spend less time calculating the delta.
             delta_list = []
             for key, (old_key, value) in parent_id_basename_delta.iteritems():
-                delta_list.append((old_key, key, value))
+                if value:
+                    delta_list.append((old_key, key, value))
+                else:
+                    delta_list.append((old_key, None, None))
             result.parent_id_basename_to_file_id.apply_delta(delta_list)
         parents.discard(('', None))
         for parent_path, parent in parents:




More information about the bazaar-commits mailing list