~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: jszakmeister
  • Date: 2009-06-03 10:24:28 UTC
  • mto: (4493.1.1 empty-message-summary)
  • mto: This revision was merged to the branch mainline in revision 4495.
  • Revision ID: john@szakmeister.net-20090603102428-2wh3h03otxt4hdvv
Make Revision.get_summary() return an empty string when Revision.message is None, instead of backtracing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
 
112
112
    def get_summary(self):
113
113
        """Get the first line of the log message for this revision.
 
114
 
 
115
        Return an empty string if message is None.
114
116
        """
115
 
        return self.message.lstrip().split('\n', 1)[0]
 
117
        if self.message:
 
118
            return self.message.lstrip().split('\n', 1)[0]
 
119
        else:
 
120
            return ''
116
121
 
117
122
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
118
123
    def get_apparent_author(self):