~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

(jelmer) Use the absolute_import feature everywhere in bzrlib,
 and add a source test to make sure it's used everywhere. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
 
18
 
17
19
# TODO: Some kind of command-line display of revision properties:
18
20
# perhaps show them in log -v and allow them as options to the commit command.
19
21
 
20
22
 
21
23
from bzrlib.lazy_import import lazy_import
22
24
lazy_import(globals(), """
23
 
from bzrlib import deprecated_graph
24
25
from bzrlib import bugtracker
25
26
""")
26
27
from bzrlib import (
28
29
    symbol_versioning,
29
30
    )
30
31
from bzrlib.osutils import contains_whitespace
31
 
from bzrlib.progress import DummyProgress
32
32
 
33
33
NULL_REVISION="null:"
34
34
CURRENT_REVISION="current:"
122
122
        else:
123
123
            return ''
124
124
 
125
 
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
126
 
    def get_apparent_author(self):
127
 
        """Return the apparent author of this revision.
128
 
 
129
 
        This method is deprecated in favour of get_apparent_authors.
130
 
 
131
 
        If the revision properties contain any author names,
132
 
        return the first. Otherwise return the committer name.
133
 
        """
134
 
        authors = self.get_apparent_authors()
135
 
        if authors:
136
 
            return authors[0]
137
 
        else:
138
 
            return None
139
 
 
140
125
    def get_apparent_authors(self):
141
126
        """Return the apparent authors of this revision.
142
127