• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

修订版e4d7ea665018a3523a39cf91102a4b257cdc3eac (tree)
时间2012-05-22 00:34:56
作者Jenny Steele <jsteele@geek...>
CommiterCory Johns

Log Message

[#4015] Add success/failure email for svn repo import

更改概述

差异

--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -33,6 +33,15 @@ def clone(
3333 c.user, c.app.repo, 'created',
3434 text='Repository %s/%s created' % (
3535 c.project.shortname, c.app.config.options.mount_point))
36+ sendmail(
37+ destinations=[str(c.user._id)],
38+ fromaddr=u'SourceForge.net <noreply+project-upgrade@in.sf.net>',
39+ reply_to=u'noreply@in.sf.net',
40+ subject=u'SourceForge Repo Clone Complete',
41+ message_id=h.gen_message_id(),
42+ text=u''.join([
43+ u'Clone of repo %s in project %s from %s is complete. Your repo is now ready to use.\n'
44+ ]) % (c.app.config.options.mount_point, c.project.shortname, cloned_from_url))
3645 except:
3746 sendmail(
3847 destinations=['sfengineers@geek.net'],
@@ -41,10 +50,21 @@ def clone(
4150 subject=u'SourceForge Repo Clone Failure',
4251 message_id=h.gen_message_id(),
4352 text=u''.join([
44- u'Clone of repo %s from %s failed.\n',
53+ u'Clone of repo %s in project %s from %s failed.\n',
54+ u'\n',
55+ u'%s',
56+ ]) % (c.app.config.options.mount_point, c.project.shortname, cloned_from_url, traceback.format_exc()))
57+ sendmail(
58+ destinations=[str(c.user._id)],
59+ fromaddr=u'SourceForge.net <noreply+project-upgrade@in.sf.net>',
60+ reply_to=u'noreply@in.sf.net',
61+ subject=u'SourceForge Repo Clone Failed',
62+ message_id=h.gen_message_id(),
63+ text=u''.join([
64+ u'Clone of repo %s in project %s from %s failed. The SourceForge engineering team has been notified.\n',
4565 u'\n',
4666 u'%s',
47- ]) % (cloned_from_name, cloned_from_url, traceback.format_exc()))
67+ ]) % (c.app.config.options.mount_point, c.project.shortname, cloned_from_url, traceback.format_exc()))
4868
4969 @task
5070 def reclone(*args, **kwargs):