~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Danny van Heumen
  • Date: 2010-03-09 21:42:11 UTC
  • mto: (4634.139.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 5160.
  • Revision ID: danny@dannyvanheumen.nl-20100309214211-iqh42x6qcikgd9p3
Reverted now-useless TODO list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
28
28
    symbol_versioning,
29
29
    )
30
30
from bzrlib.osutils import contains_whitespace
 
31
from bzrlib.progress import DummyProgress
31
32
 
32
33
NULL_REVISION="null:"
33
34
CURRENT_REVISION="current:"
53
54
 
54
55
    def __init__(self, revision_id, properties=None, **args):
55
56
        self.revision_id = revision_id
56
 
        if properties is None:
57
 
            self.properties = {}
58
 
        else:
59
 
            self.properties = properties
60
 
            self._check_properties()
 
57
        self.properties = properties or {}
 
58
        self._check_properties()
61
59
        self.committer = None
62
60
        self.parent_ids = []
63
61
        self.parent_sha1s = []
121
119
        else:
122
120
            return ''
123
121
 
 
122
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
 
123
    def get_apparent_author(self):
 
124
        """Return the apparent author of this revision.
 
125
 
 
126
        This method is deprecated in favour of get_apparent_authors.
 
127
 
 
128
        If the revision properties contain any author names,
 
129
        return the first. Otherwise return the committer name.
 
130
        """
 
131
        authors = self.get_apparent_authors()
 
132
        if authors:
 
133
            return authors[0]
 
134
        else:
 
135
            return None
 
136
 
124
137
    def get_apparent_authors(self):
125
138
        """Return the apparent authors of this revision.
126
139