Rev 6582: Clarify why we have to look up things in the new basis index (1) rather than in 0. in http://bazaar.launchpad.net/~jameinel/bzr/dirstate-invalid-delta-855155
John Arbash Meinel
john at arbash-meinel.com
Tue May 28 08:02:59 UTC 2013
At http://bazaar.launchpad.net/~jameinel/bzr/dirstate-invalid-delta-855155
------------------------------------------------------------
revno: 6582
revision-id: john at arbash-meinel.com-20130528080251-a6nybtb8mxr9vrlw
parent: john at arbash-meinel.com-20130528075020-5u95xjgqiw3pjoja
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate-invalid-delta-855155
timestamp: Tue 2013-05-28 09:02:51 +0100
message:
Clarify why we have to look up things in the new basis index (1) rather than in 0.
-------------- next part --------------
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py 2013-01-16 17:51:38 +0000
+++ b/bzrlib/dirstate.py 2013-05-28 08:02:51 +0000
@@ -1648,12 +1648,12 @@
entry_key = st(dirname, basename, file_id)
block_index, present = self._find_block_index_from_key(entry_key)
if not present:
- # The block where we want to put the file is not present. But it
- # might be because the directory was empty, or not loaded yet. Look
- # for a parent entry, if not found, raise invalid error
+ # The block where we want to put the file is not present.
+ # However, it might have just been an empty directory. Look for
+ # the parent in the basis-so-far before throwing an error.
parent_dir, parent_base = osutils.split(dirname)
parent_block_idx, parent_entry_idx, _, parent_present = \
- self._get_block_entry_index(parent_dir, parent_base, 0)
+ self._get_block_entry_index(parent_dir, parent_base, 1)
if not parent_present:
self._raise_invalid(new_path, file_id,
"Unable to find block for this record."
More information about the bazaar-commits
mailing list