~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-09-13 06:12:01 UTC
  • Revision ID: mbp@sourcefrog.net-20050913061201-fc08c18f5eeca28a
- add fetch command as builtin

Show diffs side-by-side

added added

removed removed

Lines of Context:
598
598
            self.unlock()
599
599
 
600
600
 
601
 
    def get_revision_xml(self, revision_id):
602
 
        return self.get_revision_xml_file(revision_id).read()
 
601
    #deprecated
 
602
    get_revision_xml = get_revision_xml_file
603
603
 
604
604
 
605
605
    def get_revision(self, revision_id):
642
642
 
643
643
    def get_revision_sha1(self, revision_id):
644
644
        """Hash the stored value of a revision, and return it."""
645
 
        return bzrlib.osutils.sha_file(self.get_revision_xml_file(revision_id))
 
645
        # In the future, revision entries will be signed. At that
 
646
        # point, it is probably best *not* to include the signature
 
647
        # in the revision hash. Because that lets you re-sign
 
648
        # the revision, (add signatures/remove signatures) and still
 
649
        # have all hash pointers stay consistent.
 
650
        # But for now, just hash the contents.
 
651
        return bzrlib.osutils.sha_file(self.get_revision_xml(revision_id))
646
652
 
647
653
 
648
654
    def get_ancestry(self, revision_id):