~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-30 22:27:17 UTC
  • Revision ID: mbp@sourcefrog.net-20050330222717-027b5837127b938d
experiment with new nested inventory file format
not used by default yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
 
119
119
 
 
120
def fingerprint_file(f):
 
121
    import sha
 
122
    s = sha.new()
 
123
    b = f.read()
 
124
    s.update(b)
 
125
    size = len(b)
 
126
    return {'size': size,
 
127
            'sha1': s.hexdigest()}
 
128
 
 
129
 
 
130
 
120
131
def username():
121
132
    """Return email-style username.
122
133