~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-30 00:55:00 UTC
  • mto: (3815.2.5 prepare-1.9)
  • mto: This revision was merged to the branch mainline in revision 3811.
  • Revision ID: john@arbash-meinel.com-20081030005500-r5cej1cxflqhs3io
Switch so that we are using a simple timestamp as the first action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
CACHE_HEADER = "### bzr hashcache v5\n"
31
31
 
32
32
import os, stat, time
33
 
import sha
34
33
 
35
 
from bzrlib.osutils import sha_file, pathjoin, safe_unicode
 
34
from bzrlib.osutils import sha_file, sha_string, pathjoin, safe_unicode
36
35
from bzrlib.trace import mutter, warning
37
36
from bzrlib.atomicfile import AtomicFile
38
37
from bzrlib.errors import BzrError
164
163
        if stat.S_ISREG(mode):
165
164
            digest = self._really_sha1_file(abspath)
166
165
        elif stat.S_ISLNK(mode):
167
 
            digest = sha.new(os.readlink(abspath)).hexdigest()
 
166
            digest = sha_string(os.readlink(abspath))
168
167
        else:
169
168
            raise BzrError("file %r: unknown file stat mode: %o"%(abspath,mode))
170
169