You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/03/25 15:27:13 UTC

[15/50] git commit: [#4602] Undo link_text changes

[#4602] Undo link_text changes

- Undo these changes since we have changed the way we generate
  the Related Artifact link text in the meantime.

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


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

Branch: refs/heads/db/5995
Commit: 17d9dc8c5128947112183e2b59a798f3e4232d50
Parents: effeaa0
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Mar 11 15:40:46 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Mar 11 15:40:46 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/artifact.py                         | 2 +-
 Allura/allura/model/discuss.py                          | 2 +-
 Allura/allura/model/repo.py                             | 2 +-
 Allura/allura/tests/model/test_artifact.py              | 2 +-
 Allura/allura/tests/model/test_discussion.py            | 2 +-
 ForgeTracker/forgetracker/tests/functional/test_root.py | 8 ++++----
 6 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index d819897..2f62ca4 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -368,7 +368,7 @@ class Artifact(MappedClass):
         override this method to provide more descriptive link text.
 
         """
-        return '%s: %s' % (self.type_s, self.shorthand_id())
+        return self.shorthand_id()
 
     def get_discussion_thread(self, data=None):
         """Return the discussion thread and parent_id for this artifact.

http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 4a9c6ef..b9f25d1 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -648,7 +648,7 @@ class Post(Message, VersionedArtifact, ActivityObject):
             return None
 
     def link_text(self):
-        return '%s: %s' % (self.type_s, self.subject)
+        return self.subject
 
     def reply_subject(self):
         if self.subject and self.subject.lower().startswith('re:'):

http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 29e04c1..81d843d 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -295,7 +295,7 @@ class Commit(RepoObject, ActivityObject):
         By default this method returns type_s + shorthand_id(). Subclasses should
         override this method to provide more descriptive link text.
         '''
-        return '%s: %s' % (self.type_s, self.shorthand_id())
+        return self.shorthand_id()
 
     def context(self):
         result = dict(prev=None, next=None)

http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/Allura/allura/tests/model/test_artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py
index 031b105..d00d935 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -110,7 +110,7 @@ def test_artifact():
     assert idx['id'] == pg.index_id()
     assert 'text' in idx
     assert 'TestPage' in pg.shorthand_id()
-    assert pg.link_text() == '%s: %s' % (pg.type_s, pg.shorthand_id())
+    assert pg.link_text() == pg.shorthand_id()
 
 
 @with_setup(setUp, tearDown)

http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/Allura/allura/tests/model/test_discussion.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_discussion.py b/Allura/allura/tests/model/test_discussion.py
index 6f6d86e..f814fad 100644
--- a/Allura/allura/tests/model/test_discussion.py
+++ b/Allura/allura/tests/model/test_discussion.py
@@ -155,7 +155,7 @@ def test_post_methods():
     assert_equals(p.attachments, [])
     assert 'wiki/_discuss' in p.url()
     assert p.reply_subject() == 'Re: Test Thread'
-    assert p.link_text() == '%s: %s' % (p.type_s, p.subject)
+    assert p.link_text() == p.subject
 
     ss = p.history().first()
     assert 'version' in h.get_first(ss.index(), 'title')

http://git-wip-us.apache.org/repos/asf/allura/blob/17d9dc8c/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index f04e1c8..00ea90d 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -875,7 +875,7 @@ class TestFunctionalController(TrackerTestController):
         M.MonQTask.run_ready()
         ThreadLocalORMSession.flush_all()
         response = self.app.get('/p/test/bugs/1/')
-        assert 'Ticket: #2' not in response
+        assert 'Tickets: #2' not in response
         response = self.app.get('/wiki/aaa/')
         assert 'alink notfound' in response
 
@@ -887,9 +887,9 @@ class TestFunctionalController(TrackerTestController):
         M.MonQTask.run_ready()
         ThreadLocalORMSession.flush_all()
         r = self.app.get('/p/test/bugs/3/')
-        assert_in('Ticket: #1', r)
-        assert_not_in('<s>Ticket: #1</s>', r)
-        assert_in('<s>Ticket: #2</s>', r)
+        assert_in('Tickets: #1', r)
+        assert_not_in('Tickets: <s>#1</s>', r)
+        assert_in('Tickets: <s>#2</s>', r)
 
         assert_in('<a class="alink" href="/p/test/bugs/1/">[#1]</a>', r)
         assert_in('<a class="alink strikethrough" href="/p/test/bugs/2/">[#2]</a>', r)