TypeError: 'NoneType' object is unsubscriptable error in _dirstate_helpers_c.ProcessEntryC._process_entry when running status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
jfroy:trunk bahamut$ bzr st
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/Library/
return run_bzr(argv)
File "/Library/
ret = run(*run_argv)
File "/Library/
self.
File "/Library/
return self.run(
File "/Library/
result = func(*args, **kwargs)
File "/Library/
show_
File "/Library/
want_
File "/Library/
want_
File "/Library/
result = unbound(self, *args, **kwargs)
File "/Library/
want_
File "/Library/
want_
File "_dirstate_
File "_dirstate_
File "_dirstate_
TypeError: 'NoneType' object is unsubscriptable
bzr 1.11 on python 2.5.1 (darwin)
arguments: ['/usr/
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_CA.UTF-8'
plugins:
bzrtools /Library/
dyson /Users/
email /Library/
extmerge /Library/
launchpad /Library/
loom /Library/
netrc_
qbzr /Library/
rebase /Library/
search /Library/
svn /Users/
upload /Library/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
Looking at the code, it looks like your "dirstate" file is corrupt. Specifically, it seems to have found a record, but not the containing directory. (eg, finding path/to/file, but not finding path/to).
A fix to at least give a better error would be: _dirstate_ helpers_ c.pyx' _dirstate_ helpers_ c.pyx 2008-10-04 17:01:00 +0000 _dirstate_ helpers_ c.pyx 2009-02-12 18:54:26 +0000 entry[0] [0], entry[0][1]) _get_entry( self.target_ index, entry[0] [0])[0] [2] _get_entry( self.target_ index, entry[0] [0]) DirstateCorrupt (self.state,
parent_ id = None
=== modified file 'bzrlib/
--- bzrlib/
+++ bzrlib/
@@ -1256,8 +1256,14 @@
path = self.pathjoin(
# parent id is the entry for the path in the target tree
# TODO: these are the same for an entire directory: cache em.
- parent_id = self.state.
- path_utf8=
+ parent_entry = self.state.
+ path_utf8=
+ if parent_entry is None:
+ raise errors.
+ "We could not find the parent entry in index %d"
+ " for the entry: %s"
+ % (self.target_index, entry[0]))
+ parent_id = parent_entry[0][2]
if parent_id == entry[0][2]:
if path_info is not None:
(sorry that lp generally destroys whitespace)