~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

Recognize 't' (tree-reference) minikind in DirState._get_entry

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
lines by NL. The field delimiters are ommitted in the grammar, line delimiters
21
21
are not - this is done for clarity of reading. All string data is in utf8.
22
22
 
23
 
MINIKIND = "f" | "d" | "l" | "a" | "r";
 
23
MINIKIND = "f" | "d" | "l" | "a" | "r" | "t";
24
24
NL = "\n";
25
25
NULL = "\0";
26
26
WHOLE_NUMBER = {digit}, digit;
1353
1353
                entry_index, present = self._find_entry_index(key, block)
1354
1354
                if present:
1355
1355
                    entry = self._dirblocks[block_index][1][entry_index]
1356
 
                    if entry[1][tree_index][0] in 'fdl':
 
1356
                    if entry[1][tree_index][0] in 'fdlt':
1357
1357
                        # this is the result we are looking for: the  
1358
1358
                        # real home of this file_id in this tree.
1359
1359
                        return entry
1360
1360
                    if entry[1][tree_index][0] == 'a':
1361
1361
                        # there is no home for this entry in this tree
1362
1362
                        return None, None
1363
 
                    assert entry[1][tree_index][0] == 'r'
 
1363
                    assert entry[1][tree_index][0] == 'r', \
 
1364
                        "entry %r has invalid minikind %r for tree %r" \
 
1365
                        % (entry,
 
1366
                           entry[1][tree_index][0],
 
1367
                           tree_index)
1364
1368
                    real_path = entry[1][tree_index][1]
1365
1369
                    return self._get_entry(tree_index, fileid_utf8=fileid_utf8,
1366
1370
                        path_utf8=real_path)