You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2014/02/20 23:20:04 UTC

[1/3] git commit: [#5176] Make display of merge request date nicer

Repository: incubator-allura
Updated Branches:
  refs/heads/master 7536bf068 -> 119afc3a6


[#5176] Make display of merge request date nicer

Signed-off-by: Tim Van Steenburgh <tv...@gmail.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/119afc3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/119afc3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/119afc3a

Branch: refs/heads/master
Commit: 119afc3a670067c4e1eec679a897a50ef2f73425
Parents: cf9ae3a
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Feb 20 22:19:15 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 22:19:28 2014 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/merge_request.html        | 8 +++-----
 ForgeGit/forgegit/tests/functional/test_controllers.py | 5 ++---
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/119afc3a/Allura/allura/templates/repo/merge_request.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_request.html b/Allura/allura/templates/repo/merge_request.html
index 4750a31..7eabc41 100644
--- a/Allura/allura/templates/repo/merge_request.html
+++ b/Allura/allura/templates/repo/merge_request.html
@@ -34,14 +34,12 @@ Merge Request #{{req.request_number}}: {{req.summary}} ({{req.status}})
   {% if req.downstream_repo %}
     <p>
       <a href="{{req.creator_url}}">{{req.creator_name}}</a>
-      would like you to merge {{ req.commits | count }} commits
+      asked you to merge {{h.text.plural(req.commits|count, 'commit', 'commits')}}
       from <a href="{{req.downstream_url}}">{{req.downstream_url}}</a>
-      to {{ req.target_branch }}
+      to {{ req.target_branch }},
+      {{lib.abbr_date(req.mod_date)}}
     </p>
 
-    <p><strong>Created:</strong> {{lib.abbr_date(req.created)}}</p>
-    <p><strong>Updated:</strong> {{lib.abbr_date(req.mod_date)}}</p>
-
     <div>{{g.markdown.convert(req.description)}}</div>
 
     {{ c.log_widget.display(value=req.commits, app=downstream_app) }}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/119afc3a/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index fd731ae..3badb92 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -520,7 +520,7 @@ class TestFork(_TestCase):
 
     def test_merge_request_detail_view(self):
         r, mr_num = self._request_merge()
-        assert 'would like you to merge' in r, r.showbrowser()
+        assert 'asked you to merge' in r, r.showbrowser()
         assert 'Improve documentation' in r, r.showbrowser()
         revs = r.html.findAll('tr', attrs={'class': 'rev'})
         assert_equal(len(revs), 1)
@@ -536,8 +536,7 @@ class TestFork(_TestCase):
         assert 'git checkout master' in merge_instructions
         assert 'git fetch git://git.localhost/p/test2/code master' in merge_instructions
         assert 'git merge {}'.format(c_id) in merge_instructions
-        assert_equal(r.html.findAll('p')[1].getText(), 'Created:less than 1 minute ago')
-        assert_equal(r.html.findAll('p')[2].getText(), 'Updated:less than 1 minute ago')
+        assert_in('less than 1 minute ago', r.html.findAll('p')[0].getText())
 
     def test_merge_request_with_deleted_repo(self):
         self._request_merge()


[2/3] git commit: [#5176] ticket:538 Fix layout a bit

Posted by tv...@apache.org.
[#5176] ticket:538 Fix layout a bit


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

Branch: refs/heads/master
Commit: cf9ae3a35957148b4ca388d78455e253117bb114
Parents: 28265bb
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon Feb 17 09:24:34 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 22:19:28 2014 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/merge_request.html        | 8 +++-----
 ForgeGit/forgegit/tests/functional/test_controllers.py | 3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cf9ae3a3/Allura/allura/templates/repo/merge_request.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_request.html b/Allura/allura/templates/repo/merge_request.html
index 7d8aec3..4750a31 100644
--- a/Allura/allura/templates/repo/merge_request.html
+++ b/Allura/allura/templates/repo/merge_request.html
@@ -39,14 +39,12 @@ Merge Request #{{req.request_number}}: {{req.summary}} ({{req.status}})
       to {{ req.target_branch }}
     </p>
 
+    <p><strong>Created:</strong> {{lib.abbr_date(req.created)}}</p>
+    <p><strong>Updated:</strong> {{lib.abbr_date(req.mod_date)}}</p>
+
     <div>{{g.markdown.convert(req.description)}}</div>
 
     {{ c.log_widget.display(value=req.commits, app=downstream_app) }}
-    <p>
-        Created: {{lib.abbr_date(req.created)}}
-        <br style="clear:both">
-        Updated: {{lib.abbr_date(req.mod_date)}}
-    </p>
 
     <div class="grid-19"><a href="#discussion_holder">Discuss</a></div>
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cf9ae3a3/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 99ea99e..fd731ae 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -536,7 +536,8 @@ class TestFork(_TestCase):
         assert 'git checkout master' in merge_instructions
         assert 'git fetch git://git.localhost/p/test2/code master' in merge_instructions
         assert 'git merge {}'.format(c_id) in merge_instructions
-        assert_equal(r.html.findAll('p')[2].getText(), 'Created:less than 1 minute agoUpdated:less than 1 minute ago')
+        assert_equal(r.html.findAll('p')[1].getText(), 'Created:less than 1 minute ago')
+        assert_equal(r.html.findAll('p')[2].getText(), 'Updated:less than 1 minute ago')
 
     def test_merge_request_with_deleted_repo(self):
         self._request_merge()


[3/3] git commit: [#5176] ticket:538 show date in Merge request pages

Posted by tv...@apache.org.
[#5176] ticket:538 show date in  Merge request pages


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

Branch: refs/heads/master
Commit: 28265bb329ffa6488957612ff74af45cd6c7b9bb
Parents: 7536bf0
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Mon Feb 10 14:19:36 2014 +0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 22:19:28 2014 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/merge_request.html        | 6 ++++++
 Allura/allura/templates/repo/merge_requests.html       | 4 ++++
 ForgeGit/forgegit/tests/functional/test_controllers.py | 3 +++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/Allura/allura/templates/repo/merge_request.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_request.html b/Allura/allura/templates/repo/merge_request.html
index 9c1da9f..7d8aec3 100644
--- a/Allura/allura/templates/repo/merge_request.html
+++ b/Allura/allura/templates/repo/merge_request.html
@@ -42,6 +42,12 @@ Merge Request #{{req.request_number}}: {{req.summary}} ({{req.status}})
     <div>{{g.markdown.convert(req.description)}}</div>
 
     {{ c.log_widget.display(value=req.commits, app=downstream_app) }}
+    <p>
+        Created: {{lib.abbr_date(req.created)}}
+        <br style="clear:both">
+        Updated: {{lib.abbr_date(req.mod_date)}}
+    </p>
+
     <div class="grid-19"><a href="#discussion_holder">Discuss</a></div>
 
     {% if h.has_access(c.app, 'write')() %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/Allura/allura/templates/repo/merge_requests.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_requests.html b/Allura/allura/templates/repo/merge_requests.html
index 1b70881..b1d83c6 100644
--- a/Allura/allura/templates/repo/merge_requests.html
+++ b/Allura/allura/templates/repo/merge_requests.html
@@ -40,6 +40,8 @@
         <th>Summary</th>
         <th>Repository</th>
         <th>Creator</th>
+        <th>Created</th>
+        <th>Updated</th>
       </tr>
     </thead>
     <tbody>
@@ -54,6 +56,8 @@
           <i>(deleted)</i>
         {% endif %}</td>
         <td><a href="{{req.creator_url}}">{{req.creator_name}}</a></td>
+        <td>{{lib.abbr_date(req.created)}}</td>
+        <td>{{lib.abbr_date(req.mod_date)}}</td>
       </tr>
       {% endfor %}
     </tbody>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 282c773..99ea99e 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -536,6 +536,7 @@ class TestFork(_TestCase):
         assert 'git checkout master' in merge_instructions
         assert 'git fetch git://git.localhost/p/test2/code master' in merge_instructions
         assert 'git merge {}'.format(c_id) in merge_instructions
+        assert_equal(r.html.findAll('p')[2].getText(), 'Created:less than 1 minute agoUpdated:less than 1 minute ago')
 
     def test_merge_request_with_deleted_repo(self):
         self._request_merge()
@@ -555,6 +556,8 @@ class TestFork(_TestCase):
         r, mr_num = self._request_merge()
         r = self.app.get('/p/test/src-git/merge-requests/')
         assert 'href="%s/"' % mr_num in r, r
+        assert_equal(r.html.findAll('span')[8].getText(), 'less than 1 minute ago')
+        assert_equal(r.html.findAll('span')[9].getText(), 'less than 1 minute ago')
 
     def test_merge_request_update_status(self):
         r, mr_num = self._request_merge()