Rev 2439: Create an assertion to help track down what the bug is. in http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/rename_directory_105479
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 20 17:48:40 BST 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.16-dev/rename_directory_105479
------------------------------------------------------------
revno: 2439
revision-id: john at arbash-meinel.com-20070420164821-ml7cw68e09gcr54d
parent: pqm at pqm.ubuntu.com-20070420154033-kkrk7tn575z1o491
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: rename_directory_105479
timestamp: Fri 2007-04-20 11:48:21 -0500
message:
Create an assertion to help track down what the bug is.
modified:
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
-------------- next part --------------
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2007-04-20 15:40:33 +0000
+++ b/bzrlib/workingtree_4.py 2007-04-20 16:48:21 +0000
@@ -1920,7 +1920,17 @@
# parent entry will be the same as the source entry.
target_parent_entry = state._get_entry(target_index,
path_utf8=new_dirname)
- target_parent_id = target_parent_entry[0][2]
+ assert target_parent_entry != (None, None), (
+ "Could not find target parent in wt: %s\nparent of: %s"
+ % (new_dirname, entry))
+ try:
+ target_parent_id = target_parent_entry[0][2]
+ except TypeError, e:
+ sys.stderr.write('Failure: %s, %s, %s, %s\n%s\n'
+ % (type(target_parent_entry),
+ target_parent_entry,
+ target_index, new_dirname, entry))
+ raise
if target_parent_id == entry[0][2]:
# This is the root, so the parent is None
target_parent_id = None
More information about the bazaar-commits
mailing list