~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: Robert Collins
  • Date: 2006-01-02 22:37:32 UTC
  • mfrom: (1185.50.33 bzr-jam-integration)
  • Revision ID: robertc@robertcollins.net-20060102223732-d5221b37ff0f7888
Merge in John Meinels integration branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from bzrlib.osutils import sha_file
36
36
from bzrlib.trace import mutter, warning
37
37
from bzrlib.atomicfile import AtomicFile
 
38
from bzrlib.osutils import pathjoin
38
39
 
39
40
 
40
41
FP_MODE_COLUMN = 5
104
105
    def cache_file_name(self):
105
106
        # FIXME: duplicate path logic here, this should be 
106
107
        # something like 'branch.controlfile'.
107
 
        return os.sep.join([self.basedir, '.bzr', 'stat-cache'])
 
108
        return pathjoin(self.basedir, '.bzr', 'stat-cache')
108
109
 
109
110
    def clear(self):
110
111
        """Discard all cached information.
125
126
        prep.sort()
126
127
        
127
128
        for inum, path, cache_entry in prep:
128
 
            abspath = os.sep.join([self.basedir, path])
 
129
            abspath = pathjoin(self.basedir, path)
129
130
            fp = _fingerprint(abspath)
130
131
            self.stat_count += 1
131
132
            
141
142
    def get_sha1(self, path):
142
143
        """Return the sha1 of a file.
143
144
        """
144
 
        abspath = os.sep.join([self.basedir, path])
 
145
        abspath = pathjoin(self.basedir, path)
145
146
        self.stat_count += 1
146
147
        file_fp = _fingerprint(abspath)
147
148