~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/testament.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

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):