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

  • Committer: Aaron Bentley
  • Date: 2006-12-02 04:31:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2162.
  • Revision ID: aaron.bentley@utoronto.ca-20061202043116-dqm7f6nvybi03sj2
rename fs param to stat_value

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
        """
278
278
        return int(time.time()) - 3
279
279
           
280
 
    def _fingerprint(self, abspath, fs=None):
281
 
        if fs is None:
 
280
    def _fingerprint(self, abspath, stat_value=None):
 
281
        if stat_value is None:
282
282
            try:
283
 
                fs = os.lstat(abspath)
 
283
                stat_value = os.lstat(abspath)
284
284
            except OSError:
285
285
                # might be missing, etc
286
286
                return None
287
 
        if stat.S_ISDIR(fs.st_mode):
 
287
        if stat.S_ISDIR(stat_value.st_mode):
288
288
            return None
289
289
        # we discard any high precision because it's not reliable; perhaps we
290
290
        # could do better on some systems?
291
 
        return (fs.st_size, long(fs.st_mtime),
292
 
                long(fs.st_ctime), fs.st_ino, fs.st_dev, fs.st_mode)
 
291
        return (stat_value.st_size, long(stat_value.st_mtime),
 
292
                long(stat_value.st_ctime), stat_value.st_ino, 
 
293
                stat_value.st_dev, stat_value.st_mode)