/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

merge dirstate

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
        state = self.current_dirstate()
427
427
        entry = self._get_entry(file_id=file_id)
428
428
        if entry == (None, None):
429
 
            return None
 
429
            raise errors.NoSuchId(tree=self, file_id=file_id)
430
430
        path_utf8 = osutils.pathjoin(entry[0][0], entry[0][1])
431
431
        return path_utf8.decode('utf8')
432
432
 
1538
1538
            output. An unversioned file is defined as one with (False, False)
1539
1539
            for the versioned pair.
1540
1540
        """
1541
 
        utf8_decode = cache_utf8._utf8_decode
 
1541
        utf8_decode = cache_utf8._utf8_decode_with_None
1542
1542
        _minikind_to_kind = dirstate.DirState._minikind_to_kind
1543
1543
        # NB: show_status depends on being able to pass in non-versioned files
1544
1544
        # and report them as unknown
1731
1731
                    old_path = path = pathjoin(old_dirname, old_basename)
1732
1732
                if path_info is None:
1733
1733
                    # the file is missing on disk, show as removed.
1734
 
                    old_path = pathjoin(entry[0][0], entry[0][1])
1735
1734
                    content_change = True
1736
1735
                    target_kind = None
1737
1736
                    target_exec = False
1797
1796
                        last_target_parent[2] = target_parent_entry
1798
1797
 
1799
1798
                source_exec = source_details[3]
1800
 
                return ((entry[0][2], path, content_change,
 
1799
                return ((entry[0][2], (old_path, path), content_change,
1801
1800
                        (True, True),
1802
1801
                        (source_parent_id, target_parent_id),
1803
1802
                        (old_basename, entry[0][1]),
1816
1815
                    target_exec = bool(
1817
1816
                        stat.S_ISREG(path_info[3].st_mode)
1818
1817
                        and stat.S_IEXEC & path_info[3].st_mode)
1819
 
                    return ((entry[0][2], path, True,
 
1818
                    return ((entry[0][2], (None, path), True,
1820
1819
                            (False, True),
1821
1820
                            (None, parent_id),
1822
1821
                            (None, entry[0][1]),
1836
1835
                parent_id = state._get_entry(source_index, path_utf8=entry[0][0])[0][2]
1837
1836
                if parent_id == entry[0][2]:
1838
1837
                    parent_id = None
1839
 
                return ((entry[0][2], old_path, True,
 
1838
                return ((entry[0][2], (old_path, None), True,
1840
1839
                        (True, False),
1841
1840
                        (parent_id, None),
1842
1841
                        (entry[0][1], None),
1898
1897
                        or result[7][0] != result[7][1] # executable
1899
1898
                        ):
1900
1899
                        result = (result[0],
1901
 
                                  utf8_decode(result[1])[0]) + result[2:]
 
1900
                            ((utf8_decode(result[1][0])[0]),
 
1901
                             utf8_decode(result[1][1])[0]),) + result[2:]
1902
1902
                        yield result
1903
1903
            if want_unversioned and not path_handled:
1904
1904
                new_executable = bool(
1905
1905
                    stat.S_ISREG(root_dir_info[3].st_mode)
1906
1906
                    and stat.S_IEXEC & root_dir_info[3].st_mode)
1907
 
                yield (None, current_root, True, (False, False), (None, None),
 
1907
                yield (None, (None, current_root), True, (False, False),
 
1908
                    (None, None),
1908
1909
                    (None, splitpath(current_root)[-1]),
1909
1910
                    (None, root_dir_info[2]), (None, new_executable))
1910
1911
            dir_iterator = osutils._walkdirs_utf8(root_abspath, prefix=current_root)
1982
1983
                                    or result[7][0] != result[7][1] # executable
1983
1984
                                    ):
1984
1985
                                    result = (result[0],
1985
 
                                              utf8_decode(result[1])[0]) + result[2:]
 
1986
                                        ((utf8_decode(result[1][0])[0]),
 
1987
                                         utf8_decode(result[1][1])[0]),) + result[2:]
1986
1988
                                    yield result
1987
1989
                        block_index +=1
1988
1990
                        if (block_index < len(state._dirblocks) and
2026
2028
                                or result[7][0] != result[7][1] # executable
2027
2029
                                ):
2028
2030
                                result = (result[0],
2029
 
                                          utf8_decode(result[1])[0]) + result[2:]
 
2031
                                    ((utf8_decode(result[1][0])[0]),
 
2032
                                     utf8_decode(result[1][1])[0]),) + result[2:]
2030
2033
                                yield result
2031
2034
                    elif current_entry[0][1] != current_path_info[1]:
2032
2035
                        if current_path_info[1] < current_entry[0][1]:
2052
2055
                                    or result[7][0] != result[7][1] # executable
2053
2056
                                    ):
2054
2057
                                    result = (result[0],
2055
 
                                              utf8_decode(result[1])[0]) + result[2:]
 
2058
                                        ((utf8_decode(result[1][0])[0]),
 
2059
                                         utf8_decode(result[1][1])[0]),) + result[2:]
2056
2060
                                    yield result
2057
2061
                            advance_path = False
2058
2062
                    else:
2070
2074
                                or result[7][0] != result[7][1] # executable
2071
2075
                                ):
2072
2076
                                result = (result[0],
2073
 
                                          utf8_decode(result[1])[0]) + result[2:]
 
2077
                                    ((utf8_decode(result[1][0])[0]),
 
2078
                                     utf8_decode(result[1][1])[0]),) + result[2:]
2074
2079
                                yield result
2075
2080
                    if advance_entry and current_entry is not None:
2076
2081
                        entry_index += 1
2088
2093
                                    stat.S_ISREG(current_path_info[3].st_mode)
2089
2094
                                    and stat.S_IEXEC & current_path_info[3].st_mode)
2090
2095
                                if want_unversioned:
2091
 
                                    yield (None, current_path_info[0], True,
2092
 
                                           (False, False),
2093
 
                                           (None, None),
2094
 
                                           (None, current_path_info[1]),
2095
 
                                           (None, current_path_info[2]),
2096
 
                                           (None, new_executable))
 
2096
                                    yield (None, (None, current_path_info[0]),
 
2097
                                        True,
 
2098
                                        (False, False),
 
2099
                                        (None, None),
 
2100
                                        (None, current_path_info[1]),
 
2101
                                        (None, current_path_info[2]),
 
2102
                                        (None, new_executable))
2097
2103
                            # dont descend into this unversioned path if it is
2098
2104
                            # a dir
2099
2105
                            if current_path_info[2] == 'directory':