~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

[merge] Denys Duchier bzr.cleanup revno 1500: a few small code cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import os, stat, time
33
33
import sha
34
34
 
35
 
from bzrlib.osutils import sha_file
 
35
from bzrlib.osutils import sha_file, pathjoin
36
36
from bzrlib.trace import mutter, warning
37
37
from bzrlib.atomicfile import AtomicFile
38
 
from bzrlib.osutils import pathjoin
 
38
from bzrlib.errors import BzrError
39
39
 
40
40
 
41
41
FP_MODE_COLUMN = 5
170
170
        if stat.S_ISREG(mode):
171
171
            digest = sha_file(file(abspath, 'rb', buffering=65000))
172
172
        elif stat.S_ISLNK(mode):
173
 
            link_target = os.readlink(abspath)
174
173
            digest = sha.new(os.readlink(abspath)).hexdigest()
175
174
        else:
176
175
            raise BzrError("file %r: unknown file stat mode: %o"%(abspath,mode))