/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/dirstate.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-31 20:29:04 UTC
  • mto: This revision was merged to the branch mainline in revision 2499.
  • Revision ID: john@arbash-meinel.com-20070531202904-34h7ygudo7qq9ha1
Update the code so that symlinks aren't cached at incorrect times
and fix the tests so that they don't assume files and symlinks
get cached even when the timestamp doesn't declare them 'safe'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1149
1149
                                   osutils.pathjoin(entry[0][0], entry[0][1]))
1150
1150
        elif minikind == 'l':
1151
1151
            link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)
1152
 
            entry[1][0] = ('l', link_or_sha1, stat_value.st_size,
1153
 
                           False, packed_stat)
 
1152
            if self._cutoff_time is None:
 
1153
                self._sha_cutoff_time()
 
1154
            if (stat_value.st_mtime < self._cutoff_time
 
1155
                and stat_value.st_ctime < self._cutoff_time):
 
1156
                entry[1][0] = ('l', link_or_sha1, stat_value.st_size,
 
1157
                               False, packed_stat)
 
1158
            else:
 
1159
                entry[1][0] = ('l', '', stat_value.st_size,
 
1160
                               False, DirState.NULLSTAT)
1154
1161
        self._dirblock_state = DirState.IN_MEMORY_MODIFIED
1155
1162
        return link_or_sha1
1156
1163