/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

  • Committer: Vincent Ladeuil
  • Date: 2007-07-22 17:19:18 UTC
  • mfrom: (2645 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070722171918-7pt18yku39667dzy
merge bzr.dev@2645

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
    def get_file_sha1(self, file_id, path=None, stat_value=None):
409
409
        # check file id is valid unconditionally.
410
410
        entry = self._get_entry(file_id=file_id, path=path)
411
 
        assert entry[0] is not None, 'what error should this raise'
 
411
        if entry[0] is None:
 
412
            raise errors.NoSuchId(self, file_id)
412
413
        if path is None:
413
414
            path = pathjoin(entry[0][0], entry[0][1]).decode('utf8')
414
415
 
1688
1689
        """
1689
1690
        utf8_decode = cache_utf8._utf8_decode
1690
1691
        _minikind_to_kind = dirstate.DirState._minikind_to_kind
 
1692
        cmp_by_dirs = dirstate.cmp_by_dirs
1691
1693
        # NB: show_status depends on being able to pass in non-versioned files
1692
1694
        # and report them as unknown
1693
1695
        # TODO: handle extra trees in the dirstate.
2174
2176
                   current_block is not None):
2175
2177
                if (current_dir_info and current_block
2176
2178
                    and current_dir_info[0][0] != current_block[0]):
2177
 
                    if current_dir_info[0][0].split('/') < current_block[0].split('/'):
 
2179
                    if cmp_by_dirs(current_dir_info[0][0], current_block[0]) < 0:
2178
2180
                        # filesystem data refers to paths not covered by the dirblock.
2179
2181
                        # this has two possibilities:
2180
2182
                        # A) it is versioned but empty, so there is no block for it