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 2012/12/12 18:11:44 UTC

[3/3] git commit: [#5383] remove unused labels_old param

[#5383] remove unused labels_old param


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

Branch: refs/heads/db/5383
Commit: c4fa6ac3974b6eb95152e1c12622cdd1f5beee36
Parents: 78888e7
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Dec 11 22:24:08 2012 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Wed Dec 12 17:11:32 2012 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/admin_main.py              |    2 +-
 Allura/allura/tests/functional/test_feeds.py       |    4 +--
 Allura/allura/tests/functional/test_rest.py        |    1 -
 .../forgetracker/tests/functional/test_root.py     |    8 ----
 ForgeWiki/forgewiki/tests/functional/test_root.py  |   27 ---------------
 ForgeWiki/forgewiki/wiki_main.py                   |    2 +-
 6 files changed, 3 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 04f902a..2ba4a56 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -203,7 +203,7 @@ class ProjectAdminController(BaseController):
 
     @expose()
     @require_post()
-    def update_labels(self, labels=None, labels_old=None, **kw):
+    def update_labels(self, labels=None, **kw):
         require_access(c.project, 'admin')
         c.project.labels = labels.split(',')
         M.AuditLog.log('updated labels')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/Allura/allura/tests/functional/test_feeds.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_feeds.py b/Allura/allura/tests/functional/test_feeds.py
index 5e7136a..287c63f 100644
--- a/Allura/allura/tests/functional/test_feeds.py
+++ b/Allura/allura/tests/functional/test_feeds.py
@@ -32,7 +32,7 @@ class TestFeeds(TestController):
                 title=title,
                 text="Nothing much",
                 labels='',
-                labels_old=''),
+                ),
             status=302)
         self.app.get('/wiki/%s/' % title)
 
@@ -51,7 +51,6 @@ class TestFeeds(TestController):
                 'title':'Root',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.get('/wiki/Root/feed.rss')
         self.app.get('/wiki/Root/feed.atom')
@@ -69,7 +68,6 @@ class TestFeeds(TestController):
                 assigned_to='',
                 ticket_num='',
                 labels='',
-                labels_old='',
                 summary='This is a new ticket',
                 status='unread',
                 milestone='',

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/Allura/allura/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py
index 2e0cb62..1272b9f 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -54,7 +54,6 @@ class TestRestHome(TestRestApiBase):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         r = self.api_get('/rest/p/test/wiki/tést/')
         assert r.status_int == 200

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/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 7ba0598..97c1982 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -294,7 +294,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'',
             'assigned_to':'',
             'labels':u'yellow,greén'.encode('utf-8'),
-            'labels_old':u'yellow,greén'.encode('utf-8'),
             'comment': ''
         })
         response = self.app.get('/bugs/1/')
@@ -307,7 +306,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'',
             'assigned_to':'',
             'labels':'yellow',
-            'labels_old':'yellow',
             'comment': ''
         })
         response = self.app.get('/bugs/1/')
@@ -394,7 +392,6 @@ class TestFunctionalController(TrackerTestController):
                 'title':'aaa',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.new_ticket(summary='bbb')
         ThreadLocalORMSession.flush_all()
@@ -448,7 +445,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'',
             'assigned_to':'test-admin',
             'labels':'',
-            'labels_old':'',
             'comment': ''
         }).follow()
         assert 'test-admin' in str(response.html.find('div', {'class': 'grid-5 ticket-assigned-to'}))
@@ -496,7 +492,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'aaa',
             'assigned_to':'',
             'labels':'',
-            'labels_old':'',
             'custom_fields._number':'',
             'comment': ''
         }).follow()
@@ -508,7 +503,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'aaa',
             'assigned_to':'',
             'labels':'',
-            'labels_old':'',
             'custom_fields._number':'4',
             'comment': ''
         }).follow()
@@ -537,7 +531,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'aaaé',
             'assigned_to':'',
             'labels':'',
-            'labels_old':'',
             'comment': ''
         })
         ticket_view = self.app.get('/p/test/bugs/1/')
@@ -553,7 +546,6 @@ class TestFunctionalController(TrackerTestController):
             '_milestone':'1.0',
             'assigned_to':'',
             'labels':'',
-            'labels_old':'',
             'comment': ''
         })
         ThreadLocalORMSession.flush_all()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/ForgeWiki/forgewiki/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_root.py b/ForgeWiki/forgewiki/tests/functional/test_root.py
index cb48574..6e61185 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -96,7 +96,6 @@ class TestRootController(TestController):
                 'title':'foo/bar',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'}).follow()
         assert 'foo-bar' in response
         assert 'foo-bar' in response.request.url
@@ -108,7 +107,6 @@ class TestRootController(TestController):
                 'title':'page.dot',
                 'text':'text1',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'}).follow()
         assert 'page.dot' in r
 
