1
# Copyright (C) 2005 Canonical Ltd
1
# Copyright (C) 2005-2011 Canonical Ltd
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
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
20
from bzrlib import (
26
from bzrlib.branch import Branch
27
24
from bzrlib.errors import (
29
26
InvalidLineInBugsProperty,
32
from bzrlib.deprecated_graph import Graph
33
from bzrlib.revision import (find_present_ancestors,
28
from bzrlib.revision import NULL_REVISION
35
29
from bzrlib.tests import TestCase, TestCaseWithTransport
36
30
from bzrlib.trace import mutter
37
from bzrlib.workingtree import WorkingTree
39
32
# We're allowed to test deprecated interfaces
40
33
warnings.filterwarnings('ignore',
212
205
self.assertEqual('', r.get_summary())
214
def test_get_apparent_author(self):
215
r = revision.Revision('1')
217
author = self.applyDeprecated(
218
symbol_versioning.deprecated_in((1, 13, 0)),
219
r.get_apparent_author)
220
self.assertEqual('A', author)
221
r.properties['author'] = 'B'
222
author = self.applyDeprecated(
223
symbol_versioning.deprecated_in((1, 13, 0)),
224
r.get_apparent_author)
225
self.assertEqual('B', author)
226
r.properties['authors'] = 'C\nD'
227
author = self.applyDeprecated(
228
symbol_versioning.deprecated_in((1, 13, 0)),
229
r.get_apparent_author)
230
self.assertEqual('C', author)
232
def test_get_apparent_author_none(self):
233
r = revision.Revision('1')
234
author = self.applyDeprecated(
235
symbol_versioning.deprecated_in((1, 13, 0)),
236
r.get_apparent_author)
237
self.assertEqual(None, author)
239
207
def test_get_apparent_authors(self):
240
208
r = revision.Revision('1')
241
209
r.committer = 'A'