incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [44/44] git commit: [#6815] Leave off "Originally owned by: nobody" from imported unowned Allura tickets
Date Wed, 13 Nov 2013 22:58:04 GMT
[#6815] Leave off "Originally owned by: nobody" from imported unowned Allura tickets

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cce5b5cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cce5b5cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cce5b5cd

Branch: refs/heads/cj/6815
Commit: cce5b5cd3acf299b8e166b659a492f558b63ab93
Parents: c330602
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Nov 13 22:57:07 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Nov 13 22:57:07 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/forge/tracker.py            | 2 +-
 ForgeImporters/forgeimporters/tests/forge/test_tracker.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cce5b5cd/ForgeImporters/forgeimporters/forge/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/forge/tracker.py b/ForgeImporters/forgeimporters/forge/tracker.py
index c758651..0fe3fea 100644
--- a/ForgeImporters/forgeimporters/forge/tracker.py
+++ b/ForgeImporters/forgeimporters/forge/tracker.py
@@ -184,7 +184,7 @@ class ForgeTrackerImporter(ToolImporter):
         return user
 
     def annotate(self, text, user, username, label=''):
-        if username and user.is_anonymous():
+        if username and user.is_anonymous() and username != 'nobody':
             return '*Originally%s by:* %s\n\n%s' % (label, username, text)
         return text
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cce5b5cd/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
index 0b8fa05..85f4650 100644
--- a/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/forge/test_tracker.py
@@ -236,6 +236,7 @@ class TestTrackerImporter(TestCase):
         self.assertEqual(importer.annotate('foo', user, 'bar'), 'foo')
         user.is_anonymous.return_value = True
         self.assertEqual(importer.annotate('foo', user, 'bar'), '*Originally by:* bar\n\nfoo')
+        self.assertEqual(importer.annotate('foo', user, 'nobody'), 'foo')
         self.assertEqual(importer.annotate('foo', user, None), 'foo')
 
     @mock.patch.object(tracker, 'File')


Mime
View raw message