@@ -120,7 +118,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'text1',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         assert '/p/test/wiki/Home/' in self.app.get('/wiki/tést/Home/')
         self.app.get('/wiki/tést/notthere/', status=404)
@@ -133,7 +130,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'text1',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.post(
             '/wiki/tést/update',
@@ -141,7 +137,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'text2',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         response = self.app.get('/wiki/tést/history')
         assert 'tést' in response
@@ -166,7 +161,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.post('/wiki/tést/revert', params=dict(version='1'))
         response = self.app.get('/wiki/tést/')
@@ -181,7 +175,6 @@ class TestRootController(TestController):
                 'title':'TEST',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         response = self.app.get('/wiki/TEST/raw')
         assert 'TEST' in response
@@ -193,7 +186,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         response = self.app.post('/wiki/tést/revert', params=dict(version='1'))
         assert '.' in response.json['location']
@@ -208,7 +200,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         response = self.app.post('/wiki/tést/revert', params=dict(version='1'))
         assert '.' in response.json['location']
@@ -223,7 +214,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         assert 'tést' in response
 
@@ -235,7 +225,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'yellow,green',
-                'labels_old':'yellow,green',
                 'viewable_by-0.id':'all'})
         assert 'tést' in response
         response = self.app.post(
@@ -244,7 +233,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'yellow',
-                'labels_old':'yellow',
                 'viewable_by-0.id':'all'})
         assert 'tést' in response
 
@@ -258,7 +246,6 @@ class TestRootController(TestController):
                 'title': 'tést',
                 'text': 'sometext',
                 'labels': labels,
-                'labels_old': labels,
                 'viewable_by-0.id': 'all'})
         r = self.app.get('/wiki/browse_tags/')
         assert 'results of 100 ' in r
@@ -277,7 +264,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         content = file(__file__).read()
         self.app.post('/wiki/tést/attach', upload_files=[('file_info', 'test_root.py', content)])
@@ -291,7 +277,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         file_name = 'test_root.py'
         file_data = file(__file__).read()
@@ -306,7 +291,6 @@ class TestRootController(TestController):
                 'title':'TEST',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         file_name = 'neo-icon-set-454545-256x350.png'
         file_path = os.path.join(allura.__path__[0],'nf','allura','images',file_name)
@@ -352,19 +336,16 @@ class TestRootController(TestController):
                 'title':'TEST',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.post('/wiki/aaa/update', params={
                 'title':'aaa',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.post('/wiki/bbb/update', params={
                 'title':'bbb',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
 
         h.set_context('test', 'wiki', neighborhood='Projects')
@@ -387,7 +368,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         wiki_page = self.app.get('/wiki/tést/')
         assert wiki_page.html.find('div',{'id':'new_post_holder'})
@@ -405,7 +385,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         wiki_page = self.app.get('/wiki/tést/')
         assert wiki_page.html.find('ul',{'class':'sidebarmenu'})
@@ -425,7 +404,6 @@ class TestRootController(TestController):
                 'title':'tést',
                 'text':'sometext',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         wiki_page = self.app.get('/wiki/tést/')
         assert wiki_page.html.find('div',{'class':'editbox'})
@@ -452,7 +430,6 @@ class TestRootController(TestController):
             'title':'space page',
             'text':'''There is a space in the title!''',
             'labels':'',
-            'labels_old':'',
             'viewable_by-0.id':'all'}
         self.app.post('/wiki/space%20page/update', params=params)
         self.app.get('/wiki/TEST/')
@@ -471,7 +448,6 @@ class TestRootController(TestController):
 * Here is a link to [attach](TEST/attachment/test_root.py)
 ''',
             'labels':'',
-            'labels_old':'',
             'viewable_by-0.id':'all'}
         self.app.post('/wiki/TEST/update', params=params)
         content = file(__file__).read()
@@ -523,13 +499,11 @@ class TestRootController(TestController):
                 'title':'aaa',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         self.app.post('/wiki/bbb/update', params={
                 'title':'bbb',
                 'text':'',
                 'labels':'',
-                'labels_old':'',
                 'viewable_by-0.id':'all'})
         response = self.app.get('/wiki/browse_pages/')
         assert 'aaa' in response
@@ -549,7 +523,6 @@ class TestRootController(TestController):
 * Handmaid mailto <a href="mailto:yoda@jedi.org">Email Yoda</a>
 ''',
             'labels':'',
-            'labels_old':'',
             'viewable_by-0.id':'all'}
         self.app.post('/wiki/test_mailto/update', params=params)
         r = self.app.get('/wiki/test_mailto/')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c4fa6ac3/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 3015bbb..2857819 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -617,7 +617,7 @@ class PageController(BaseController):
     @expose()
     @require_post()
     def update(self, title=None, text=None,
-               labels=None, labels_old=None,
+               labels=None,
                viewable_by=None,
                new_viewable_by=None,**kw):
         activity_verb = 'created'