Rev 440: Suppress the Author(s) field when it matches the committer. in http://bazaar.launchpad.net/~jameinel/loggerhead/authors-733015
John Arbash Meinel
john at arbash-meinel.com
Wed Mar 16 12:37:25 UTC 2011
At http://bazaar.launchpad.net/~jameinel/loggerhead/authors-733015
------------------------------------------------------------
revno: 440
revision-id: john at arbash-meinel.com-20110316123717-c36rtyk5ea30oboy
parent: john at arbash-meinel.com-20110316123016-9pqeki5fj047c0xe
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: authors-733015
timestamp: Wed 2011-03-16 13:37:17 +0100
message:
Suppress the Author(s) field when it matches the committer.
-------------- next part --------------
=== modified file 'loggerhead/templates/revisioninfo.pt'
--- a/loggerhead/templates/revisioninfo.pt 2011-03-11 10:56:34 +0000
+++ b/loggerhead/templates/revisioninfo.pt 2011-03-16 12:37:17 +0000
@@ -5,7 +5,7 @@
<strong>Committer:</strong>
<span tal:content="python:util.hide_email(change.committer)"></span>
</li>
- <li class="authors">
+ <li class="authors" tal:condition="python:len(change.authors) > 1 or change.authors[0] != change.committer">
<strong>Author(s):</strong>
<span tal:content="python:', '.join(util.hide_emails(change.authors))"></span>
</li>
=== modified file 'loggerhead/tests/test_revision_ui.py'
--- a/loggerhead/tests/test_revision_ui.py 2011-03-11 10:56:34 +0000
+++ b/loggerhead/tests/test_revision_ui.py 2011-03-16 12:37:17 +0000
@@ -33,3 +33,14 @@
# exact HTML connections, which I wanted to avoid.
res.mustcontain('Committer', 'Joe Example',
'Author(s)', 'A Author, B Author')
+
+ def test_author_is_committer(self):
+ self.createBranch()
+ self.tree.commit('First', committer="Joe Example <joe at example.com>")
+ app = self.setUpLoggerhead()
+ res = app.get('/revision/1')
+ # We would like to assert that Joe Example is connected to Committer,
+ # and the Authors are connected. However, that requires asserting the
+ # exact HTML connections, which I wanted to avoid.
+ res.mustcontain('Committer', 'Joe Example')
+ self.assertFalse('Author(s)' in res.body)
More information about the bazaar-commits
mailing list