Rev 5347: Delete Revision.get_apparent_author. in file:///home/vila/src/bzr/cleanup/deprecations/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jul 15 13:37:32 BST 2010
At file:///home/vila/src/bzr/cleanup/deprecations/
------------------------------------------------------------
revno: 5347
revision-id: v.ladeuil+lp at free.fr-20100715123732-3d41ur2zrficjso3
parent: pqm at pqm.ubuntu.com-20100715110657-zb7pmrur0azigjs5
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: deprecations
timestamp: Thu 2010-07-15 14:37:32 +0200
message:
Delete Revision.get_apparent_author.
-------------- next part --------------
=== modified file 'bzrlib/revision.py'
--- a/bzrlib/revision.py 2010-02-23 07:43:11 +0000
+++ b/bzrlib/revision.py 2010-07-15 12:37:32 +0000
@@ -121,21 +121,6 @@
else:
return ''
- @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
- def get_apparent_author(self):
- """Return the apparent author of this revision.
-
- This method is deprecated in favour of get_apparent_authors.
-
- If the revision properties contain any author names,
- return the first. Otherwise return the committer name.
- """
- authors = self.get_apparent_authors()
- if authors:
- return authors[0]
- else:
- return None
-
def get_apparent_authors(self):
"""Return the apparent authors of this revision.
=== modified file 'bzrlib/tests/test_revision.py'
--- a/bzrlib/tests/test_revision.py 2009-06-03 10:24:28 +0000
+++ b/bzrlib/tests/test_revision.py 2010-07-15 12:37:32 +0000
@@ -211,31 +211,6 @@
r.message = None
self.assertEqual('', r.get_summary())
- def test_get_apparent_author(self):
- r = revision.Revision('1')
- r.committer = 'A'
- author = self.applyDeprecated(
- symbol_versioning.deprecated_in((1, 13, 0)),
- r.get_apparent_author)
- self.assertEqual('A', author)
- r.properties['author'] = 'B'
- author = self.applyDeprecated(
- symbol_versioning.deprecated_in((1, 13, 0)),
- r.get_apparent_author)
- self.assertEqual('B', author)
- r.properties['authors'] = 'C\nD'
- author = self.applyDeprecated(
- symbol_versioning.deprecated_in((1, 13, 0)),
- r.get_apparent_author)
- self.assertEqual('C', author)
-
- def test_get_apparent_author_none(self):
- r = revision.Revision('1')
- author = self.applyDeprecated(
- symbol_versioning.deprecated_in((1, 13, 0)),
- r.get_apparent_author)
- self.assertEqual(None, author)
-
def test_get_apparent_authors(self):
r = revision.Revision('1')
r.committer = 'A'
More information about the bazaar-commits
mailing list