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 2016/09/06 14:37:42 UTC

[1/2] allura git commit: Adds commit id to notification email subject

Repository: allura
Updated Branches:
  refs/heads/master b1b2e58ac -> a733a05e7


Adds commit id to notification email subject


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

Branch: refs/heads/master
Commit: f5842e7a966d400e113c1609f6190dc73ffe0bef
Parents: b1b2e58
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Thu Sep 1 14:52:26 2016 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Sep 1 14:52:26 2016 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo_refresh.py              | 6 ++++--
 ForgeGit/forgegit/tests/model/test_repository.py | 3 ++-
 ForgeSVN/forgesvn/tests/model/test_repository.py | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f5842e7a/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 1ca82e8..fdd7f5a 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -418,13 +418,15 @@ def send_notifications(repo, commit_ids):
                 date=ci.authored.date.strftime("%m/%d/%Y %H:%M"),
                 summary=summary,
                 branches=branches,
-                commit_url=base_url + href))
+                commit_url=base_url + href,
+                shorthand_id=ci.shorthand_id()))
 
     if commit_msgs:
         if len(commit_msgs) > 1:
             subject = u"{} new commits to {}".format(len(commit_msgs), repo.app.config.options.mount_label)
         else:
-            subject = u'New commit by {}'.format(commit_msgs[0]['author'])
+            commit = commit_msgs[0]
+            subject = u'New commit {} by {}'.format(commit['shorthand_id'], commit['author'])
         template = g.jinja2_env.get_template("allura:templates/mail/commits.md")
         text = u"\n\n-----".join([template.render(d) for d in commit_msgs])
 

http://git-wip-us.apache.org/repos/asf/allura/blob/f5842e7a/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 3587231..f07e970 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -377,7 +377,8 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
             self.repo, ['1e146e67985dcd71c74de79613719bef7bddca4a', ])
         ThreadLocalORMSession.flush_all()
 
-        n = M.Notification.query.find({'subject': u'[test:src-git] New commit by Rick Copeland'}).first()
+        import pudb;pudb.set_trace()
+        n = M.Notification.query.find({'subject': u'[test:src-git] New commit [1e146e] by Rick Copeland'}).first()
         assert n
         assert_in('Change README', n.text)
         send_notifications(

http://git-wip-us.apache.org/repos/asf/allura/blob/f5842e7a/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index f5ce1df..375e33e 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -695,7 +695,8 @@ class TestSVNRev(unittest.TestCase):
         ThreadLocalORMSession.flush_all()
         send_notifications(self.repo, [self.repo.rev_to_commit_id(1)])
         ThreadLocalORMSession.flush_all()
-        n = M.Notification.query.find({u'subject': u'[test:src] New commit by rick446'}).first()
+        n = M.Notification.query.find({u'subject': u'[test:src] New commit [r1] by rick446'}).first()
+
         assert n
         assert_in(u'By rick446', n.text)
         assert_in(u'Create readme', n.text)


[2/2] allura git commit: Removed errant pudb breakpoint

Posted by br...@apache.org.
Removed errant pudb breakpoint


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

Branch: refs/heads/master
Commit: a733a05e74f71bbb450263adcdd676dfdcc609bc
Parents: f5842e7
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Thu Sep 1 20:41:07 2016 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Sep 1 20:41:07 2016 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/tests/model/test_repository.py | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/a733a05e/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index f07e970..bea76d5 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -377,7 +377,6 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
             self.repo, ['1e146e67985dcd71c74de79613719bef7bddca4a', ])
         ThreadLocalORMSession.flush_all()
 
-        import pudb;pudb.set_trace()
         n = M.Notification.query.find({'subject': u'[test:src-git] New commit [1e146e] by Rick Copeland'}).first()
         assert n
         assert_in('Change README', n.text)