~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to gen_changeset.py

  • Committer: John Arbash Meinel
  • Date: 2005-07-02 07:07:05 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20050702070705-71d894e83e7ba22a
Simplified the header, only output base if it is not the expected one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
        """
169
169
        write = self._write
170
170
 
171
 
        # Base revision is the revision this changeset is against
172
 
        # We probably should write some sort of
173
 
        # base: None
174
 
        # for base revisions of EmptyTree, rather than
175
 
        # just looking like we left it off.
176
 
        # Besides, we might leave it off in the trivial case
177
 
        # that the base is the first parent of the target revision.
178
 
        # In which case having it missing doesn't mean that we
179
 
        # should use the empty tree.
180
 
        if self.base_revision:
181
 
            rev_id = self.base_revision.revision_id
182
 
            write(rev_id, key='base')
183
 
            write(self.branch.get_revision_sha1(rev_id), key='base sha1')
 
171
        # What should we print out for an Empty base revision?
 
172
        assumed_base = self.revision_list[0].parents[0].revision_id
 
173
        if self.base_revision.revision_id != assumed_base:
 
174
            base = self.base_revision.revision_id
 
175
            write(base, key='base')
 
176
            write(self.branch.get_revision_sha1(base), key='base sha1')
184
177
 
185
178
        self._write_revisions()
186
179