/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

merge bzr.dev rev 4098

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
        """
113
113
        return self.message.lstrip().split('\n', 1)[0]
114
114
 
 
115
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
115
116
    def get_apparent_author(self):
116
117
        """Return the apparent author of this revision.
117
118
 
118
 
        If the revision properties contain the author name,
119
 
        return it. Otherwise return the committer name.
120
 
        """
121
 
        return self.properties.get('author', self.committer)
 
119
        This method is deprecated in favour of get_apparent_authors.
 
120
 
 
121
        If the revision properties contain any author names,
 
122
        return the first. Otherwise return the committer name.
 
123
        """
 
124
        return self.get_apparent_authors()[0]
 
125
 
 
126
    def get_apparent_authors(self):
 
127
        """Return the apparent authors of this revision.
 
128
 
 
129
        If the revision properties contain the names of the authors,
 
130
        return them. Otherwise return the committer name.
 
131
 
 
132
        The return value will be a list containing at least one element.
 
133
        """
 
134
        authors = self.properties.get('authors', None)
 
135
        if authors is None:
 
136
            author = self.properties.get('author', None)
 
137
            if author is None:
 
138
                return [self.committer]
 
139
            return [author]
 
140
        else:
 
141
            return authors.split("\n")
122
142
 
123
143
 
124
144
def iter_ancestors(revision_id, revision_source, only_present=False):