Rev 2304: set_state_from_inventory needs to include NULL records for parents when there wasn't an entry before in http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 14 20:10:40 GMT 2007
At http://bazaar.launchpad.net/%7Ebzr/bzr/dirstate
------------------------------------------------------------
revno: 2304
revision-id: john at arbash-meinel.com-20070214200940-s84qp76syr3kywlt
parent: jw+debian at jameswestby.net-20070214192716-dto5wr6vv56osswj
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Wed 2007-02-14 14:09:40 -0600
message:
set_state_from_inventory needs to include NULL records for parents when there wasn't an entry before
modified:
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
-------------- next part --------------
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py 2007-02-14 19:27:16 +0000
+++ b/bzrlib/dirstate.py 2007-02-14 20:09:40 +0000
@@ -790,6 +790,8 @@
parent_rows = {}
for row, parents in self._iter_rows():
parent_rows[row[3]] = parents
+
+ num_present_parents = len(self._parents) - len(self._ghosts)
# walk the new inventory in directory order, copying parent data
# from the id index
new_rows = []
@@ -810,7 +812,7 @@
parents = parent_rows[fileid_utf8]
del parent_rows[fileid_utf8]
except KeyError:
- parents = []
+ parents = [DirState.NULL_PARENT_ROW] * num_present_parents
new_row = (dirname, basename, kind, fileid_utf8, size, DirState.NULLSTAT, sha1), parents
new_rows.append(new_row)
# append deleted data to the end of the tree as usual.
More information about the bazaar-commits
mailing list