allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [39/50] git commit: [#6284] ticket:418 added commit id to canvas at commit browser page
Date Wed, 28 Aug 2013 14:35:20 GMT
[#6284] ticket:418 added commit id to canvas at commit browser page


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

Branch: refs/heads/tv/6526
Commit: 690a66ca422d659ca0b0559a0706192033b7c9bb
Parents: 6759394
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Mon Aug 19 16:04:34 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Aug 26 22:52:35 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/repository.py                  | 1 +
 Allura/allura/lib/widgets/resources/js/commit_browser.js | 2 +-
 ForgeGit/forgegit/tests/functional/test_controllers.py   | 1 +
 ForgeSVN/forgesvn/tests/functional/test_controllers.py   | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/690a66ca/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index b1b743c..f984a91 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -240,6 +240,7 @@ class RepoRootController(BaseController, FeedController):
                 msg = "No commit message."
             result.append(dict(
                     oid=oid,
+                    short_id=c.app.repo.shorthand_for_commit(oid),
                     row=row,
                     parents=ci.parent_ids,
                     message=msg,

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/690a66ca/Allura/allura/lib/widgets/resources/js/commit_browser.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/commit_browser.js b/Allura/allura/lib/widgets/resources/js/commit_browser.js
index 15c2a83..4375529 100644
--- a/Allura/allura/lib/widgets/resources/js/commit_browser.js
+++ b/Allura/allura/lib/widgets/resources/js/commit_browser.js
@@ -210,7 +210,7 @@ if($('#commit_graph')){
             canvas_ctx.fill();
             canvas_ctx.stroke();
             canvas_ctx.fillStyle = "#000";
-            canvas_ctx.fillText(commit.message, (1+next_column) * x_space, y_pos);
+            canvas_ctx.fillText(commit.message + " " + commit.short_id, (1+next_column) *
x_space, y_pos);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/690a66ca/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 5af224e..bbcd88a 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -108,6 +108,7 @@ class TestRootController(_TestCase):
         assert_equal(data['built_tree']['df30427c488aeab84b2352bdf88a3b19223f9d7a'],
                 {u'url': u'/p/test/src-git/ci/df30427c488aeab84b2352bdf88a3b19223f9d7a/',
                  u'oid': u'df30427c488aeab84b2352bdf88a3b19223f9d7a',
+                 u'short_id': u'6a4588',
                  u'column': 0,
                  u'parents': [u'6a45885ae7347f1cac5103b0050cc1be6a1496c8'],
                  u'message': u'Add README', u'row': 2})

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/690a66ca/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 78e7705..cc37545 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -100,6 +100,7 @@ class TestRootController(SVNTestController):
         assert data['next_column'] == 1
         for val in data['built_tree'].values():
             if val['url'] == '/p/test/src/1/':
+                assert val['short_id'] == '[r1]'
                 assert val['column'] == 0
                 assert val['row'] == 4
                 assert val['message'] == 'Create readme'


Mime
View raw message