~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

Move _get_row and _get_block_row_index into Dirstate itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
            fileid_utf8 = file_id.encode('utf8')
311
311
        if path is not None:
312
312
            # path lookups are faster
313
 
            if path == '':
314
 
                return state._root_row
315
 
            dirname, basename = os.path.split(path.encode('utf8'))
316
 
            block_index, row_index, dir_present, file_present = \
317
 
                self._get_block_row_index(dirname, basename)
318
 
            if not file_present:
319
 
                return None, None
320
 
            row = state._dirblocks[block_index][1][row_index]
 
313
            row = state.get_row(path)
321
314
            if file_id:
322
315
                if row[0][3] != fileid_utf8:
323
316
                    raise BzrError('integrity error ? : mismatching file_id and path')
324
 
            assert row[0][3], 'unversioned row?!?!'
325
317
            return row
326
318
        else:
327
319
            for row in state._iter_rows():