• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


コミットメタ情報

リビジョンb8e16105e119988011f5ae3638eaf803e882cb0e (tree)
日時2012-05-30 01:00:12
作者bolkimen <bolkimen@yaho...>
コミッターDave Brondsema

ログメッセージ

[#3775] ticket:70 update commit messages

変更サマリ

差分

--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -149,6 +149,7 @@ class Notification(MappedClass):
149149 from_address=reply_to,
150150 reply_to_address=reply_to,
151151 subject=subject_prefix + subject,
152+ text=kwargs.pop('text', subject),
152153 author_id=c.user._id,
153154 pubdate=datetime.utcnow())
154155 if c.user.get_pref('email_address'):
@@ -159,19 +160,6 @@ class Notification(MappedClass):
159160 d['from_address'] = '"%s" <%s>' % (
160161 c.user.get_pref('display_name'),
161162 c.user.email_addresses[0])
162-
163- email_format = 'plain'
164- if c.user.get_pref('email_format'):
165- email_format = c.user.get_pref('email_format')
166- email_text = kwargs.pop('text', subject)
167- if email_format == 'plain':
168- # Here we render text message
169- d['text'] = email_text
170- else:
171- # For html or both we render html text
172- md = g.forge_markdown(email=True)
173- d['text'] = md.convert(email_text)
174-
175163 if not d.get('text'):
176164 d['text'] = ''
177165 try:
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -327,7 +327,7 @@ def send_notifications(repo, commit_ids):
327327 author_link=ci.author_url,
328328 author_name=ci.authored.name)
329329 branches = repo.symbolics_for_commit(ci.legacy)[0]
330- commit_msgs.append('[%s] %s by %s %s%s' % (
330+ commit_msgs.append('%s: %s by %s %s%s' % (
331331 ",".join(b for b in branches),
332332 summary, ci.authored.name, base_url, ci.url()))
333333 if commit_msgs:
@@ -341,7 +341,11 @@ def send_notifications(repo, commit_ids):
341341 repo.app.project.name,
342342 repo.app.config.options.mount_label,
343343 summary)
344- text = ci.message
344+ branches = repo.symbolics_for_commit(ci.legacy)[0]
345+ text = "%s: %s %s%s" % (",".join(b for b in branches),
346+ ci.message,
347+ base_url, ci.url())
348+
345349 Notification.post(
346350 artifact=repo,
347351 topic='metadata',
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -359,7 +359,7 @@ class Repository(Artifact):
359359 author_name = ci.authored.name,
360360 )
361361 branches = ci.symbolic_ids[0]
362- commit_msgs.append('[%s] %s by %s %s%s' % (
362+ commit_msgs.append('%s: %s by %s %s%s' % (
363363 ",".join(b for b in branches),
364364 h.really_unicode(ci.summary), h.really_unicode(ci.committed.name), base_url, ci.url()))
365365 if commit_msgs:
@@ -373,7 +373,13 @@ class Repository(Artifact):
373373 self.app.project.name,
374374 self.app.config.options.mount_label,
375375 h.really_unicode(ci.summary))
376- text = h.really_unicode(ci.message)
376+ ci.set_context(self)
377+ branches = ci.symbolic_ids[0]
378+ message = "%s: %s %s%s" % (",".join(b for b in branches),
379+ ci.message,
380+ base_url, ci.url())
381+ text = h.really_unicode(message)
382+ log.info("SUBJ: %s MESSAGE: %s" % (subject, text))
377383 Notification.post(
378384 artifact=self,
379385 topic='metadata',
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -169,7 +169,7 @@ class TestRepo(_TestWithRepo):
169169 notifications = M.Notification.query.find().all()
170170 for n in notifications:
171171 if '100 new commits' in n.subject:
172- assert "[master,branch] by Test Committer http://localhost/#" in n.text
172+ assert "master,branch: by Test Committer http://localhost/#" in n.text
173173 break
174174 else:
175175 assert False, 'Did not find notification'