~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/testament.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
* the testament uses unix line-endings (\n)
60
60
"""
61
61
 
 
62
from __future__ import absolute_import
 
63
 
62
64
# XXX: At the moment, clients trust that the graph described in a weave
63
65
# is accurate, but that's not covered by the testament.  Perhaps the best
64
66
# fix is when verifying a revision to make sure that every file mentioned
74
76
from bzrlib.osutils import (
75
77
    contains_whitespace,
76
78
    contains_linebreaks,
77
 
    sha,
 
79
    sha_strings,
78
80
    )
79
81
from bzrlib.tree import Tree
80
82
 
209
211
        return r
210
212
 
211
213
    def as_sha1(self):
212
 
        s = sha()
213
 
        map(s.update, self.as_text_lines())
214
 
        return s.hexdigest()
 
214
        return sha_strings(self.as_text_lines())
215
215
 
216
216
 
217
217
class StrictTestament(Testament):