~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf.py

  • Committer: Aaron Bentley
  • Date: 2012-07-13 17:23:12 UTC
  • mto: This revision was merged to the branch mainline in revision 6540.
  • Revision ID: aaron@aaronbentley.com-20120713172312-0qsmwmef3pvmleoq
ImplementĀ WorkingTree.get_uncommitted_data

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        :return: the filename of the written file.
277
277
        """
278
278
        transform.resolve_conflicts(self.shelf_transform)
 
279
        revision_id = self.target_tree.get_revision_id()
 
280
        return self._write_shelf(shelf_file, self.shelf_transform, revision_id,
 
281
                                 message)
 
282
 
 
283
    @classmethod
 
284
    def _write_shelf(cls, shelf_file, transform, revision_id, message=None):
279
285
        serializer = pack.ContainerSerialiser()
280
286
        shelf_file.write(serializer.begin())
281
 
        revision_id = self.target_tree.get_revision_id()
282
 
        metadata = self.metadata_record(serializer, revision_id, message)
 
287
        metadata = cls.metadata_record(serializer, revision_id, message)
283
288
        shelf_file.write(metadata)
284
 
        for bytes in self.shelf_transform.serialize(serializer):
 
289
        for bytes in transform.serialize(serializer):
285
290
            shelf_file.write(bytes)
286
291
        shelf_file.write(serializer.end())
287
292