Rev 2262: test_set_parent_trees_no_content dirstate test now passing. in file:///home/robertc/source/baz/dirstate/
Robert Collins
robertc at robertcollins.net
Mon Feb 12 01:10:49 GMT 2007
At file:///home/robertc/source/baz/dirstate/
------------------------------------------------------------
revno: 2262
revision-id: robertc at robertcollins.net-20070212011000-ow0mqc9fpayx7ugz
parent: robertc at robertcollins.net-20070212010052-o042kqo4bqwb5s16
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate
timestamp: Mon 2007-02-12 12:10:00 +1100
message:
test_set_parent_trees_no_content dirstate test now passing.
modified:
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
bzrlib/tests/test_dirstate.py test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py 2007-02-12 01:00:52 +0000
+++ b/bzrlib/dirstate.py 2007-02-12 01:10:00 +0000
@@ -413,7 +413,7 @@
# so we just skip over it
# number of fields per dir_entry + number of fields per parent_entry + newline
num_parents = len(self._parents)
- entry_size = 7 + (7 * num_parents) + 1
+ entry_size = 7 + (7 * (num_parents - len(self._ghosts))) + 1
expected_field_count = entry_size * self._num_entries
# is the file too short ?
assert field_count - cur == expected_field_count, \
=== modified file 'bzrlib/tests/test_dirstate.py'
--- a/bzrlib/tests/test_dirstate.py 2007-02-12 00:32:19 +0000
+++ b/bzrlib/tests/test_dirstate.py 2007-02-12 01:10:00 +0000
@@ -314,7 +314,9 @@
# the ghost should be recorded as such by set_parent_trees.
self.assertEqual(['ghost-rev'], state.get_ghosts())
self.assertEqual(
- [(('', '', 'directory', root_id, 0, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ''), [])],
+ [(['', '', 'directory', root_id, 0, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ''], [
+ (revid1, 'directory', '', '', 0, False, ''),
+ (revid2, 'directory', '', '', 0, False, '')])],
list(state._iter_rows()))
### add a path via _set_data - so we dont need delta work, just
More information about the bazaar-commits
mailing list