~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_pyx.pyx

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
866
866
    # _st mode of the compiled stat objects.
867
867
    cdef int minikind, saved_minikind
868
868
    cdef void * details
869
 
    cdef int worth_saving
870
869
    minikind = minikind_from_mode(stat_value.st_mode)
871
870
    if 0 == minikind:
872
871
        return None
901
900
    # If we have gotten this far, that means that we need to actually
902
901
    # process this entry.
903
902
    link_or_sha1 = None
904
 
    worth_saving = 1
905
903
    if minikind == c'f':
906
904
        executable = self._is_executable(stat_value.st_mode,
907
905
                                         saved_executable)
918
916
            entry[1][0] = ('f', link_or_sha1, stat_value.st_size,
919
917
                           executable, packed_stat)
920
918
        else:
921
 
            # This file is not worth caching the sha1. Either it is too new, or
922
 
            # it is newly added. Regardless, the only things we are changing
923
 
            # are derived from the stat, and so are not worth caching. So we do
924
 
            # *not* set the IN_MEMORY_MODIFIED flag. (But we'll save the
925
 
            # updated values if there is *other* data worth saving.)
926
 
            entry[1][0] = ('f', '', stat_value.st_size, executable,
927
 
                           DirState.NULLSTAT)
928
 
            worth_saving = 0
 
919
            entry[1][0] = ('f', '', stat_value.st_size,
 
920
                           executable, DirState.NULLSTAT)
929
921
    elif minikind == c'd':
 
922
        link_or_sha1 = None
930
923
        entry[1][0] = ('d', '', 0, False, packed_stat)
931
924
        if saved_minikind != c'd':
932
925
            # This changed from something into a directory. Make sure we
936
929
                self._get_block_entry_index(entry[0][0], entry[0][1], 0)
937
930
            self._ensure_block(block_index, entry_index,
938
931
                               pathjoin(entry[0][0], entry[0][1]))
939
 
        else:
940
 
            # Any changes are derived trivially from the stat object, not worth
941
 
            # re-writing a dirstate for just this
942
 
            worth_saving = 0
943
932
    elif minikind == c'l':
944
933
        link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)
945
934
        if self._cutoff_time is None:
951
940
        else:
952
941
            entry[1][0] = ('l', '', stat_value.st_size,
953
942
                           False, DirState.NULLSTAT)
954
 
    if worth_saving:
955
 
        self._dirblock_state = DirState.IN_MEMORY_MODIFIED
 
943
    self._dirblock_state = DirState.IN_MEMORY_MODIFIED
956
944
    return link_or_sha1
957
945
 
958
946