~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Lukáš Lalinsky
  • Date: 2007-08-15 14:03:15 UTC
  • mto: (2755.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2757.
  • Revision ID: lalinsky@gmail.com-20070815140315-g6sqgjo6cro598aq
Add Revision.get_author to return the author's name, either from the property 'author' or the name of the committer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        """
118
118
        return self.message.lstrip().split('\n', 1)[0]
119
119
 
 
120
    def get_author(self):
 
121
        """Get the author of this revision.
 
122
        """
 
123
        return self.properties.get('author', self.committer)
 
124
 
120
125
 
121
126
def is_ancestor(revision_id, candidate_id, branch):
122
127
    """Return true if candidate_id is an ancestor of revision_id.