~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Martin Pool
  • Date: 2005-06-20 04:58:12 UTC
  • Revision ID: mbp@sourcefrog.net-20050620045812-5e3a188c909c7d15
- add consistency checks when writing out revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
            # first parent stored as precursor for compatability with 0.0.5 and
130
130
            # earlier
131
131
            pr = self.parents[0]
 
132
            assert pr.revision_id
132
133
            root.set('precursor', pr.revision_id)
133
134
            if pr.revision_sha1:
134
135
                root.set('precursor_sha1', pr.revision_sha1)
140
141
                assert isinstance(rr, RevisionReference)
141
142
                p = SubElement(pelts, 'revision_ref')
142
143
                p.tail = '\n'
 
144
                assert rr.revision_id
143
145
                p.set('revision_id', rr.revision_id)
144
146
                if rr.revision_sha1:
145
147
                    p.set('revision_sha1', rr.revision_sha1)