pysvnmanager-svn Mailing List for pySvnManager
Status: Alpha
Brought to you by:
jiangx
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
(15) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ji...@us...> - 2009-01-05 15:04:21
|
Revision: 61 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=61&view=rev Author: jiangx Date: 2009-01-05 15:04:16 +0000 (Mon, 05 Jan 2009) Log Message: ----------- ignore Mercurial repository Property Changed: ---------------- / branches/0.2-pylons_0.9.6.2/ trunk/ Property changes on: ___________________________________________________________________ Deleted: svn:ignore - .hg .hgignore Property changes on: branches/0.2-pylons_0.9.6.2 ___________________________________________________________________ Modified: svn:ignore - build data dist + build data dist .hg .hgignore Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - build data dist + build data dist .hg .hgignore This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2009-01-05 14:59:16
|
Revision: 60 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=60&view=rev Author: jiangx Date: 2009-01-05 14:59:11 +0000 (Mon, 05 Jan 2009) Log Message: ----------- ignore mercurial repository Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Added: svn:ignore + .hg .hgignore This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-09-26 18:19:41
|
Revision: 59 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=59&view=rev Author: jiangx Date: 2008-09-26 18:19:12 +0000 (Fri, 26 Sep 2008) Log Message: ----------- translate 'welcome'; fix mantis post-commit hooks Modified Paths: -------------- trunk/pysvnmanager/hooks/init/hook1.4/post-commit trunk/pysvnmanager/hooks/init/hook1.5/post-commit trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/templates/base.mako Modified: trunk/pysvnmanager/hooks/init/hook1.4/post-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-commit 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-commit 2008-09-26 18:19:12 UTC (rev 59) @@ -73,15 +73,14 @@ ############################################################ if [ "$mantis_integration" = "yes" ]; then SVNLOOK=/opt/svn/bin/svnlook - SED=/bin/sed MANTISBT=/opt/mantis/web PHP=/opt/php5/bin/php5 if [ -f "$MANTISBT/core/checkin.php" ]; then export LC_ALL=zh_CN.utf8 - commitlog=`$SVNLOOK log -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` - commitauthor=`$SVNLOOK author -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` - commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25 | $SED -e 's/\$/\\\\n/g'` + commitlog=`$SVNLOOK log -r "$REV" "$REPOS"` + commitauthor=`$SVNLOOK author -r "$REV" "$REPOS"` + commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25` $PHP -q $MANTISBT/core/checkin.php $commitauthor << EOF Author: $commitauthor Commit Log: Modified: trunk/pysvnmanager/hooks/init/hook1.5/post-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.5/post-commit 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/hooks/init/hook1.5/post-commit 2008-09-26 18:19:12 UTC (rev 59) @@ -73,15 +73,14 @@ ############################################################ if [ "$mantis_integration" = "yes" ]; then SVNLOOK=/opt/svn/bin/svnlook - SED=/bin/sed MANTISBT=/opt/mantis/web PHP=/opt/php5/bin/php5 if [ -f "$MANTISBT/core/checkin.php" ]; then export LC_ALL=zh_CN.utf8 - commitlog=`$SVNLOOK log -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` - commitauthor=`$SVNLOOK author -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` - commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25 | $SED -e 's/\$/\\\\n/g'` + commitlog=`$SVNLOOK log -r "$REV" "$REPOS"` + commitauthor=`$SVNLOOK author -r "$REV" "$REPOS"` + commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25` $PHP -q $MANTISBT/core/checkin.php $commitauthor << EOF Author: $commitauthor Commit Log: Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-09-26 18:19:12 UTC (rev 59) @@ -9,7 +9,7 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-30 13:12+0800\n" +"PO-Revision-Date: 2008-09-27 00:48+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -229,17 +229,17 @@ msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:52 +#: pysvnmanager/controllers/security.py:50 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:63 +#: pysvnmanager/controllers/security.py:61 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:71 +#: pysvnmanager/controllers/security.py:69 #, python-format msgid "User %s logged out" msgstr "" @@ -551,43 +551,43 @@ msgid "Update failed! You are working on a out-of-date revision." msgstr "" -#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 -#: pysvnmanager/model/svnauthz.py:1513 +#: pysvnmanager/model/svnauthz.py:1505 pysvnmanager/model/svnauthz.py:1512 +#: pysvnmanager/model/svnauthz.py:1516 #, python-format msgid "Unknown rule format: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1527 +#: pysvnmanager/model/svnauthz.py:1530 #, python-format msgid "No module exist for %s:%s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1637 +#: pysvnmanager/model/svnauthz.py:1640 #, python-format msgid "Alias %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1649 +#: pysvnmanager/model/svnauthz.py:1652 #, python-format msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1785 +#: pysvnmanager/model/svnauthz.py:1788 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1787 +#: pysvnmanager/model/svnauthz.py:1790 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1789 +#: pysvnmanager/model/svnauthz.py:1792 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1829 +#: pysvnmanager/model/svnauthz.py:1832 #, python-format msgid "" "\n" @@ -599,7 +599,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1848 +#: pysvnmanager/model/svnauthz.py:1851 #, python-format msgid "" "\n" @@ -649,6 +649,10 @@ msgid "Change log" msgstr "" +#: pysvnmanager/templates/base.mako:38 +msgid "Welcome" +msgstr "" + #: pysvnmanager/templates/base.mako:39 msgid "Logout" msgstr "" Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-09-26 18:19:12 UTC (rev 59) @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pySvnManager 0.2.1\n" +"Project-Id-Version: pySvnManager 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-30 13:12+0800\n" +"POT-Creation-Date: 2008-09-27 00:47+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -221,17 +221,17 @@ msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:52 +#: pysvnmanager/controllers/security.py:50 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:63 +#: pysvnmanager/controllers/security.py:61 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:71 +#: pysvnmanager/controllers/security.py:69 #, python-format msgid "User %s logged out" msgstr "" @@ -542,43 +542,43 @@ msgid "Update failed! You are working on a out-of-date revision." msgstr "" -#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 -#: pysvnmanager/model/svnauthz.py:1513 +#: pysvnmanager/model/svnauthz.py:1505 pysvnmanager/model/svnauthz.py:1512 +#: pysvnmanager/model/svnauthz.py:1516 #, python-format msgid "Unknown rule format: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1527 +#: pysvnmanager/model/svnauthz.py:1530 #, python-format msgid "No module exist for %s:%s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1637 +#: pysvnmanager/model/svnauthz.py:1640 #, python-format msgid "Alias %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1649 +#: pysvnmanager/model/svnauthz.py:1652 #, python-format msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1785 +#: pysvnmanager/model/svnauthz.py:1788 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1787 +#: pysvnmanager/model/svnauthz.py:1790 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1789 +#: pysvnmanager/model/svnauthz.py:1792 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1829 +#: pysvnmanager/model/svnauthz.py:1832 #, python-format msgid "" "\n" @@ -590,7 +590,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1848 +#: pysvnmanager/model/svnauthz.py:1851 #, python-format msgid "" "\n" @@ -638,6 +638,10 @@ msgid "Change log" msgstr "" +#: pysvnmanager/templates/base.mako:38 +msgid "Welcome" +msgstr "" + #: pysvnmanager/templates/base.mako:39 msgid "Logout" msgstr "" Modified: trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-09-26 18:19:12 UTC (rev 59) @@ -11,7 +11,7 @@ "Project-Id-Version: pysvnmanager\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-30 13:12+0800\n" +"PO-Revision-Date: 2008-09-27 00:48+0800\n" "Last-Translator: Jiang Xin <wor...@gm...>\n" "Language-Team: <zh...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -239,17 +239,17 @@ msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "用户 %(user)s 删除别名: %(alias)s。(rev:%(rev)s,%(msg)s)" -#: pysvnmanager/controllers/security.py:52 +#: pysvnmanager/controllers/security.py:50 #, python-format msgid "User %s logged in" msgstr "用户 %s 登录" -#: pysvnmanager/controllers/security.py:63 +#: pysvnmanager/controllers/security.py:61 #, python-format msgid "Login failed for user: %s" msgstr "以 %s 身份登录失败" -#: pysvnmanager/controllers/security.py:71 +#: pysvnmanager/controllers/security.py:69 #, python-format msgid "User %s logged out" msgstr "用户 %s 登出" @@ -589,43 +589,43 @@ msgid "Update failed! You are working on a out-of-date revision." msgstr "更新失败!您的更改是基于一个过期的版本,请先刷新再更改。" -#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 -#: pysvnmanager/model/svnauthz.py:1513 +#: pysvnmanager/model/svnauthz.py:1505 pysvnmanager/model/svnauthz.py:1512 +#: pysvnmanager/model/svnauthz.py:1516 #, python-format msgid "Unknown rule format: %s" msgstr "未知策略格式: %s" -#: pysvnmanager/model/svnauthz.py:1527 +#: pysvnmanager/model/svnauthz.py:1530 #, python-format msgid "No module exist for %s:%s" msgstr "模块不存在: %s:%s" -#: pysvnmanager/model/svnauthz.py:1637 +#: pysvnmanager/model/svnauthz.py:1640 #, python-format msgid "Alias %s is referenced by group %s." msgstr "别名 %s 为用户组 %s 引用。" -#: pysvnmanager/model/svnauthz.py:1649 +#: pysvnmanager/model/svnauthz.py:1652 #, python-format msgid "%s is referenced by [%s]." msgstr "%s 在 [%s] 中被引用。" -#: pysvnmanager/model/svnauthz.py:1785 +#: pysvnmanager/model/svnauthz.py:1788 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "用户 %(username)s 对模组 %(repos)s:%(path)s 具有完全权限 (RW)" -#: pysvnmanager/model/svnauthz.py:1787 +#: pysvnmanager/model/svnauthz.py:1790 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "用户 %(username)s 对模组 %(repos)s:%(path)s 具有只读权限 (RO)" -#: pysvnmanager/model/svnauthz.py:1789 +#: pysvnmanager/model/svnauthz.py:1792 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "用户 %(username)s 对模组 %(repos)s:%(path)s *没有* 访问权限 (XX)" -#: pysvnmanager/model/svnauthz.py:1829 +#: pysvnmanager/model/svnauthz.py:1832 #, python-format msgid "" "\n" @@ -644,7 +644,7 @@ "禁用: %(deny)s\n" "\n" -#: pysvnmanager/model/svnauthz.py:1848 +#: pysvnmanager/model/svnauthz.py:1851 #, python-format msgid "" "\n" @@ -707,6 +707,10 @@ msgid "Change log" msgstr "修改日志" +#: pysvnmanager/templates/base.mako:38 +msgid "Welcome" +msgstr "欢迎," + #: pysvnmanager/templates/base.mako:39 msgid "Logout" msgstr "登出" Modified: trunk/pysvnmanager/templates/base.mako =================================================================== --- trunk/pysvnmanager/templates/base.mako 2008-09-26 14:55:45 UTC (rev 58) +++ trunk/pysvnmanager/templates/base.mako 2008-09-26 18:19:12 UTC (rev 59) @@ -35,7 +35,7 @@ <td>${h.link_to(_("ACL management"), h.url_for(controller="authz", id=None))}</td> <td>${h.link_to(_("Repos management"), h.url_for(controller="repos", id=None))}</td> <td>${h.link_to(_("Change log"), h.url_for(controller="logs", id=None))}</td> - <td>welcome ${session.get('user')}</td> + <td>${_("Welcome")} ${session.get('user')}</td> <td>${h.link_to(_("Logout"), h.url_for(controller="logout", id=None))}</td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-09-26 14:55:47
|
Revision: 58 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=58&view=rev Author: jiangx Date: 2008-09-26 14:55:45 +0000 (Fri, 26 Sep 2008) Log Message: ----------- add contrib to source package Modified Paths: -------------- trunk/pySvnManager.egg-info/SOURCES.txt Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-09-26 14:54:16 UTC (rev 57) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-09-26 14:55:45 UTC (rev 58) @@ -8,6 +8,7 @@ test.ini config/Makefile config/README +contrib/mantis/021_checkin_user_as_bug_submit_user.patch docs/index.txt pySvnManager.egg-info/PKG-INFO pySvnManager.egg-info/SOURCES.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-09-26 14:54:24
|
Revision: 57 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=57&view=rev Author: jiangx Date: 2008-09-26 14:54:16 +0000 (Fri, 26 Sep 2008) Log Message: ----------- Enhanced mantis/subversion integration. contribute by Jiang Zongwen. Modified Paths: -------------- trunk/pysvnmanager/hooks/init/hook1.4/post-commit trunk/pysvnmanager/hooks/init/hook1.5/post-commit Added Paths: ----------- trunk/contrib/ trunk/contrib/mantis/ trunk/contrib/mantis/021_checkin_user_as_bug_submit_user.patch Added: trunk/contrib/mantis/021_checkin_user_as_bug_submit_user.patch =================================================================== --- trunk/contrib/mantis/021_checkin_user_as_bug_submit_user.patch (rev 0) +++ trunk/contrib/mantis/021_checkin_user_as_bug_submit_user.patch 2008-09-26 14:54:16 UTC (rev 57) @@ -0,0 +1,101 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 021_checkin_user_as_bug_submit_user.patch by +## Jiang Zongwen <jz...@po...> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: 1. As a command line script, error output message should direct to stderr +## DP: 2. Try to checkin user as bugtracking submit user account. +## DP: 3. Settings in config_inc.php: +## DP: $g_source_control_set_status_to = RESOLVED; +## DP: $g_source_control_set_resolution_to = FIXED; +## DP: $g_source_control_regexp = "/\b(?:issue|bug)[\s]*[#]{0,1}(\d+)\b/i"; +## DP: $g_source_control_fixed_regexp = "/\bfix(?:ed)?[\s]*(?:issue|bug)[\s]*[#]{0,1}(\d+)\b/i"; + + +@DPATCH@ +Index: mantis/core/checkin.php +=================================================================== +--- a/core/checkin.php 2006-05-28 22:27:15.000000000 +0800 ++++ b/core/checkin.php 2007-08-27 19:14:38.000000000 +0800 +@@ -17,6 +17,13 @@ + # + # You should have received a copy of the GNU General Public License + # along with Mantis. If not, see <http://www.gnu.org/licenses/>. ++# ++# Usage: ++# echo "commit log..." | php checkin.php checkin_user ++# ++# Note: Try to use checkin user as bugtracking submit user at first, ++# use source_control_account (defined in config file) as a fallback. ++# + # See the README and LICENSE files for details + + # -------------------------------------------------------- +@@ -27,17 +34,37 @@ + $g_bypass_headers = 1; + require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' ); + ++ $stderr = fopen('php://stderr', 'w'); ++ ++ function print_err($message) ++ { ++ global $stderr; ++ fwrite($stderr, $message); ++ } ++ + # Make sure this script doesn't run via the webserver + # @@@ This is a hack to detect php-cgi, there must be a better way. + if ( isset( $_SERVER['SERVER_PORT'] ) ) { +- echo "checkin.php is not allowed to run through the webserver.\n"; ++ print_err ("checkin.php is not allowed to run through the webserver.\n"); + exit( 1 ); + } + +- # Check that the username is set and exists +- $t_username = config_get( 'source_control_account' ); +- if ( is_blank( $t_username ) || ( user_get_id_by_name( $t_username ) === false ) ) { +- echo "Invalid source control account ('$t_username').\n"; ++ $accounts = array(); ++ if (count($_SERVER["argv"]) == 2) ++ $accounts[] = $_SERVER["argv"][1]; ++ $accounts[] = config_get( 'source_control_account' ); ++ $t_username = ""; ++ foreach ($accounts as $username) ++ { ++ if ( (! is_blank( $username )) && ( user_get_id_by_name( $username ) !== false ) ) ++ { ++ $t_username = $username; ++ break; ++ } ++ } ++ if ( is_blank( $t_username ) ) ++ { ++ print_err ("Invalid source control account ('" . join(', ',$accounts) . "').\n"); + exit( 1 ); + } + +@@ -47,7 +74,7 @@ + + # Detect references to issues + concat all lines to have the comment log. + $t_commit_regexp = config_get( 'source_control_regexp' ); +- $t_commit_fixed_regexp = config_get( 'source_control_fixed_regexp' ); ++ $t_commit_fixed_regexp = config_get( 'source_control_fixed_regexp' ); + + $t_comment = ''; + $t_issues = array(); +@@ -69,13 +96,13 @@ + + # If no issues found, then no work to do. + if ( ( count( $t_issues ) == 0 ) && ( count( $t_fixed_issues ) == 0 ) ) { +- echo "Comment does not reference any issues.\n"; ++ print_err ("Comment does not reference any issues.\n"); + exit(0); + } + + # Login as source control user + if ( !auth_attempt_script_login( $t_username ) ) { +- echo "Unable to login\n"; ++ print_err ("Unable to login\n"); + exit( 1 ); + } + Property changes on: trunk/contrib/mantis/021_checkin_user_as_bug_submit_user.patch ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: trunk/pysvnmanager/hooks/init/hook1.4/post-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-commit 2008-09-19 07:39:38 UTC (rev 56) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-commit 2008-09-26 14:54:16 UTC (rev 57) @@ -82,7 +82,16 @@ commitlog=`$SVNLOOK log -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` commitauthor=`$SVNLOOK author -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25 | $SED -e 's/\$/\\\\n/g'` - echo -e "Author: $commitauthor\nCommit Log:\n$commitlog\n\n****** Source code change ******\nRepository: $REPOS, Revision: $REV.\n\n$commitdiff" | $PHP -q $MANTISBT/core/checkin.php + $PHP -q $MANTISBT/core/checkin.php $commitauthor << EOF +Author: $commitauthor +Commit Log: +$commitlog + +****** Source code change ****** +Repository: $REPOS, Revision: $REV. + +$commitdiff +EOF fi fi Modified: trunk/pysvnmanager/hooks/init/hook1.5/post-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.5/post-commit 2008-09-19 07:39:38 UTC (rev 56) +++ trunk/pysvnmanager/hooks/init/hook1.5/post-commit 2008-09-26 14:54:16 UTC (rev 57) @@ -82,7 +82,16 @@ commitlog=`$SVNLOOK log -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` commitauthor=`$SVNLOOK author -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25 | $SED -e 's/\$/\\\\n/g'` - echo -e "Author: $commitauthor\nCommit Log:\n$commitlog\n\n****** Source code change ******\nRepository: $REPOS, Revision: $REV.\n\n$commitdiff" | $PHP -q $MANTISBT/core/checkin.php + $PHP -q $MANTISBT/core/checkin.php $commitauthor << EOF +Author: $commitauthor +Commit Log: +$commitlog + +****** Source code change ****** +Repository: $REPOS, Revision: $REV. + +$commitdiff +EOF fi fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-09-19 00:39:26
|
Revision: 56 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=56&view=rev Author: jiangx Date: 2008-09-19 07:39:38 +0000 (Fri, 19 Sep 2008) Log Message: ----------- use fcrypt instead of native crypt in Windows Modified Paths: -------------- trunk/pysvnmanager/controllers/security.py trunk/pysvnmanager/model/auth/http.py Modified: trunk/pysvnmanager/controllers/security.py =================================================================== --- trunk/pysvnmanager/controllers/security.py 2008-08-30 09:42:05 UTC (rev 55) +++ trunk/pysvnmanager/controllers/security.py 2008-09-19 07:39:38 UTC (rev 56) @@ -20,8 +20,6 @@ from pysvnmanager.lib.base import * -from crypt import crypt - log = logging.getLogger(__name__) class SecurityController(BaseController): @@ -74,4 +72,4 @@ redirect_to(h.url_for(controller="security")) def failed(self): - return render('/auth_failed.mako') \ No newline at end of file + return render('/auth_failed.mako') Modified: trunk/pysvnmanager/model/auth/http.py =================================================================== --- trunk/pysvnmanager/model/auth/http.py 2008-08-30 09:42:05 UTC (rev 55) +++ trunk/pysvnmanager/model/auth/http.py 2008-09-19 07:39:38 UTC (rev 56) @@ -1,6 +1,10 @@ # -*- coding: utf-8 -*- -from crypt import crypt +try: + from crypt import crypt +except ImportError: + # Native crypt is not supported by Windows, use fcrypt instead. + from fcrypt import crypt def htpasswd_login(username, password, config): authn_file = getattr(config, 'authn_file', '') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-30 09:41:58
|
Revision: 55 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=55&view=rev Author: jiangx Date: 2008-08-30 09:42:05 +0000 (Sat, 30 Aug 2008) Log Message: ----------- ------------------------------------------------------------------------ r118 | jiangxin | 2008-08-30 16:57:18 +0800 (Sat, 30 Aug 2008) | 1 line if svn swig binding not exist, ignore testcase ------------------------------------------------------------------------ r117 | jiangxin | 2008-08-30 16:33:53 +0800 (Sat, 30 Aug 2008) | 1 line function tests passed for new routes ------------------------------------------------------------------------ r113 | jiangxin | 2008-08-30 15:47:39 +0800 (Sat, 30 Aug 2008) | 1 line upgrade to 0.3.0; add requires; ------------------------------------------------------------------------ r112 | jiangxin | 2008-08-30 14:38:00 +0800 (Sat, 30 Aug 2008) | 1 line link_to from webhelpers.html is different with link_to from webhelpers.rails ------------------------------------------------------------------------ r108 | jiangxin | 2008-08-30 14:02:36 +0800 (Sat, 30 Aug 2008) | 1 line do not check against authz file using svn swig bidings if ImportError ------------------------------------------------------------------------ r106 | jiangxin | 2008-08-30 13:15:05 +0800 (Sat, 30 Aug 2008) | 1 line Babel upgrade to 0.9.4 ------------------------------------------------------------------------ r104 | jiangxin | 2008-08-30 00:00:31 +0800 (Sat, 30 Aug 2008) | 1 line scriptaculous and prototype no longer maintain by pylons ------------------------------------------------------------------------ r103 | jiangxin | 2008-08-29 23:59:50 +0800 (Fri, 29 Aug 2008) | 1 line bugfix: wrong tuple for role_list_opts ------------------------------------------------------------------------ r102 | jiangxin | 2008-08-29 23:37:49 +0800 (Fri, 29 Aug 2008) | 1 line new routing format ------------------------------------------------------------------------ r101 | jiangxin | 2008-08-29 23:00:42 +0800 (Fri, 29 Aug 2008) | 1 line import literal ------------------------------------------------------------------------ r100 | jiangxin | 2008-08-29 22:53:08 +0800 (Fri, 29 Aug 2008) | 1 line update template for pylons 0.9.7 ------------------------------------------------------------------------ r99 | jiangxin | 2008-08-29 21:50:12 +0800 (Fri, 29 Aug 2008) | 1 line webhelpers upgrade from 0.3 to 0.6 ------------------------------------------------------------------------ Modified Paths: -------------- trunk/MANIFEST.in trunk/development.ini trunk/docs/index.txt trunk/pySvnManager.egg-info/SOURCES.txt trunk/pySvnManager.egg-info/paster_plugins.txt trunk/pySvnManager.egg-info/requires.txt trunk/pysvnmanager/config/environment.py trunk/pysvnmanager/config/middleware.py trunk/pysvnmanager/config/routing.py trunk/pysvnmanager/controllers/error.py trunk/pysvnmanager/controllers/logs.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/lib/app_globals.py trunk/pysvnmanager/lib/base.py trunk/pysvnmanager/lib/helpers.py trunk/pysvnmanager/model/svnauthz.py trunk/pysvnmanager/templates/base.mako trunk/pysvnmanager/templates/check/index.mako trunk/pysvnmanager/templates/repos/create.mako trunk/pysvnmanager/templates/repos/hooks.mako trunk/pysvnmanager/templates/repos/remove.mako trunk/pysvnmanager/templates/role/index.mako trunk/pysvnmanager/tests/__init__.py trunk/pysvnmanager/tests/functional/test_authz.py trunk/pysvnmanager/tests/functional/test_check.py trunk/pysvnmanager/tests/functional/test_login.py trunk/pysvnmanager/tests/functional/test_repos.py trunk/pysvnmanager/tests/functional/test_role.py trunk/pysvnmanager/tests/test_repos.py trunk/pysvnmanager/websetup.py trunk/setup.cfg trunk/setup.py Added Paths: ----------- trunk/ez_setup.py trunk/pysvnmanager/public/javascripts/ trunk/pysvnmanager/public/javascripts/builder.js trunk/pysvnmanager/public/javascripts/controls.js trunk/pysvnmanager/public/javascripts/dragdrop.js trunk/pysvnmanager/public/javascripts/effects.js trunk/pysvnmanager/public/javascripts/prototype.js trunk/pysvnmanager/public/javascripts/scriptaculous.js trunk/pysvnmanager/public/javascripts/slider.js trunk/pysvnmanager/public/javascripts/sound.js trunk/pysvnmanager/public/javascripts/unittest.js Modified: trunk/MANIFEST.in =================================================================== --- trunk/MANIFEST.in 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/MANIFEST.in 2008-08-30 09:42:05 UTC (rev 55) @@ -1,4 +1,6 @@ recursive-include pysvnmanager/public * recursive-include pysvnmanager/templates * -recursive-include pysvnmanager/config * +recursive-include pysvnmanager/config *.py *.in recursive-include pysvnmanager/i18n * +recursive-include pysvnmanager/hooks *.py +recursive-include pysvnmanager/hooks/init/hook* * Modified: trunk/development.ini =================================================================== --- trunk/development.ini 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/development.ini 2008-08-30 09:42:05 UTC (rev 55) @@ -63,7 +63,7 @@ # Logging configuration [loggers] -keys = root, pysvnmanager +keys = root, routes, pysvnmanager [handlers] keys = console @@ -75,6 +75,12 @@ level = INFO handlers = console +[logger_routes] +level = INFO +handlers = +qualname = routes.middleware +# "level = DEBUG" logs the route matched and routing variables. + [logger_pysvnmanager] level = DEBUG handlers = Modified: trunk/docs/index.txt =================================================================== --- trunk/docs/index.txt 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/docs/index.txt 2008-08-30 09:42:05 UTC (rev 55) @@ -8,5 +8,12 @@ setup.py pudge -For this to work you will need to download and install ``buildutils`` and -``pudge``. +For this to work you will need to download and install `buildutils`_, +`pudge`_, and `pygments`_. The ``pudge`` command is disabled by +default; to ativate it in your project, run:: + + setup.py addcommand -p buildutils.pudge_command + +.. _buildutils: http://pypi.python.org/pypi/buildutils +.. _pudge: http://pudge.lesscode.org/ +.. _pygments: http://pygments.org/ Added: trunk/ez_setup.py =================================================================== --- trunk/ez_setup.py (rev 0) +++ trunk/ez_setup.py 2008-08-30 09:42:05 UTC (rev 55) @@ -0,0 +1,272 @@ +#!python +"""Bootstrap setuptools installation + +If you want to use setuptools in your package's setup.py, just include this +file in the same directory with it, and add this to the top of your setup.py:: + + from ez_setup import use_setuptools + use_setuptools() + +If you want to require a specific version of setuptools, set a download +mirror, or use an alternate download directory, you can do so by supplying +the appropriate options to ``use_setuptools()``. + +This file can also be run as a script to install or upgrade setuptools. +""" +import sys +DEFAULT_VERSION = "0.6c8" +DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] + +md5_data = { + 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', + 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', + 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', + 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', + 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', + 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', + 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', + 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', + 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', + 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', + 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', + 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', + 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', + 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', + 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', + 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', + 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', + 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', + 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', + 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', + 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', + 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', + 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', + 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', + 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', + 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', + 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', + 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', + 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', + 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', +} + +import sys, os + +def _validate_md5(egg_name, data): + if egg_name in md5_data: + from md5 import md5 + digest = md5(data).hexdigest() + if digest != md5_data[egg_name]: + print >>sys.stderr, ( + "md5 validation of %s failed! (Possible download problem?)" + % egg_name + ) + sys.exit(2) + return data + + +def use_setuptools( + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, + download_delay=15 +): + """Automatically find/download setuptools and make it available on sys.path + + `version` should be a valid setuptools version number that is available + as an egg for download under the `download_base` URL (which should end with + a '/'). `to_dir` is the directory where setuptools will be downloaded, if + it is not already available. If `download_delay` is specified, it should + be the number of seconds that will be paused before initiating a download, + should one be required. If an older version of setuptools is installed, + this routine will print a message to ``sys.stderr`` and raise SystemExit in + an attempt to abort the calling script. + """ + was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules + def do_download(): + egg = download_setuptools(version, download_base, to_dir, download_delay) + sys.path.insert(0, egg) + import setuptools; setuptools.bootstrap_install_from = egg + try: + import pkg_resources + except ImportError: + return do_download() + try: + pkg_resources.require("setuptools>="+version); return + except pkg_resources.VersionConflict, e: + if was_imported: + print >>sys.stderr, ( + "The required version of setuptools (>=%s) is not available, and\n" + "can't be installed while this script is running. Please install\n" + " a more recent version first, using 'easy_install -U setuptools'." + "\n\n(Currently using %r)" + ) % (version, e.args[0]) + sys.exit(2) + else: + del pkg_resources, sys.modules['pkg_resources'] # reload ok + return do_download() + except pkg_resources.DistributionNotFound: + return do_download() + +def download_setuptools( + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, + delay = 15 +): + """Download setuptools from a specified location and return its filename + + `version` should be a valid setuptools version number that is available + as an egg for download under the `download_base` URL (which should end + with a '/'). `to_dir` is the directory where the egg will be downloaded. + `delay` is the number of seconds to pause before an actual download attempt. + """ + import urllib2, shutil + egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) + url = download_base + egg_name + saveto = os.path.join(to_dir, egg_name) + src = dst = None + if not os.path.exists(saveto): # Avoid repeated downloads + try: + from distutils import log + if delay: + log.warn(""" +--------------------------------------------------------------------------- +This script requires setuptools version %s to run (even to display +help). I will attempt to download it for you (from +%s), but +you may need to enable firewall access for this script first. +I will start the download in %d seconds. + +(Note: if this machine does not have network access, please obtain the file + + %s + +and place it in this directory before rerunning this script.) +---------------------------------------------------------------------------""", + version, download_base, delay, url + ); from time import sleep; sleep(delay) + log.warn("Downloading %s", url) + src = urllib2.urlopen(url) + # Read/write all in one block, so we don't create a corrupt file + # if the download is interrupted. + data = _validate_md5(egg_name, src.read()) + dst = open(saveto,"wb"); dst.write(data) + finally: + if src: src.close() + if dst: dst.close() + return os.path.realpath(saveto) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +def main(argv, version=DEFAULT_VERSION): + """Install or upgrade setuptools and EasyInstall""" + try: + import setuptools + except ImportError: + egg = None + try: + egg = download_setuptools(version, delay=0) + sys.path.insert(0,egg) + from setuptools.command.easy_install import main + return main(list(argv)+[egg]) # we're done here + finally: + if egg and os.path.exists(egg): + os.unlink(egg) + else: + if setuptools.__version__ == '0.0.1': + print >>sys.stderr, ( + "You have an obsolete version of setuptools installed. Please\n" + "remove it from your system entirely before rerunning this script." + ) + sys.exit(2) + + req = "setuptools>="+version + import pkg_resources + try: + pkg_resources.require(req) + except pkg_resources.VersionConflict: + try: + from setuptools.command.easy_install import main + except ImportError: + from easy_install import main + main(list(argv)+[download_setuptools(delay=0)]) + sys.exit(0) # try to force an exit + else: + if argv: + from setuptools.command.easy_install import main + main(argv) + else: + print "Setuptools version",version,"or greater has been installed." + print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' + +def update_md5(filenames): + """Update our built-in md5 registry""" + + import re + from md5 import md5 + + for name in filenames: + base = os.path.basename(name) + f = open(name,'rb') + md5_data[base] = md5(f.read()).hexdigest() + f.close() + + data = [" %r: %r,\n" % it for it in md5_data.items()] + data.sort() + repl = "".join(data) + + import inspect + srcfile = inspect.getsourcefile(sys.modules[__name__]) + f = open(srcfile, 'rb'); src = f.read(); f.close() + + match = re.search("\nmd5_data = {\n([^}]+)}", src) + if not match: + print >>sys.stderr, "Internal error!" + sys.exit(2) + + src = src[:match.start(1)] + repl + src[match.end(1):] + f = open(srcfile,'w') + f.write(src) + f.close() + + +if __name__=='__main__': + if len(sys.argv)>2 and sys.argv[1]=='--md5update': + update_md5(sys.argv[2:]) + else: + main(sys.argv[1:]) + + + + + Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-30 09:42:05 UTC (rev 55) @@ -1,6 +1,7 @@ MANIFEST.in README.txt development.ini +ez_setup.py init.d setup.cfg setup.py @@ -135,6 +136,15 @@ pysvnmanager/public/img/attention.png pysvnmanager/public/img/icon-error.png pysvnmanager/public/img/icon-info.png +pysvnmanager/public/javascripts/builder.js +pysvnmanager/public/javascripts/controls.js +pysvnmanager/public/javascripts/dragdrop.js +pysvnmanager/public/javascripts/effects.js +pysvnmanager/public/javascripts/prototype.js +pysvnmanager/public/javascripts/scriptaculous.js +pysvnmanager/public/javascripts/slider.js +pysvnmanager/public/javascripts/sound.js +pysvnmanager/public/javascripts/unittest.js pysvnmanager/templates/auth_failed.mako pysvnmanager/templates/base.mako pysvnmanager/templates/authz/index.mako Modified: trunk/pySvnManager.egg-info/paster_plugins.txt =================================================================== --- trunk/pySvnManager.egg-info/paster_plugins.txt 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pySvnManager.egg-info/paster_plugins.txt 2008-08-30 09:42:05 UTC (rev 55) @@ -1,3 +1,2 @@ -Pylons -WebHelpers PasteScript +Pylons Modified: trunk/pySvnManager.egg-info/requires.txt =================================================================== --- trunk/pySvnManager.egg-info/requires.txt 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pySvnManager.egg-info/requires.txt 2008-08-30 09:42:05 UTC (rev 55) @@ -1,2 +1,3 @@ -Pylons>=0.9.6.2 -docutils \ No newline at end of file +Pylons>=0.9.7rc1 +docutils +Babel \ No newline at end of file Modified: trunk/pysvnmanager/config/environment.py =================================================================== --- trunk/pysvnmanager/config/environment.py 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/config/environment.py 2008-08-30 09:42:05 UTC (rev 55) @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- import os +from mako.lookup import TemplateLookup from pylons import config import pysvnmanager.lib.app_globals as app_globals @@ -20,21 +21,20 @@ templates=[os.path.join(root, 'templates')]) # Initialize config with the basic options - config.init_app(global_conf, app_conf, package='pysvnmanager', - template_engine='mako', paths=paths) + config.init_app(global_conf, app_conf, package='pysvnmanager', paths=paths) config['routes.map'] = make_map() - config['pylons.g'] = app_globals.Globals() + config['pylons.app_globals'] = app_globals.Globals() config['pylons.h'] = pysvnmanager.lib.helpers - # Customize templating options via this variable - tmpl_options = config['buffet.template_options'] - - # 设置缺省编码为 utf8 - tmpl_options['mako.input_encoding'] = 'UTF-8' - tmpl_options['mako.output_encoding'] = 'UTF-8' - #tmpl_options['mako.default_filters'] = ['decode.utf8'] - - + # Create the Mako TemplateLookup, with the default auto-escaping + config['pylons.app_globals'].mako_lookup = TemplateLookup( + directories=paths['templates'], + module_directory=os.path.join(app_conf['cache_dir'], 'templates'), + input_encoding='utf-8', output_encoding='utf-8', + imports=['from webhelpers.html import escape'], + ) + #default_filters=['escape']) + # CONFIGURATION OPTIONS HERE (note: all config options will override # any Pylons config options) Modified: trunk/pysvnmanager/config/middleware.py =================================================================== --- trunk/pysvnmanager/config/middleware.py 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/config/middleware.py 2008-08-30 09:42:05 UTC (rev 55) @@ -1,14 +1,13 @@ """Pylons middleware initialization""" +from beaker.middleware import CacheMiddleware, SessionMiddleware from paste.cascade import Cascade from paste.registry import RegistryManager from paste.urlparser import StaticURLParser from paste.deploy.converters import asbool - from pylons import config -from pylons.error import error_template -from pylons.middleware import error_mapper, ErrorDocuments, ErrorHandler, \ - StaticJavascripts +from pylons.middleware import ErrorHandler, StatusCodeRedirect from pylons.wsgiapp import PylonsApp +from routes.middleware import RoutesMiddleware from pysvnmanager.config.environment import load_environment @@ -26,32 +25,40 @@ another WSGI middleware. ``app_conf`` - The application's local configuration. Normally specified in the - [app:<name>] section of the Paste ini file (where <name> + The application's local configuration. Normally specified in + the [app:<name>] section of the Paste ini file (where <name> defaults to main). + """ # Configure the Pylons environment load_environment(global_conf, app_conf) # The Pylons WSGI app app = PylonsApp() - + # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) - + + # Routing/Session/Cache Middleware + app = RoutesMiddleware(app, config['routes.map']) + app = SessionMiddleware(app, config) + app = CacheMiddleware(app, config) + if asbool(full_stack): # Handle Python exceptions - app = ErrorHandler(app, global_conf, error_template=error_template, - **config['pylons.errorware']) + app = ErrorHandler(app, global_conf, **config['pylons.errorware']) # Display error documents for 401, 403, 404 status codes (and # 500 when debug is disabled) - app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) + if asbool(config['debug']): + app = StatusCodeRedirect(app) + else: + app = StatusCodeRedirect(app, [400, 401, 403, 404, 500]) # Establish the Registry for this application app = RegistryManager(app) - # Static files - javascripts_app = StaticJavascripts() + # Static files (If running in production, and Apache or another web + # server is handling this static content, remove the following 3 lines) static_app = StaticURLParser(config['pylons.paths']['static_files']) - app = Cascade([static_app, javascripts_app, app]) + app = Cascade([static_app, app]) return app Modified: trunk/pysvnmanager/config/routing.py =================================================================== --- trunk/pysvnmanager/config/routing.py 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/config/routing.py 2008-08-30 09:42:05 UTC (rev 55) @@ -11,17 +11,20 @@ """Create, configure and return the routes Mapper""" map = Mapper(directory=config['pylons.paths']['controllers'], always_scan=config['debug']) - + map.minimization = False + # The ErrorController route (handles 404/500 error pages); it should # likely stay at the top, ensuring it can always be resolved - map.connect('error/:action/:id', controller='error') + map.connect('/error/{action}', controller='error') + map.connect('/error/{action}/{id}', controller='error') # CUSTOM ROUTES HERE - map.connect('', controller='check', action='index') - map.connect('login', controller='security', action='index') - map.connect('logout', controller='security', action='logout') + map.connect('/', controller='check', action='index') + map.connect('/login', controller='security', action='index') + map.connect('/logout', controller='security', action='logout') - map.connect(':controller/:action/:id') - map.connect('*url', controller='template', action='view') + map.connect('/{controller}') + map.connect('/{controller}/{action}') + map.connect('/{controller}/{action}/{id}') return map Modified: trunk/pysvnmanager/controllers/error.py =================================================================== --- trunk/pysvnmanager/controllers/error.py 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/controllers/error.py 2008-08-30 09:42:05 UTC (rev 55) @@ -20,9 +20,12 @@ import os.path from paste.urlparser import StaticURLParser +from pylons import request +from pylons.controllers.util import forward from pylons.middleware import error_document_template, media_path +from webhelpers.html.builder import literal -from pysvnmanager.lib.base import * +from pysvnmanager.lib.base import BaseController class ErrorController(BaseController): """Generates error documents as and when they are required. @@ -36,10 +39,12 @@ """ def document(self): """Render the error document""" + resp = request.environ.get('pylons.original_response') + content = literal(resp.body) or cgi.escape(request.GET.get('message')) page = error_document_template % \ dict(prefix=request.environ.get('SCRIPT_NAME', ''), - code=cgi.escape(request.params.get('code', '')), - message=cgi.escape(request.params.get('message', ''))) + code=cgi.escape(request.GET.get('code', str(resp.status_int))), + message=content) return page def img(self, id): Modified: trunk/pysvnmanager/controllers/logs.py =================================================================== --- trunk/pysvnmanager/controllers/logs.py 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/controllers/logs.py 2008-08-30 09:42:05 UTC (rev 55) @@ -87,8 +87,8 @@ 'who' : logs[i].get('author',''), 'when': logs[i].get('date',''), 'why' : h.link_to(logs[i].get('log',''), \ - h.url(action='view', id=logs[i].get('revision','')), \ - popup=['view_logs'] + h.url_for(action='view', id=logs[i].get('revision','')), \ + onclick="window.open(this.href,'view_logs','location=0,toolbar=0,width=780,height=580');return false;" ), } @@ -181,4 +181,4 @@ c.msg = log_message return render('/logs/rollback.mako') - \ No newline at end of file + Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:42:05 UTC (rev 55) @@ -9,35 +9,35 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-28 19:02+0800\n" +"PO-Revision-Date: 2008-08-30 13:12+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.2\n" +"Generated-By: Babel 0.9.4\n" -#: pysvnmanager/controllers/authz.py:43 +#: pysvnmanager/controllers/authz.py:60 #: pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:44 +#: pysvnmanager/controllers/authz.py:61 #: pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:45 +#: pysvnmanager/controllers/authz.py:62 #: pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 +#: pysvnmanager/controllers/authz.py:67 pysvnmanager/controllers/role.py:67 +#: pysvnmanager/controllers/role.py:87 #: pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 @@ -47,8 +47,8 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/authz.py:70 pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/role.py:89 #: pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 @@ -58,9 +58,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 -#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 -#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:85 pysvnmanager/controllers/authz.py:116 +#: pysvnmanager/controllers/check.py:106 pysvnmanager/controllers/repos.py:57 +#: pysvnmanager/controllers/repos.py:76 pysvnmanager/controllers/role.py:60 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -68,231 +68,231 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:160 +#: pysvnmanager/controllers/authz.py:177 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:173 +#: pysvnmanager/controllers/authz.py:190 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:181 +#: pysvnmanager/controllers/authz.py:198 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:187 +#: pysvnmanager/controllers/authz.py:204 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:212 +#: pysvnmanager/controllers/authz.py:229 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:69 +#: pysvnmanager/controllers/check.py:86 #: pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" -#: pysvnmanager/controllers/logs.py:50 +#: pysvnmanager/controllers/logs.py:68 msgid "Rev" msgstr "" -#: pysvnmanager/controllers/logs.py:51 +#: pysvnmanager/controllers/logs.py:69 msgid "Who" msgstr "" -#: pysvnmanager/controllers/logs.py:52 +#: pysvnmanager/controllers/logs.py:70 msgid "When" msgstr "" -#: pysvnmanager/controllers/logs.py:53 +#: pysvnmanager/controllers/logs.py:71 msgid "Why" msgstr "" -#: pysvnmanager/controllers/logs.py:54 +#: pysvnmanager/controllers/logs.py:72 msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:97 +#: pysvnmanager/controllers/logs.py:115 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:133 +#: pysvnmanager/controllers/logs.py:151 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:152 +#: pysvnmanager/controllers/logs.py:170 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:161 +#: pysvnmanager/controllers/logs.py:179 #, python-format msgid "Rollback failed: %s" msgstr "" -#: pysvnmanager/controllers/repos.py:74 +#: pysvnmanager/controllers/repos.py:91 msgid "Installed hooks:" msgstr "" -#: pysvnmanager/controllers/repos.py:80 +#: pysvnmanager/controllers/repos.py:97 msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/controllers/repos.py:98 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:314 +#: pysvnmanager/controllers/repos.py:99 +#: pysvnmanager/hooks/plugins/__init__.py:330 msgid "Type" msgstr "" -#: pysvnmanager/controllers/repos.py:96 +#: pysvnmanager/controllers/repos.py:113 msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:136 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:122 +#: pysvnmanager/controllers/repos.py:139 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:160 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:163 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:149 +#: pysvnmanager/controllers/repos.py:166 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:175 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:161 +#: pysvnmanager/controllers/repos.py:178 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:191 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:177 +#: pysvnmanager/controllers/repos.py:194 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/role.py:103 +#: pysvnmanager/controllers/role.py:120 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:123 +#: pysvnmanager/controllers/role.py:140 #, python-format msgid "User %(user)s delete group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:145 +#: pysvnmanager/controllers/role.py:162 #, python-format msgid "User %(user)s changed alias: %(alias)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:165 +#: pysvnmanager/controllers/role.py:182 #, python-format msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:34 +#: pysvnmanager/controllers/security.py:52 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:45 +#: pysvnmanager/controllers/security.py:63 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:53 +#: pysvnmanager/controllers/security.py:71 #, python-format msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:26 msgid "Allow revprop change" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:32 msgid "Allow user change commit-log or other rev-properties." msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:35 msgid "" "Commit-log is the only rev-prop we allow to change. Because the changes " "of rev-prop can not be reverted back, administrator must setup email " "notification to record this irreversible action." msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:26 msgid "Mantis bugtracking integration" msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:32 msgid "" "Integration Subversion with Mantis bugtracking. If commit-log has proper " "format (contains bugid), it will change bug status and append commint-log" " and code differ as comment of bug status change." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:26 msgid "Subversion client version check (>1.5.0)" msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:32 msgid "Check subversion client version. if version below 1.5.0, checkin denied." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:35 msgid "" "SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " "automated merge tracking!" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:26 msgid "Detect case-insensitive filename clashes" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:32 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:35 msgid "" "Subversion services may host on a filename case-sensitive OS,\n" "while client **may not** (Windows is case-insensitive). This may cause " @@ -304,83 +304,83 @@ " are detected.\n" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:27 msgid "Check commit log message" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:33 msgid "User must provide commit-log message when checkin." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 -#: pysvnmanager/hooks/plugins/EmailNotify.py:73 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:66 +#: pysvnmanager/hooks/plugins/EmailNotify.py:89 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:65 msgid "Current configuration" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:68 msgid "Commit log check is enabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:70 msgid "Commit log check is disabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:72 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:111 msgid "Minimal size of commit log: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:77 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:117 msgid "Pattern which commit log must match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:80 msgid "Pattern which commit log must **NOT** match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 -#: pysvnmanager/hooks/plugins/EmailNotify.py:97 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:99 +#: pysvnmanager/hooks/plugins/EmailNotify.py:113 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:89 msgid "Fill this form" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:103 msgid "Enable commit log check: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 -#: pysvnmanager/hooks/plugins/EmailNotify.py:104 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:106 +#: pysvnmanager/hooks/plugins/EmailNotify.py:120 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:96 msgid "Enable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 -#: pysvnmanager/hooks/plugins/EmailNotify.py:106 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:108 +#: pysvnmanager/hooks/plugins/EmailNotify.py:122 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:98 msgid "Disable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:123 msgid "Pattern which commit log must <b>NOT</b> match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:156 msgid "Commit log size must > 0." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:11 +#: pysvnmanager/hooks/plugins/EmailNotify.py:27 msgid "Send email notify for commit event" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:17 +#: pysvnmanager/hooks/plugins/EmailNotify.py:33 msgid "" "Send a notification email describing either a commit or a revprop-change " "action on a Subversion repository." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:21 +#: pysvnmanager/hooks/plugins/EmailNotify.py:37 msgid "" "\n" "You must provide proper options to commit-email.pl using the\n" @@ -406,188 +406,188 @@ "--diff n Do not include diff in message (default: y)\n" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +#: pysvnmanager/hooks/plugins/EmailNotify.py:91 msgid "Email notify enabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +#: pysvnmanager/hooks/plugins/EmailNotify.py:93 msgid "Email notify disabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +#: pysvnmanager/hooks/plugins/EmailNotify.py:95 msgid "Parameters: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +#: pysvnmanager/hooks/plugins/EmailNotify.py:117 msgid "Enable email notify." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:109 +#: pysvnmanager/hooks/plugins/EmailNotify.py:125 msgid "Input email notify configurations: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:139 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 +#: pysvnmanager/hooks/plugins/EmailNotify.py:155 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:131 msgid "Wrong configuration." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:26 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:32 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:26 msgid "Subversion readonly mirror" msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:32 msgid "" "This subversion repository is a svnsync readonly mirror. Nobody can " "checkin, except the svnsync admin user." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:36 msgid "" "Commit to the remote svn server, this repository is a readonly svn " "mirror.It is the svnsync admin's duty to synchronize svnsync server and " "mirror." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:67 msgid "Readonly mirror enabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:69 msgid "Readonly mirror disabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:71 msgid "Admin user: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:93 msgid "Enable readonly mirror: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:101 msgid "Svnsync administrator: " msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:95 +#: pysvnmanager/hooks/plugins/__init__.py:111 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:152 +#: pysvnmanager/hooks/plugins/__init__.py:168 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:182 -#: pysvnmanager/hooks/plugins/__init__.py:209 -#: pysvnmanager/hooks/plugins/__init__.py:215 -#: pysvnmanager/hooks/plugins/__init__.py:234 -#: pysvnmanager/hooks/plugins/__init__.py:332 -#: pysvnmanager/hooks/plugins/__init__.py:339 +#: pysvnmanager/hooks/plugins/__init__.py:198 +#: pysvnmanager/hooks/plugins/__init__.py:225 +#: pysvnmanager/hooks/plugins/__init__.py:231 +#: pysvnmanager/hooks/plugins/__init__.py:250 #: pysvnmanager/hooks/plugins/__init__.py:348 +#: pysvnmanager/hooks/plugins/__init__.py:355 +#: pysvnmanager/hooks/plugins/__init__.py:364 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:313 +#: pysvnmanager/hooks/plugins/__init__.py:329 msgid "Name" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:315 +#: pysvnmanager/hooks/plugins/__init__.py:331 msgid "Description" msgstr "" -#: pysvnmanager/model/repos.py:39 +#: pysvnmanager/model/repos.py:55 #, python-format msgid "Repos root does not exist: %s" msgstr "" -#: pysvnmanager/model/repos.py:68 +#: pysvnmanager/model/repos.py:84 #, python-format msgid "Repos %s already exists." msgstr "" -#: pysvnmanager/model/repos.py:139 +#: pysvnmanager/model/repos.py:166 #, python-format msgid "Repos %s is not a blank repository." msgstr "" -#: pysvnmanager/model/svnauthz.py:61 +#: pysvnmanager/model/svnauthz.py:77 msgid "Name is not given." msgstr "" -#: pysvnmanager/model/svnauthz.py:63 +#: pysvnmanager/model/svnauthz.py:79 msgid "Name is not string." msgstr "" -#: pysvnmanager/model/svnauthz.py:67 +#: pysvnmanager/model/svnauthz.py:83 #, python-format msgid "Name (%s) contains invalid characters." msgstr "" -#: pysvnmanager/model/svnauthz.py:475 +#: pysvnmanager/model/svnauthz.py:491 #, python-format msgid "Recursive group membership for %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:569 +#: pysvnmanager/model/svnauthz.py:585 #, python-format msgid "Not a valid username: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:686 +#: pysvnmanager/model/svnauthz.py:702 #, python-format msgid "Group %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1232 +#: pysvnmanager/model/svnauthz.py:1248 msgid "Update failed! You are working on a out-of-date revision." msgstr "" -#: pysvnmanager/model/svnauthz.py:1486 pysvnmanager/model/svnauthz.py:1493 -#: pysvnmanager/model/svnauthz.py:1497 +#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 +#: pysvnmanager/model/svnauthz.py:1513 #, python-format msgid "Unknown rule format: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1511 +#: pysvnmanager/model/svnauthz.py:1527 #, python-format msgid "No module exist for %s:%s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1621 +#: pysvnmanager/model/svnauthz.py:1637 #, python-format msgid "Alias %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1633 +#: pysvnmanager/model/svnauthz.py:1649 #, python-format msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1769 +#: pysvnmanager/model/svnauthz.py:1785 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1771 +#: pysvnmanager/model/svnauthz.py:1787 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1773 +#: pysvnmanager/model/svnauthz.py:1789 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1813 +#: pysvnmanager/model/svnauthz.py:1829 #, python-format msgid "" "\n" @@ -599,7 +599,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1832 +#: pysvnmanager/model/svnauthz.py:1848 #, python-format msgid "" "\n" @@ -763,23 +763,23 @@ msgstr "" #: pysvnmanager/templates/authz/index.mako:678 -#: pysvnmanager/templates/role/index.mako:711 +#: pysvnmanager/templates/role/index.mako:708 msgid "Save" msgstr "" #: pysvnmanager/templates/authz/index.mako:679 -#: pysvnmanager/templates/role/index.mako:712 +#: pysvnmanager/templates/role/index.mako:709 msgid "Delete" msgstr "" #: pysvnmanager/templates/authz/index.mako:680 -#: pysvnmanager/templates/role/index.mako:713 +#: pysvnmanager/templates/role/index.mako:710 msgid "Cancel" msgstr "" #: pysvnmanager/templates/check/index.mako:5 #: pysvnmanager/templates/check/index.mako:106 -#: pysvnmanager/templates/check/index.mako:176 +#: pysvnmanager/templates/check/index.mako:173 msgid "Check Permissions" msgstr "" @@ -811,17 +811,17 @@ msgid "Select username" msgstr "" -#: pysvnmanager/templates/check/index.mako:139 -#: pysvnmanager/templates/check/index.mako:152 -#: pysvnmanager/templates/check/index.mako:164 +#: pysvnmanager/templates/check/index.mako:138 +#: pysvnmanager/templates/check/index.mako:149 +#: pysvnmanager/templates/check/index.mako:161 msgid "Manual input" msgstr "" -#: pysvnmanager/templates/check/index.mako:146 +#: pysvnmanager/templates/check/index.mako:145 msgid "Select repository" msgstr "" -#: pysvnmanager/templates/check/index.mako:160 +#: pysvnmanager/templates/check/index.mako:157 msgid "Select module" msgstr "" @@ -949,47 +949,35 @@ msgid "Select a role name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:636 +#: pysvnmanager/templates/role/index.mako:634 msgid "New Group" msgstr "" -#: pysvnmanager/templates/role/index.mako:637 +#: pysvnmanager/templates/role/index.mako:635 msgid "New Alias" msgstr "" -#: pysvnmanager/templates/role/index.mako:641 +#: pysvnmanager/templates/role/index.mako:639 msgid "New group name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:645 +#: pysvnmanager/templates/role/index.mako:643 msgid "New alias name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:657 +#: pysvnmanager/templates/role/index.mako:655 msgid "Members list" msgstr "" -#: pysvnmanager/templates/role/index.mako:662 +#: pysvnmanager/templates/role/index.mako:660 msgid "Other users" msgstr "" -#: pysvnmanager/templates/role/index.mako:681 +#: pysvnmanager/templates/role/index.mako:679 msgid "Ignore recursive" msgstr "" -#: pysvnmanager/templates/role/index.mako:693 +#: pysvnmanager/templates/role/index.mako:691 msgid "User name:" msgstr "" -#~ msgid "" -#~ "Subversion services may host on a filename case-sensitive OS,\n" -#~ "while client **may not** (Windows is " -#~ "case-insensitive). This may cause " -#~ "'clash'.\n" -#~ " \n" -#~ "- Detects new paths that 'clash' with existing, or other new, paths.\n" -#~ "- Ignores existings paths that already 'clash'\n" -#~ "- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" -#~ " are detected.\n" -#~ msgstr "" - Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-30 09:29:41 UTC (rev 54) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-30 09:42:05 UTC (rev 55) @@ -6,34 +6,34 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pySvnManager 0.2.0\n" +"Project-Id-Version: pySvnManager 0.2.1\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-28 19:02+0800\n" +"POT-Creation-Date: 2008-08-30 13:12+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.2\n" +"Generated-By: Babel 0.9.4\n" -#: pysvnmanager/controllers/authz.py:43 pysvnmanager/templates/authz/index.mako:152 +#: pysvnmanager/controllers/authz.py:60 pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:44 pysvnmanager/templates/authz/index.mako:154 +#: pysvnmanager/controllers/authz.py:61 pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:45 pysvnmanager/templates/authz/index.mako:156 +#: pysvnmanager/controllers/authz.py:62 pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 pysvnmanager/templates/authz/index.mako:148 +#: pysvnmanager/controllers/authz.py:67 pysvnmanager/controllers/role.py:67 +#: pysvnmanager/controllers/role.py:87 pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 #: pysvnmanager/templates/role/index.mako:37 @@ -42,8 +42,8 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 pysvnmanager/templates/authz/index.mako:150 +#: pysvnmanager/controllers/authz.py:70 pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/role.py:89 pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 #: pysvnmanager/templates/role/index.mako:42 @@ -52,9 +52,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 -#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 -#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:85 pysvnmanager/controllers/authz.py:116 +#: pysvnmanager/controllers/check.py:106 pysvnmanager/controllers/repos.py:57 +#: pysvnmanager/controllers/repos.py:76 pysvnmanager/controllers/role.py:60 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -62,229 +62,229 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:160 +#: pysvnmanager/controllers/authz.py:177 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:173 +#: pysvnmanager/controllers/authz.py:190 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:181 +#: pysvnmanager/controllers/authz.py:198 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:187 +#: pysvnmanager/controllers/authz.py:204 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:212 +#: pysvnmanager/controllers/authz.py:229 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:69 pysvnmanager/templates/auth_failed.mako:3 +#: pysvnmanager/controllers/check.py:86 pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" -#: pysvnmanager/controllers/logs.py:50 +#: pysvnmanager/controllers/logs.py:68 msgid "Rev" msgstr "" -#: pysvnmanager/controllers/logs.py:51 +#: pysvnmanager/controllers/logs.py:69 msgid "Who" msgstr "" -#: pysvnmanager/controllers/logs.py:52 +#: pysvnmanager/controllers/logs.py:70 msgid "When" msgstr "" -#: pysvnmanager/controllers/logs.py:53 +#: pysvnmanager/controllers/logs.py:71 msgid "Why" msgstr "" -#: pysvnmanager/controllers/logs.py:54 +#: pysvnmanager/controllers/logs.py:72 msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:97 +#: pysvnmanager/controllers/logs.py:115 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:133 +#: pysvnmanager/controllers/logs.py:151 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:152 +#: pysvnmanager/controllers/logs.py:170 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:161 +#: pysvnmanager/controllers/logs.py:179 #, python-format msgid "Rollback failed: %s" msgstr "" -#: pysvnmanager/controllers/repos.py:74 +#: pysvnmanager/controllers/repos.py:91 msgid "Installed hooks:" msgstr "" -#: pysvnmanager/controllers/repos.py:80 +#: pysvnmanager/controllers/repos.py:97 msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/controllers/repos.py:98 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:314 +#: pysvnmanager/controllers/repos.py:99 pysvnmanager/hooks/plugins/__init__.py:330 msgid "Type" msgstr "" -#: pysvnmanager/controllers/repos.py:96 +#: pysvnmanager/controllers/repos.py:113 msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:136 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:122 +#: pysvnmanager/controllers/repos.py:139 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:160 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:163 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:149 +#: pysvnmanager/controllers/repos.py:166 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:175 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:161 +#: pysvnmanager/controllers/repos.py:178 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:191 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:177 +#: pysvnmanager/controllers/repos.py:194 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/role.py:103 +#: pysvnmanager/controllers/role.py:120 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:123 +#: pysvnmanager/controllers/role.py:140 #, python-format msgid "User %(user)s delete group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:145 +#: pysvnmanager/controllers/role.py:162 #, python-format msgid "User %(user)s changed alias: %(alias)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:165 +#: pysvnmanager/controllers/role.py:182 #, python-format msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:34 +#: pysvnmanager/controllers/security.py:52 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:45 +#: pysvnmanager/controllers/security.py:63 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:53 +#: pysvnmanager/controllers/security.py:71 #, python-format msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:26 msgid "Allow revprop change" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:32 msgid "Allow us... [truncated message content] |
From: <ji...@us...> - 2008-08-30 09:29:33
|
Revision: 54 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=54&view=rev Author: jiangx Date: 2008-08-30 09:29:41 +0000 (Sat, 30 Aug 2008) Log Message: ----------- set fixed requires for Pylons, WebHelpers, ...;\nTestCase works even if svn swig binding not exists; Modified Paths: -------------- branches/0.2-pylons_0.9.6.2/MANIFEST.in branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info/requires.txt branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po branches/0.2-pylons_0.9.6.2/pysvnmanager/model/svnauthz.py branches/0.2-pylons_0.9.6.2/pysvnmanager/tests/test_repos.py branches/0.2-pylons_0.9.6.2/setup.py Property Changed: ---------------- branches/0.2-pylons_0.9.6.2/ branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info/ branches/0.2-pylons_0.9.6.2/pysvnmanager/ branches/0.2-pylons_0.9.6.2/pysvnmanager/hooks/init/__init__.py branches/0.2-pylons_0.9.6.2/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po Property changes on: branches/0.2-pylons_0.9.6.2 ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/0.2-pylons_0.9.6.2/MANIFEST.in =================================================================== --- branches/0.2-pylons_0.9.6.2/MANIFEST.in 2008-08-30 09:23:15 UTC (rev 53) +++ branches/0.2-pylons_0.9.6.2/MANIFEST.in 2008-08-30 09:29:41 UTC (rev 54) @@ -1,4 +1,6 @@ recursive-include pysvnmanager/public * recursive-include pysvnmanager/templates * -recursive-include pysvnmanager/config * +recursive-include pysvnmanager/config *.py *.in recursive-include pysvnmanager/i18n * +recursive-include pysvnmanager/hooks *.py +recursive-include pysvnmanager/hooks/init/hook* * Property changes on: branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info/requires.txt =================================================================== --- branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info/requires.txt 2008-08-30 09:23:15 UTC (rev 53) +++ branches/0.2-pylons_0.9.6.2/pySvnManager.egg-info/requires.txt 2008-08-30 09:29:41 UTC (rev 54) @@ -1,2 +1,7 @@ -Pylons>=0.9.6.2 -docutils \ No newline at end of file +Pylons==0.9.6.2 +docutils +Babel +Mako==0.1.8 +WebHelpers==0.3.2 +Routes==1.7.3 +Beaker>=0.8.1 \ No newline at end of file Property changes on: branches/0.2-pylons_0.9.6.2/pysvnmanager ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:23:15 UTC (rev 53) +++ branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:29:41 UTC (rev 54) @@ -9,35 +9,35 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-28 19:02+0800\n" +"PO-Revision-Date: 2008-08-30 13:16+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.2\n" +"Generated-By: Babel 0.9.4\n" -#: pysvnmanager/controllers/authz.py:43 +#: pysvnmanager/controllers/authz.py:60 #: pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:44 +#: pysvnmanager/controllers/authz.py:61 #: pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:45 +#: pysvnmanager/controllers/authz.py:62 #: pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 +#: pysvnmanager/controllers/authz.py:67 pysvnmanager/controllers/role.py:67 +#: pysvnmanager/controllers/role.py:87 #: pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 @@ -47,8 +47,8 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/authz.py:70 pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/role.py:89 #: pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 @@ -58,9 +58,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 -#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 -#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:85 pysvnmanager/controllers/authz.py:116 +#: pysvnmanager/controllers/check.py:106 pysvnmanager/controllers/repos.py:57 +#: pysvnmanager/controllers/repos.py:76 pysvnmanager/controllers/role.py:60 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -68,231 +68,231 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:160 +#: pysvnmanager/controllers/authz.py:177 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:173 +#: pysvnmanager/controllers/authz.py:190 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:181 +#: pysvnmanager/controllers/authz.py:198 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:187 +#: pysvnmanager/controllers/authz.py:204 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:212 +#: pysvnmanager/controllers/authz.py:229 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:69 +#: pysvnmanager/controllers/check.py:86 #: pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" -#: pysvnmanager/controllers/logs.py:50 +#: pysvnmanager/controllers/logs.py:68 msgid "Rev" msgstr "" -#: pysvnmanager/controllers/logs.py:51 +#: pysvnmanager/controllers/logs.py:69 msgid "Who" msgstr "" -#: pysvnmanager/controllers/logs.py:52 +#: pysvnmanager/controllers/logs.py:70 msgid "When" msgstr "" -#: pysvnmanager/controllers/logs.py:53 +#: pysvnmanager/controllers/logs.py:71 msgid "Why" msgstr "" -#: pysvnmanager/controllers/logs.py:54 +#: pysvnmanager/controllers/logs.py:72 msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:97 +#: pysvnmanager/controllers/logs.py:115 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:133 +#: pysvnmanager/controllers/logs.py:151 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:152 +#: pysvnmanager/controllers/logs.py:170 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:161 +#: pysvnmanager/controllers/logs.py:179 #, python-format msgid "Rollback failed: %s" msgstr "" -#: pysvnmanager/controllers/repos.py:74 +#: pysvnmanager/controllers/repos.py:91 msgid "Installed hooks:" msgstr "" -#: pysvnmanager/controllers/repos.py:80 +#: pysvnmanager/controllers/repos.py:97 msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/controllers/repos.py:98 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:314 +#: pysvnmanager/controllers/repos.py:99 +#: pysvnmanager/hooks/plugins/__init__.py:330 msgid "Type" msgstr "" -#: pysvnmanager/controllers/repos.py:96 +#: pysvnmanager/controllers/repos.py:113 msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:136 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:122 +#: pysvnmanager/controllers/repos.py:139 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:160 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:163 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:149 +#: pysvnmanager/controllers/repos.py:166 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:175 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:161 +#: pysvnmanager/controllers/repos.py:178 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:191 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:177 +#: pysvnmanager/controllers/repos.py:194 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/role.py:103 +#: pysvnmanager/controllers/role.py:120 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:123 +#: pysvnmanager/controllers/role.py:140 #, python-format msgid "User %(user)s delete group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:145 +#: pysvnmanager/controllers/role.py:162 #, python-format msgid "User %(user)s changed alias: %(alias)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:165 +#: pysvnmanager/controllers/role.py:182 #, python-format msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:34 +#: pysvnmanager/controllers/security.py:52 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:45 +#: pysvnmanager/controllers/security.py:63 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:53 +#: pysvnmanager/controllers/security.py:71 #, python-format msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:26 msgid "Allow revprop change" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:32 msgid "Allow user change commit-log or other rev-properties." msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:35 msgid "" "Commit-log is the only rev-prop we allow to change. Because the changes " "of rev-prop can not be reverted back, administrator must setup email " "notification to record this irreversible action." msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:26 msgid "Mantis bugtracking integration" msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:32 msgid "" "Integration Subversion with Mantis bugtracking. If commit-log has proper " "format (contains bugid), it will change bug status and append commint-log" " and code differ as comment of bug status change." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:26 msgid "Subversion client version check (>1.5.0)" msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:32 msgid "Check subversion client version. if version below 1.5.0, checkin denied." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:35 msgid "" "SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " "automated merge tracking!" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:26 msgid "Detect case-insensitive filename clashes" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:32 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:35 msgid "" "Subversion services may host on a filename case-sensitive OS,\n" "while client **may not** (Windows is case-insensitive). This may cause " @@ -304,83 +304,83 @@ " are detected.\n" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:27 msgid "Check commit log message" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:33 msgid "User must provide commit-log message when checkin." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 -#: pysvnmanager/hooks/plugins/EmailNotify.py:73 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:66 +#: pysvnmanager/hooks/plugins/EmailNotify.py:89 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:65 msgid "Current configuration" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:68 msgid "Commit log check is enabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:70 msgid "Commit log check is disabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:72 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:111 msgid "Minimal size of commit log: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:77 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:117 msgid "Pattern which commit log must match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:80 msgid "Pattern which commit log must **NOT** match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 -#: pysvnmanager/hooks/plugins/EmailNotify.py:97 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:99 +#: pysvnmanager/hooks/plugins/EmailNotify.py:113 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:89 msgid "Fill this form" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:103 msgid "Enable commit log check: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 -#: pysvnmanager/hooks/plugins/EmailNotify.py:104 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:106 +#: pysvnmanager/hooks/plugins/EmailNotify.py:120 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:96 msgid "Enable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 -#: pysvnmanager/hooks/plugins/EmailNotify.py:106 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:108 +#: pysvnmanager/hooks/plugins/EmailNotify.py:122 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:98 msgid "Disable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:123 msgid "Pattern which commit log must <b>NOT</b> match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:156 msgid "Commit log size must > 0." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:11 +#: pysvnmanager/hooks/plugins/EmailNotify.py:27 msgid "Send email notify for commit event" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:17 +#: pysvnmanager/hooks/plugins/EmailNotify.py:33 msgid "" "Send a notification email describing either a commit or a revprop-change " "action on a Subversion repository." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:21 +#: pysvnmanager/hooks/plugins/EmailNotify.py:37 msgid "" "\n" "You must provide proper options to commit-email.pl using the\n" @@ -406,188 +406,188 @@ "--diff n Do not include diff in message (default: y)\n" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +#: pysvnmanager/hooks/plugins/EmailNotify.py:91 msgid "Email notify enabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +#: pysvnmanager/hooks/plugins/EmailNotify.py:93 msgid "Email notify disabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +#: pysvnmanager/hooks/plugins/EmailNotify.py:95 msgid "Parameters: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +#: pysvnmanager/hooks/plugins/EmailNotify.py:117 msgid "Enable email notify." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:109 +#: pysvnmanager/hooks/plugins/EmailNotify.py:125 msgid "Input email notify configurations: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:139 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 +#: pysvnmanager/hooks/plugins/EmailNotify.py:155 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:131 msgid "Wrong configuration." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:26 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:32 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:26 msgid "Subversion readonly mirror" msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:32 msgid "" "This subversion repository is a svnsync readonly mirror. Nobody can " "checkin, except the svnsync admin user." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:36 msgid "" "Commit to the remote svn server, this repository is a readonly svn " "mirror.It is the svnsync admin's duty to synchronize svnsync server and " "mirror." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:67 msgid "Readonly mirror enabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:69 msgid "Readonly mirror disabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:71 msgid "Admin user: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:93 msgid "Enable readonly mirror: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:101 msgid "Svnsync administrator: " msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:95 +#: pysvnmanager/hooks/plugins/__init__.py:111 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:152 +#: pysvnmanager/hooks/plugins/__init__.py:168 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:182 -#: pysvnmanager/hooks/plugins/__init__.py:209 -#: pysvnmanager/hooks/plugins/__init__.py:215 -#: pysvnmanager/hooks/plugins/__init__.py:234 -#: pysvnmanager/hooks/plugins/__init__.py:332 -#: pysvnmanager/hooks/plugins/__init__.py:339 +#: pysvnmanager/hooks/plugins/__init__.py:198 +#: pysvnmanager/hooks/plugins/__init__.py:225 +#: pysvnmanager/hooks/plugins/__init__.py:231 +#: pysvnmanager/hooks/plugins/__init__.py:250 #: pysvnmanager/hooks/plugins/__init__.py:348 +#: pysvnmanager/hooks/plugins/__init__.py:355 +#: pysvnmanager/hooks/plugins/__init__.py:364 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:313 +#: pysvnmanager/hooks/plugins/__init__.py:329 msgid "Name" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:315 +#: pysvnmanager/hooks/plugins/__init__.py:331 msgid "Description" msgstr "" -#: pysvnmanager/model/repos.py:39 +#: pysvnmanager/model/repos.py:55 #, python-format msgid "Repos root does not exist: %s" msgstr "" -#: pysvnmanager/model/repos.py:68 +#: pysvnmanager/model/repos.py:84 #, python-format msgid "Repos %s already exists." msgstr "" -#: pysvnmanager/model/repos.py:139 +#: pysvnmanager/model/repos.py:166 #, python-format msgid "Repos %s is not a blank repository." msgstr "" -#: pysvnmanager/model/svnauthz.py:61 +#: pysvnmanager/model/svnauthz.py:77 msgid "Name is not given." msgstr "" -#: pysvnmanager/model/svnauthz.py:63 +#: pysvnmanager/model/svnauthz.py:79 msgid "Name is not string." msgstr "" -#: pysvnmanager/model/svnauthz.py:67 +#: pysvnmanager/model/svnauthz.py:83 #, python-format msgid "Name (%s) contains invalid characters." msgstr "" -#: pysvnmanager/model/svnauthz.py:475 +#: pysvnmanager/model/svnauthz.py:491 #, python-format msgid "Recursive group membership for %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:569 +#: pysvnmanager/model/svnauthz.py:585 #, python-format msgid "Not a valid username: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:686 +#: pysvnmanager/model/svnauthz.py:702 #, python-format msgid "Group %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1232 +#: pysvnmanager/model/svnauthz.py:1248 msgid "Update failed! You are working on a out-of-date revision." msgstr "" -#: pysvnmanager/model/svnauthz.py:1486 pysvnmanager/model/svnauthz.py:1493 -#: pysvnmanager/model/svnauthz.py:1497 +#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 +#: pysvnmanager/model/svnauthz.py:1513 #, python-format msgid "Unknown rule format: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1511 +#: pysvnmanager/model/svnauthz.py:1527 #, python-format msgid "No module exist for %s:%s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1621 +#: pysvnmanager/model/svnauthz.py:1637 #, python-format msgid "Alias %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1633 +#: pysvnmanager/model/svnauthz.py:1649 #, python-format msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1769 +#: pysvnmanager/model/svnauthz.py:1785 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1771 +#: pysvnmanager/model/svnauthz.py:1787 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1773 +#: pysvnmanager/model/svnauthz.py:1789 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1813 +#: pysvnmanager/model/svnauthz.py:1829 #, python-format msgid "" "\n" @@ -599,7 +599,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1832 +#: pysvnmanager/model/svnauthz.py:1848 #, python-format msgid "" "\n" @@ -981,15 +981,3 @@ msgid "User name:" msgstr "" -#~ msgid "" -#~ "Subversion services may host on a filename case-sensitive OS,\n" -#~ "while client **may not** (Windows is " -#~ "case-insensitive). This may cause " -#~ "'clash'.\n" -#~ " \n" -#~ "- Detects new paths that 'clash' with existing, or other new, paths.\n" -#~ "- Ignores existings paths that already 'clash'\n" -#~ "- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" -#~ " are detected.\n" -#~ msgstr "" - Property changes on: branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot 2008-08-30 09:23:15 UTC (rev 53) +++ branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot 2008-08-30 09:29:41 UTC (rev 54) @@ -6,34 +6,34 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pySvnManager 0.2.0\n" +"Project-Id-Version: pySvnManager 0.2.1\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-28 19:02+0800\n" +"POT-Creation-Date: 2008-08-30 13:16+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.2\n" +"Generated-By: Babel 0.9.4\n" -#: pysvnmanager/controllers/authz.py:43 pysvnmanager/templates/authz/index.mako:152 +#: pysvnmanager/controllers/authz.py:60 pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:44 pysvnmanager/templates/authz/index.mako:154 +#: pysvnmanager/controllers/authz.py:61 pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:45 pysvnmanager/templates/authz/index.mako:156 +#: pysvnmanager/controllers/authz.py:62 pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 pysvnmanager/templates/authz/index.mako:148 +#: pysvnmanager/controllers/authz.py:67 pysvnmanager/controllers/role.py:67 +#: pysvnmanager/controllers/role.py:87 pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 #: pysvnmanager/templates/role/index.mako:37 @@ -42,8 +42,8 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 pysvnmanager/templates/authz/index.mako:150 +#: pysvnmanager/controllers/authz.py:70 pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/role.py:89 pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 #: pysvnmanager/templates/role/index.mako:42 @@ -52,9 +52,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 -#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 -#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:85 pysvnmanager/controllers/authz.py:116 +#: pysvnmanager/controllers/check.py:106 pysvnmanager/controllers/repos.py:57 +#: pysvnmanager/controllers/repos.py:76 pysvnmanager/controllers/role.py:60 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -62,229 +62,229 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:160 +#: pysvnmanager/controllers/authz.py:177 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:173 +#: pysvnmanager/controllers/authz.py:190 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:181 +#: pysvnmanager/controllers/authz.py:198 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:187 +#: pysvnmanager/controllers/authz.py:204 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:212 +#: pysvnmanager/controllers/authz.py:229 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:69 pysvnmanager/templates/auth_failed.mako:3 +#: pysvnmanager/controllers/check.py:86 pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" -#: pysvnmanager/controllers/logs.py:50 +#: pysvnmanager/controllers/logs.py:68 msgid "Rev" msgstr "" -#: pysvnmanager/controllers/logs.py:51 +#: pysvnmanager/controllers/logs.py:69 msgid "Who" msgstr "" -#: pysvnmanager/controllers/logs.py:52 +#: pysvnmanager/controllers/logs.py:70 msgid "When" msgstr "" -#: pysvnmanager/controllers/logs.py:53 +#: pysvnmanager/controllers/logs.py:71 msgid "Why" msgstr "" -#: pysvnmanager/controllers/logs.py:54 +#: pysvnmanager/controllers/logs.py:72 msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:97 +#: pysvnmanager/controllers/logs.py:115 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:133 +#: pysvnmanager/controllers/logs.py:151 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:152 +#: pysvnmanager/controllers/logs.py:170 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:161 +#: pysvnmanager/controllers/logs.py:179 #, python-format msgid "Rollback failed: %s" msgstr "" -#: pysvnmanager/controllers/repos.py:74 +#: pysvnmanager/controllers/repos.py:91 msgid "Installed hooks:" msgstr "" -#: pysvnmanager/controllers/repos.py:80 +#: pysvnmanager/controllers/repos.py:97 msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/controllers/repos.py:98 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:314 +#: pysvnmanager/controllers/repos.py:99 pysvnmanager/hooks/plugins/__init__.py:330 msgid "Type" msgstr "" -#: pysvnmanager/controllers/repos.py:96 +#: pysvnmanager/controllers/repos.py:113 msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:136 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:122 +#: pysvnmanager/controllers/repos.py:139 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:160 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:163 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:149 +#: pysvnmanager/controllers/repos.py:166 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:175 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:161 +#: pysvnmanager/controllers/repos.py:178 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:191 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:177 +#: pysvnmanager/controllers/repos.py:194 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/role.py:103 +#: pysvnmanager/controllers/role.py:120 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:123 +#: pysvnmanager/controllers/role.py:140 #, python-format msgid "User %(user)s delete group: %(grp)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:145 +#: pysvnmanager/controllers/role.py:162 #, python-format msgid "User %(user)s changed alias: %(alias)s. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/role.py:165 +#: pysvnmanager/controllers/role.py:182 #, python-format msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "" -#: pysvnmanager/controllers/security.py:34 +#: pysvnmanager/controllers/security.py:52 #, python-format msgid "User %s logged in" msgstr "" -#: pysvnmanager/controllers/security.py:45 +#: pysvnmanager/controllers/security.py:63 #, python-format msgid "Login failed for user: %s" msgstr "" -#: pysvnmanager/controllers/security.py:53 +#: pysvnmanager/controllers/security.py:71 #, python-format msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:26 msgid "Allow revprop change" msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:32 msgid "Allow user change commit-log or other rev-properties." msgstr "" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:35 msgid "" "Commit-log is the only rev-prop we allow to change. Because the changes of " "rev-prop can not be reverted back, administrator must setup email " "notification to record this irreversible action." msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:26 msgid "Mantis bugtracking integration" msgstr "" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:32 msgid "" "Integration Subversion with Mantis bugtracking. If commit-log has proper " "format (contains bugid), it will change bug status and append commint-log and" " code differ as comment of bug status change." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:26 msgid "Subversion client version check (>1.5.0)" msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:32 msgid "Check subversion client version. if version below 1.5.0, checkin denied." msgstr "" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:35 msgid "" "SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " "automated merge tracking!" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:26 msgid "Detect case-insensitive filename clashes" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:32 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:35 msgid "" "Subversion services may host on a filename case-sensitive OS,\n" "while client **may not** (Windows is case-insensitive). This may cause " @@ -296,83 +296,83 @@ " are detected.\n" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:27 msgid "Check commit log message" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:33 msgid "User must provide commit-log message when checkin." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 -#: pysvnmanager/hooks/plugins/EmailNotify.py:73 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:66 +#: pysvnmanager/hooks/plugins/EmailNotify.py:89 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:65 msgid "Current configuration" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:68 msgid "Commit log check is enabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:70 msgid "Commit log check is disabled." msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:72 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:111 msgid "Minimal size of commit log: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:77 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:117 msgid "Pattern which commit log must match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:80 msgid "Pattern which commit log must **NOT** match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 -#: pysvnmanager/hooks/plugins/EmailNotify.py:97 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:99 +#: pysvnmanager/hooks/plugins/EmailNotify.py:113 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:89 msgid "Fill this form" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:103 msgid "Enable commit log check: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 -#: pysvnmanager/hooks/plugins/EmailNotify.py:104 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:106 +#: pysvnmanager/hooks/plugins/EmailNotify.py:120 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:96 msgid "Enable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 -#: pysvnmanager/hooks/plugins/EmailNotify.py:106 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:108 +#: pysvnmanager/hooks/plugins/EmailNotify.py:122 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:98 msgid "Disable" msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:123 msgid "Pattern which commit log must <b>NOT</b> match against: " msgstr "" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:156 msgid "Commit log size must > 0." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:11 +#: pysvnmanager/hooks/plugins/EmailNotify.py:27 msgid "Send email notify for commit event" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:17 +#: pysvnmanager/hooks/plugins/EmailNotify.py:33 msgid "" "Send a notification email describing either a commit or a revprop-change " "action on a Subversion repository." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:21 +#: pysvnmanager/hooks/plugins/EmailNotify.py:37 msgid "" "\n" "You must provide proper options to commit-email.pl using the\n" @@ -398,187 +398,187 @@ "--diff n Do not include diff in message (default: y)\n" msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +#: pysvnmanager/hooks/plugins/EmailNotify.py:91 msgid "Email notify enabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +#: pysvnmanager/hooks/plugins/EmailNotify.py:93 msgid "Email notify disabled." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +#: pysvnmanager/hooks/plugins/EmailNotify.py:95 msgid "Parameters: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +#: pysvnmanager/hooks/plugins/EmailNotify.py:117 msgid "Enable email notify." msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:109 +#: pysvnmanager/hooks/plugins/EmailNotify.py:125 msgid "Input email notify configurations: " msgstr "" -#: pysvnmanager/hooks/plugins/EmailNotify.py:139 -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 +#: pysvnmanager/hooks/plugins/EmailNotify.py:155 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:131 msgid "Wrong configuration." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:26 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:32 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:26 msgid "Subversion readonly mirror" msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:32 msgid "" "This subversion repository is a svnsync readonly mirror. Nobody can checkin, " "except the svnsync admin user." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:36 msgid "" "Commit to the remote svn server, this repository is a readonly svn mirror.It " "is the svnsync admin's duty to synchronize svnsync server and mirror." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:67 msgid "Readonly mirror enabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:69 msgid "Readonly mirror disabled." msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:71 msgid "Admin user: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:93 msgid "Enable readonly mirror: " msgstr "" -#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 +#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:101 msgid "Svnsync administrator: " msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:95 +#: pysvnmanager/hooks/plugins/__init__.py:111 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:152 +#: pysvnmanager/hooks/plugins/__init__.py:168 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:182 -#: pysvnmanager/hooks/plugins/__init__.py:209 -#: pysvnmanager/hooks/plugins/__init__.py:215 -#: pysvnmanager/hooks/plugins/__init__.py:234 -#: pysvnmanager/hooks/plugins/__init__.py:332 -#: pysvnmanager/hooks/plugins/__init__.py:339 +#: pysvnmanager/hooks/plugins/__init__.py:198 +#: pysvnmanager/hooks/plugins/__init__.py:225 +#: pysvnmanager/hooks/plugins/__init__.py:231 +#: pysvnmanager/hooks/plugins/__init__.py:250 #: pysvnmanager/hooks/plugins/__init__.py:348 +#: pysvnmanager/hooks/plugins/__init__.py:355 +#: pysvnmanager/hooks/plugins/__init__.py:364 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:313 +#: pysvnmanager/hooks/plugins/__init__.py:329 msgid "Name" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:315 +#: pysvnmanager/hooks/plugins/__init__.py:331 msgid "Description" msgstr "" -#: pysvnmanager/model/repos.py:39 +#: pysvnmanager/model/repos.py:55 #, python-format msgid "Repos root does not exist: %s" msgstr "" -#: pysvnmanager/model/repos.py:68 +#: pysvnmanager/model/repos.py:84 #, python-format msgid "Repos %s already exists." msgstr "" -#: pysvnmanager/model/repos.py:139 +#: pysvnmanager/model/repos.py:166 #, python-format msgid "Repos %s is not a blank repository." msgstr "" -#: pysvnmanager/model/svnauthz.py:61 +#: pysvnmanager/model/svnauthz.py:77 msgid "Name is not given." msgstr "" -#: pysvnmanager/model/svnauthz.py:63 +#: pysvnmanager/model/svnauthz.py:79 msgid "Name is not string." msgstr "" -#: pysvnmanager/model/svnauthz.py:67 +#: pysvnmanager/model/svnauthz.py:83 #, python-format msgid "Name (%s) contains invalid characters." msgstr "" -#: pysvnmanager/model/svnauthz.py:475 +#: pysvnmanager/model/svnauthz.py:491 #, python-format msgid "Recursive group membership for %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:569 +#: pysvnmanager/model/svnauthz.py:585 #, python-format msgid "Not a valid username: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:686 +#: pysvnmanager/model/svnauthz.py:702 #, python-format msgid "Group %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1232 +#: pysvnmanager/model/svnauthz.py:1248 msgid "Update failed! You are working on a out-of-date revision." msgstr "" -#: pysvnmanager/model/svnauthz.py:1486 pysvnmanager/model/svnauthz.py:1493 -#: pysvnmanager/model/svnauthz.py:1497 +#: pysvnmanager/model/svnauthz.py:1502 pysvnmanager/model/svnauthz.py:1509 +#: pysvnmanager/model/svnauthz.py:1513 #, python-format msgid "Unknown rule format: %s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1511 +#: pysvnmanager/model/svnauthz.py:1527 #, python-format msgid "No module exist for %s:%s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1621 +#: pysvnmanager/model/svnauthz.py:1637 #, python-format msgid "Alias %s is referenced by group %s." msgstr "" -#: pysvnmanager/model/svnauthz.py:1633 +#: pysvnmanager/model/svnauthz.py:1649 #, python-format msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1769 +#: pysvnmanager/model/svnauthz.py:1785 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1771 +#: pysvnmanager/model/svnauthz.py:1787 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1773 +#: pysvnmanager/model/svnauthz.py:1789 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1813 +#: pysvnmanager/model/svnauthz.py:1829 #, python-format msgid "" "\n" @@ -590,7 +590,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1832 +#: pysvnmanager/model/svnauthz.py:1848 #, python-format msgid "" "\n" Property changes on: branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/pysvnmanager.pot ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po =================================================================== --- branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:23:15 UTC (rev 53) +++ branches/0.2-pylons_0.9.6.2/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-30 09:29:41 UTC (rev 54) @@ -8,39 +8,38 @@ # Jiang Xin <wor...@gm...>, 2008. msgid "" msgstr "" -"Project-Id-Version: pysvnmanager\n" +"Project-Id-Version: pysvnmanager\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-28 19:04+0800\n" +"PO-Revision-Date: 2008-08-30 13:16+0800\n" "Last-Translator: Jiang Xin <wor...@gm...>\n" -"Language-Team: <zh...@li...>\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" +"Language-Team: <zh...@li...>\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.2\n" -"X-Generator: KBabel 1.11.4\n" +"Generated-By: Babel 0.9.4\n" -#: pysvnmanager/controllers/authz.py:43 +#: pysvnmanager/controllers/authz.py:60 #: pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "所有用户(含匿名)" -#: pysvnmanager/controllers/authz.py:44 +#: pysvnmanager/controllers/authz.py:61 #: pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "注册用户" -#: pysvnmanager/controllers/authz.py:45 +#: pysvnmanager/controllers/authz.py:62 #: pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "匿名用户" -#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 +#: pysvnmanager/controllers/authz.py:67 pysvnmanager/controllers/role.py:67 +#: pysvnmanager/controllers/role.py:87 #: pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 @@ -50,8 +49,8 @@ msgid "Group:" msgstr "团队:" -#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/authz.py:70 pysvnmanager/controllers/role.py:72 +#: pysvnmanager/controllers/role.py:89 #: pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 @@ -61,9 +60,9 @@ msgid "Alias:" msgstr "别名:" -#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 -#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 -#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:85 pysvnmanager/controllers/authz.py:116 +#: pysvnmanager/controllers/check.py:106 pysvnmanager/controllers/repos.py:57 +#: pysvnmanager/controllers/repos.py:76 pysvnmanager/controllers/role.py:60 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -71,95 +70,95 @@ msgid "Please choose..." msgstr "请选择..." -#: pysvnmanager/controllers/authz.py:160 +#: pysvnmanager/controllers/authz.py:177 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "用户 %(user)s 修改了授权策略。(rev:%(rev)s)" -#: pysvnmanager/controllers/authz.py:173 +#: pysvnmanager/controllers/authz.py:190 #, python-format msgid "Repository %s not exist." msgstr "版本库 %s 不存在。" -#: pysvnmanager/controllers/authz.py:181 +#: pysvnmanager/controllers/authz.py:198 #, python-format msgid "Module %s not exist." msgstr "模组 %s 不存在。" -#: pysvnmanager/controllers/authz.py:187 +#: pysvnmanager/controllers/authz.py:204 msgid "You can not delete yourself from admin list." msgstr "您不能将自己从管理员列表中删除。" -#: pysvnmanager/controllers/authz.py:212 +#: pysvnmanager/controllers/authz.py:229 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "用户 %(user)s 删除了授权策略。(rev:%(rev)s)" -#: pysvnmanager/controllers/check.py:69 +#: pysvnmanager/controllers/check.py:86 #: pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "没有权限。" -#: pysvnmanager/controllers/logs.py:50 +#: pysvnmanager/controllers/logs.py:68 msgid "Rev" msgstr "版本" -#: pysvnmanager/controllers/logs.py:51 +#: pysvnmanager/controllers/logs.py:69 msgid "Who" msgstr "管理员" -#: pysvnmanager/controllers/logs.py:52 +#: pysvnmanager/controllers/logs.py:70 msgid "When" msgstr "时间" -#: pysvnmanager/controllers/logs.py:53 +#: pysvnmanager/controllers/logs.py:71 msgid "Why" msgstr "说明" -#: pysvnmanager/controllers/logs.py:54 +#: pysvnmanager/controllers/logs.py:72 msgid "Compare" msgstr "比较" -#: pysvnmanager/controllers/logs.py:97 +#: pysvnmanager/controllers/logs.py:115 msgid "Page: " msgstr "页面: " -#: pysvnmanager/controllers/logs.py:133 +#: pysvnmanager/controllers/logs.py:151 msgid "Compares between" msgstr "版本间比较" -#: pysvnmanager/controllers/logs.py:152 +#: pysvnmanager/controllers/logs.py:170 #, python-format msgid "Rollback successfully to revision: %s" msgstr "成功回滚至版本: %s" -#: pysvnmanager/controllers/logs.py:161 +#: pysvnmanager/controllers/logs.py:179 #, python-format msgid "Rollback failed: %s" msgstr "回滚失败: %s" -#: pysvnmanager/controllers/repos.py:74 +#: pysvnmanager/controllers/repos.py:91 msgid "Installed hooks:" msgstr "已安装插件:" -#: pysvnmanager/controllers/repos.py:80 +#: pysvnmanager/controllers/repos.py:97 msgid "Id" msgstr "Id" -#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/controllers/repos.py:98 msgid "Plugin name" msgstr "插件名称" -#: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:314 +#: pysvnmanager/controllers/repos.py:99 +#: pysvnmanager/hooks/plugins/__init__.py:330 msgid "Type" msgstr "类型" -#: pysvnmanager/controllers/repos.py:96 +#: pysvnmanager/controllers/repos.py:113 msgid "Remove selected hooks" msgstr "删除选择的插件" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:136 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -168,12 +167,12 @@ "启用版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:122 +#: pysvnmanager/controllers/repos.py:139 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功启用版本库'%(repos)s'的插件'%(plugin)s'。 " -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:160 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -182,17 +181,17 @@ "删除版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:163 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'的插件'%(plugin)s'。" -#: pysvnmanager/controllers/repos.py:149 +#: pysvnmanager/controllers/repos.py:166 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "未删除版本库'%(repos)s'的插件。" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:175 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" @@ -201,12 +200,12 @@ "创建版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:161 +#: pysvnmanager/controllers/repos.py:178 #, python-format msgid "Create repository '%(repos)s' success." msgstr "成功创建版本库'%(repos)s'。" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:191 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" @@ -215,66 +214,66 @@ "删除版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:177 +#: pysvnmanager/controllers/repos.py:194 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'。" -#: pysvnmanager/controllers/role.py:103 +#: pysvnmanager/controllers/role.py:120 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" msgstr "用户 %(user)s 修改用户组: %(grp)s。(rev:%(rev)s)" -#: pysvnmanager/controllers/role.py:123 +#: pysvnmanager/controllers/role.py:140 #, python-format msgid "User %(user)s delete group: %(grp)s. (rev:%(rev)s)" msgstr "用户 %(user)s 删除用户组: %(grp)s。(rev:%(rev)s)" -#: pysvnmanager/controllers/role.py:145 +#: pysvnmanager/controllers/role.py:162 #, python-format msgid "User %(user)s changed alias: %(alias)s. (rev:%(rev)s)" msgstr "用户 %(user)s 修改别名: %(alias)s。(rev:%(rev)s)" -#: pysvnmanager/controllers/role.py:165 +#: pysvnmanager/controllers/role.py:182 #, python-format msgid "User %(user)s delete alias: %(alias)s. (rev:%(rev)s,%(msg)s)" msgstr "用户 %(user)s 删除别名: %(alias)s。(rev:%(rev)s,%(msg)s)" -#: pysvnmanager/controllers/security.py:34 +#: pysvnmanager/controllers/security.py:52 #, python-format msgid "User %s logged in" msgstr "用户 %s 登录" -#: pysvnmanager/controllers/security.py:45 +#: pysvnmanager/controllers/security.py:63 #, python-format msgid "Login failed for user: %s" msgstr "以 %s 身份登录失败" -#: pysvnmanager/controllers/security.py:53 +#: pysvnmanager/controllers/security.py:71 #, python-format msgid "User %s logged out" msgstr "用户 %s 登出" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:26 msgid "Allow revprop change" msgstr "允许修改版本属性" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:32 msgid "Allow user change commit-log or other rev-properties." msgstr "允许用户修改提交说明等版本属性" -#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 +#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:35 msgid "" "Commit-log is the only rev-prop we allow to change. Because the changes " "of rev-prop can not be reverted back, administrator must setup email " "notification to record this irreversible action." msgstr "提交说明是我们唯一允许修改的版本属性。因为版本属性本身未被版本控制,修改版本属性是不可恢复的操作,所以管理员在启用本功能前,应该考虑设置变更通知以记录修改事件。" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:26 msgid "Mantis bugtracking integration" msgstr "整合 Mantis 缺陷跟踪系统" -#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:32 msgid "" "Integration Subversion with Mantis bugtracking. If commit-log has proper " "format (contains bugid), it will change bug status and append commint-log" @@ -283,29 +282,29 @@ "与 Mantis 缺陷跟踪系统整合。当提交日志符合特定的规范(包含 bugid),将会触发 Mantis 缺陷跟踪系统,将 bug " "的状态修改为已修改,并将commit-log 以及代码变更添加到说明中。" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:26 msgid "Subversion client version check (>1.5.0)" msgstr "Subversion 客户端版本检查 (>1.5.0)" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:32 msgid "Check subversion client version. if version below 1.5.0, checkin denied." msgstr "检查 subversion 客户端版本。如果版本号小于 1.5.0,禁止客户端提交。" -#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 +#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:35 msgid "" "SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " "automated merge tracking!" msgstr "小于 1.5.0 版本的 SVN 客户端不能正确处理 mergeinfo。会破坏自动的合并追踪功能!" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:26 msgid "Detect case-insensitive filename clashes" msgstr "检查大小写引起的文件名冲突" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:32 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "在 pre-commit 钩子中执行,检查文件名大小写引起的文件名冲突。" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:35 msgid "" "Subversion services may host on a filename case-sensitive OS,\n" "while client **may not** (Windows is case-insensitive). This may cause " @@ -323,83 +322,83 @@ "- 忽略已经存在的“冲突”的路径\n" "- 如果发现冲突,拒绝提交,并报错。\n" -#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:27 msgid "Check c... [truncated message content] |
From: <ji...@us...> - 2008-08-30 09:23:05
|
Revision: 53 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=53&view=rev Author: jiangx Date: 2008-08-30 09:23:15 +0000 (Sat, 30 Aug 2008) Log Message: ----------- Branch for pylons 0.9.6.2, which not work for pylons 0.9.7.2, WebHelpers 0.6.1, Mako 0.2.2, ... Added Paths: ----------- branches/0.2-pylons_0.9.6.2/ tags/0.2.1/ Property changes on: branches/0.2-pylons_0.9.6.2 ___________________________________________________________________ Added: svn:ignore + build data dist Added: svn:mergeinfo + Property changes on: tags/0.2.1 ___________________________________________________________________ Added: svn:ignore + build data dist Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-29 07:44:04
|
Revision: 52 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=52&view=rev Author: jiangx Date: 2008-08-29 07:44:15 +0000 (Fri, 29 Aug 2008) Log Message: ----------- (r96) add pylons to prerequisite. Modified Paths: -------------- trunk/README.txt Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-08-29 07:32:01 UTC (rev 51) +++ trunk/README.txt 2008-08-29 07:44:15 UTC (rev 52) @@ -7,6 +7,9 @@ You need the following packages. Only part of them (docutils) will be installed automatically during easy_install. +- pylons: + A must have package. + - rcs: We use ci/co for backup/restore SVN authz files. @@ -16,6 +19,8 @@ - python-ldap: If pySvnManager is auth agains ldap, you need it. +- easy_install: + Optional. Useful tools to manage python egg packages. Installation and Setup ====================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-29 07:31:50
|
Revision: 51 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=51&view=rev Author: jiangx Date: 2008-08-29 07:32:01 +0000 (Fri, 29 Aug 2008) Log Message: ----------- (r95) add prerequisite. Modified Paths: -------------- trunk/README.txt Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-08-29 07:25:05 UTC (rev 50) +++ trunk/README.txt 2008-08-29 07:32:01 UTC (rev 51) @@ -1,6 +1,22 @@ This file is for you to describe the pysvnmanager application. Typically you would include information such as the information below: +Prerequisite +============ + +You need the following packages. Only part of them (docutils) +will be installed automatically during easy_install. + +- rcs: + We use ci/co for backup/restore SVN authz files. + +- python docutils: + We docutils to transform reST text to html. + +- python-ldap: + If pySvnManager is auth agains ldap, you need it. + + Installation and Setup ====================== @@ -18,6 +34,8 @@ Then you are ready to go. + paster serve --reload config.ini + Installation from Source code ============================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-29 07:25:01
|
Revision: 50 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=50&view=rev Author: jiangx Date: 2008-08-29 07:25:05 +0000 (Fri, 29 Aug 2008) Log Message: ----------- add copyright header Modified Paths: -------------- trunk/pysvnmanager/controllers/authz.py trunk/pysvnmanager/controllers/check.py trunk/pysvnmanager/controllers/error.py trunk/pysvnmanager/controllers/logs.py trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/controllers/role.py trunk/pysvnmanager/controllers/security.py trunk/pysvnmanager/controllers/template.py trunk/pysvnmanager/hooks/init/__init__.py trunk/pysvnmanager/hooks/plugins/AllowRevpropChange.py trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py trunk/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py trunk/pysvnmanager/hooks/plugins/EmailNotify.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/lib/app_globals.py trunk/pysvnmanager/lib/base.py trunk/pysvnmanager/lib/helpers.py trunk/pysvnmanager/model/hooks.py trunk/pysvnmanager/model/rcsbackup.py trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/model/rest.py trunk/pysvnmanager/model/svnauthz.py trunk/pysvnmanager/tests/__init__.py trunk/pysvnmanager/tests/functional/test_authz.py trunk/pysvnmanager/tests/functional/test_check.py trunk/pysvnmanager/tests/functional/test_login.py trunk/pysvnmanager/tests/functional/test_logs.py trunk/pysvnmanager/tests/functional/test_repos.py trunk/pysvnmanager/tests/functional/test_role.py trunk/pysvnmanager/tests/test_models.py trunk/pysvnmanager/tests/test_rcs_backup.py trunk/pysvnmanager/tests/test_repos.py trunk/pysvnmanager/websetup.py trunk/setup.py Modified: trunk/pysvnmanager/controllers/authz.py =================================================================== --- trunk/pysvnmanager/controllers/authz.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/authz.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,21 @@ # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/check.py =================================================================== --- trunk/pysvnmanager/controllers/check.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/check.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,21 @@ # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/error.py =================================================================== --- trunk/pysvnmanager/controllers/error.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/error.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import cgi import os.path Modified: trunk/pysvnmanager/controllers/logs.py =================================================================== --- trunk/pysvnmanager/controllers/logs.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/logs.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,21 @@ # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/role.py =================================================================== --- trunk/pysvnmanager/controllers/role.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/role.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,21 @@ # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/security.py =================================================================== --- trunk/pysvnmanager/controllers/security.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/security.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + import logging from pysvnmanager.lib.base import * Modified: trunk/pysvnmanager/controllers/template.py =================================================================== --- trunk/pysvnmanager/controllers/template.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/controllers/template.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + from pysvnmanager.lib.base import * class TemplateController(BaseController): Modified: trunk/pysvnmanager/hooks/init/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/init/__init__.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/init/__init__.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. import os Modified: trunk/pysvnmanager/hooks/plugins/AllowRevpropChange.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/AllowRevpropChange.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/AllowRevpropChange.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/EmailNotify.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EmailNotify.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/EmailNotify.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.hooks.plugins import * from pysvnmanager.hooks.plugins import _ Modified: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. import ConfigParser import os Modified: trunk/pysvnmanager/lib/app_globals.py =================================================================== --- trunk/pysvnmanager/lib/app_globals.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/lib/app_globals.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + """The application's Globals object""" from pylons import config Modified: trunk/pysvnmanager/lib/base.py =================================================================== --- trunk/pysvnmanager/lib/base.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/lib/base.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + """The base Controller API Provides the BaseController class for subclassing, and other objects Modified: trunk/pysvnmanager/lib/helpers.py =================================================================== --- trunk/pysvnmanager/lib/helpers.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/lib/helpers.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + """Helper functions Consists of functions to typically be used within templates, but also Modified: trunk/pysvnmanager/model/hooks.py =================================================================== --- trunk/pysvnmanager/model/hooks.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/model/hooks.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. """Subversion repos hooks plugin. Modified: trunk/pysvnmanager/model/rcsbackup.py =================================================================== --- trunk/pysvnmanager/model/rcsbackup.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/model/rcsbackup.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from __future__ import division Modified: trunk/pysvnmanager/model/repos.py =================================================================== --- trunk/pysvnmanager/model/repos.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/model/repos.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. """Subversion repos management. Modified: trunk/pysvnmanager/model/rest.py =================================================================== --- trunk/pysvnmanager/model/rest.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/model/rest.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from docutils import core from docutils.writers.html4css1 import Writer,HTMLTranslator Modified: trunk/pysvnmanager/model/svnauthz.py =================================================================== --- trunk/pysvnmanager/model/svnauthz.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/model/svnauthz.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. """Subversion authz config file management. Modified: trunk/pysvnmanager/tests/__init__.py =================================================================== --- trunk/pysvnmanager/tests/__init__.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/__init__.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + """Pylons application test package When the test runner finds and executes tests within this directory, Modified: trunk/pysvnmanager/tests/functional/test_authz.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_authz.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_authz.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ ## -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.tests import * from pysvnmanager.controllers import authz Modified: trunk/pysvnmanager/tests/functional/test_check.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_check.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_check.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ ## -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.tests import * from pysvnmanager.controllers import check Modified: trunk/pysvnmanager/tests/functional/test_login.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_login.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_login.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ ## -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.tests import * from pylons import config Modified: trunk/pysvnmanager/tests/functional/test_logs.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_logs.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_logs.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + from pysvnmanager.tests import * class TestLogsController(TestController): Modified: trunk/pysvnmanager/tests/functional/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_repos.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_repos.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ ## -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.tests import * Modified: trunk/pysvnmanager/tests/functional/test_role.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_role.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/functional/test_role.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,4 +1,20 @@ ## -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. from pysvnmanager.tests import * from pysvnmanager.controllers import role Modified: trunk/pysvnmanager/tests/test_models.py =================================================================== --- trunk/pysvnmanager/tests/test_models.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/test_models.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. import os import sys Modified: trunk/pysvnmanager/tests/test_rcs_backup.py =================================================================== --- trunk/pysvnmanager/tests/test_rcs_backup.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/test_rcs_backup.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. import os import sys Modified: trunk/pysvnmanager/tests/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/test_repos.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/tests/test_repos.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,5 +1,21 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. import os import sys Modified: trunk/pysvnmanager/websetup.py =================================================================== --- trunk/pysvnmanager/websetup.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/pysvnmanager/websetup.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + """Setup the pySvnManager application""" import logging Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2008-08-29 02:48:06 UTC (rev 49) +++ trunk/setup.py 2008-08-29 07:25:05 UTC (rev 50) @@ -1,3 +1,21 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008 OpenSourceXpress Ltd. (http://www.ossxp.com) +# Author: Jiang Xin +# Contact: http://www.ossxp.com +# http://www.worldhello.net +# http://moinmo.in/JiangXin +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + try: from setuptools import setup, find_packages except ImportError: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-29 02:48:01
|
Revision: 49 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=49&view=rev Author: jiangx Date: 2008-08-29 02:48:06 +0000 (Fri, 29 Aug 2008) Log Message: ----------- (r93) add depends on docutils; chmod 0755 for hooks when repos initialize; Modified Paths: -------------- trunk/pySvnManager.egg-info/requires.txt trunk/pysvnmanager/model/repos.py trunk/setup.py Property Changed: ---------------- trunk/pysvnmanager/i18n/en/LC_MESSAGES/ trunk/pysvnmanager/i18n/zh/LC_MESSAGES/ Modified: trunk/pySvnManager.egg-info/requires.txt =================================================================== --- trunk/pySvnManager.egg-info/requires.txt 2008-08-28 15:58:56 UTC (rev 48) +++ trunk/pySvnManager.egg-info/requires.txt 2008-08-29 02:48:06 UTC (rev 49) @@ -1 +1,2 @@ -Pylons>=0.9.6.2 \ No newline at end of file +Pylons>=0.9.6.2 +docutils \ No newline at end of file Property changes on: trunk/pysvnmanager/i18n/en/LC_MESSAGES ___________________________________________________________________ Deleted: svn:ignore - *.mo Property changes on: trunk/pysvnmanager/i18n/zh/LC_MESSAGES ___________________________________________________________________ Deleted: svn:ignore - *.mo Modified: trunk/pysvnmanager/model/repos.py =================================================================== --- trunk/pysvnmanager/model/repos.py 2008-08-28 15:58:56 UTC (rev 48) +++ trunk/pysvnmanager/model/repos.py 2008-08-29 02:48:06 UTC (rev 49) @@ -88,13 +88,24 @@ # copy hook-scripts from matched hooks templates directory. src = hooks.init.svn_hooks_init_base + '/' + hooks.init.svn_hooks_init_dict[matched] + src = os.path.abspath(src) dest = "%(root)s/%(entry)s/hooks" % { "root": self.repos_root, "entry": repos_name} + dest = os.path.abspath(dest) - log.debug('Now copy hooks from \n\t%s to \n\t%s' % (src, dest)) import shutil - shutil.rmtree(dest) - shutil.copytree(src, dest, symlinks=True) - + if os.path.exists(dest): + assert os.path.basename(dest) == 'hooks' + shutil.rmtree(dest) + elif not os.path.exists(os.path.basename(dest)): + raise Exception("Destination repository '%s' not exist!" % os.path.basename(dest)) + for root, dirs, files in os.walk(src): + targetdir = root.replace(src, dest, 1) + os.mkdir(targetdir) + for name in files: + shutil.copy(os.path.join(root, name), os.path.join(targetdir, name)) + os.chmod(os.path.join(targetdir, name), 0755) + if '.svn' in dirs: + dirs.remove('.svn') # don't visit SVN directories def svnversion(self): cmd = 'LC_ALL=C svn --version' Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2008-08-28 15:58:56 UTC (rev 48) +++ trunk/setup.py 2008-08-29 02:48:06 UTC (rev 49) @@ -12,8 +12,8 @@ author='Jiang Xin', author_email='jia...@os...', url='https://sourceforge.net/projects/pysvnmanager', - #install_requires=["Pylons>=0.9.6.2", "python-ldap"], - install_requires=["Pylons>=0.9.6.2"], + #install_requires=["Pylons>=0.9.6.2", "docutils", "python-ldap"], + install_requires=["Pylons>=0.9.6.2", "docutils"], packages=find_packages(exclude=['ez_setup']), include_package_data=True, test_suite='nose.collector', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-28 15:58:47
|
Revision: 48 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=48&view=rev Author: jiangx Date: 2008-08-28 15:58:56 +0000 (Thu, 28 Aug 2008) Log Message: ----------- upgrade to 0.2.1; format exception message; Modified Paths: -------------- trunk/pySvnManager.egg-info/SOURCES.txt trunk/pysvnmanager/controllers/authz.py trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/controllers/role.py trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py trunk/pysvnmanager/lib/base.py trunk/pysvnmanager/websetup.py trunk/setup.py Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-28 15:58:56 UTC (rev 48) @@ -20,16 +20,11 @@ pysvnmanager/__init__.py pysvnmanager/websetup.py pysvnmanager/config/DefaultConfig.py -pysvnmanager/config/DefaultConfig.pyc pysvnmanager/config/__init__.py -pysvnmanager/config/__init__.pyc pysvnmanager/config/environment.py -pysvnmanager/config/environment.pyc pysvnmanager/config/localconfig.py.in pysvnmanager/config/middleware.py -pysvnmanager/config/middleware.pyc pysvnmanager/config/routing.py -pysvnmanager/config/routing.pyc pysvnmanager/config/svn.access.in pysvnmanager/config/svn.passwd.in pysvnmanager/controllers/__init__.py @@ -53,6 +48,28 @@ pysvnmanager/hooks/init/hook1.4/pre-revprop-change pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl pysvnmanager/hooks/init/hook1.4/start-commit +pysvnmanager/hooks/init/hook1.4/scripts/README +pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py +pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl +pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py +pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl +pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py +pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg +pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg.example +pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.pl +pysvnmanager/hooks/init/hook1.4/scripts/commit-block-joke.py +pysvnmanager/hooks/init/hook1.4/scripts/commit-email.pl +pysvnmanager/hooks/init/hook1.4/scripts/commit-email.rb +pysvnmanager/hooks/init/hook1.4/scripts/commit_log_check.py +pysvnmanager/hooks/init/hook1.4/scripts/detect-merge-conflicts.sh +pysvnmanager/hooks/init/hook1.4/scripts/log-police.py +pysvnmanager/hooks/init/hook1.4/scripts/pre-commit-check.py +pysvnmanager/hooks/init/hook1.4/scripts/pre-lock-require-needs-lock.py +pysvnmanager/hooks/init/hook1.4/scripts/svn2rss.py +pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf +pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf.example +pysvnmanager/hooks/init/hook1.4/scripts/svnperms.py +pysvnmanager/hooks/init/hook1.4/scripts/verify-po.py pysvnmanager/hooks/init/hook1.5/parse_ini.sh pysvnmanager/hooks/init/hook1.5/post-commit pysvnmanager/hooks/init/hook1.5/post-lock.tmpl @@ -63,6 +80,28 @@ pysvnmanager/hooks/init/hook1.5/pre-revprop-change pysvnmanager/hooks/init/hook1.5/pre-unlock.tmpl pysvnmanager/hooks/init/hook1.5/start-commit +pysvnmanager/hooks/init/hook1.5/scripts/README +pysvnmanager/hooks/init/hook1.5/scripts/check-authz.py +pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.pl +pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.py +pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.pl +pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.py +pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg +pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg.example +pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.pl +pysvnmanager/hooks/init/hook1.5/scripts/commit-block-joke.py +pysvnmanager/hooks/init/hook1.5/scripts/commit-email.pl +pysvnmanager/hooks/init/hook1.5/scripts/commit-email.rb +pysvnmanager/hooks/init/hook1.5/scripts/commit_log_check.py +pysvnmanager/hooks/init/hook1.5/scripts/detect-merge-conflicts.sh +pysvnmanager/hooks/init/hook1.5/scripts/log-police.py +pysvnmanager/hooks/init/hook1.5/scripts/pre-commit-check.py +pysvnmanager/hooks/init/hook1.5/scripts/pre-lock-require-needs-lock.py +pysvnmanager/hooks/init/hook1.5/scripts/svn2rss.py +pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf +pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf.example +pysvnmanager/hooks/init/hook1.5/scripts/svnperms.py +pysvnmanager/hooks/init/hook1.5/scripts/verify-po.py pysvnmanager/hooks/plugins/AllowRevpropChange.py pysvnmanager/hooks/plugins/BugtrackMantis.py pysvnmanager/hooks/plugins/CapCheckMergeInfo.py Modified: trunk/pysvnmanager/controllers/authz.py =================================================================== --- trunk/pysvnmanager/controllers/authz.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/controllers/authz.py 2008-08-28 15:58:56 UTC (rev 48) @@ -192,7 +192,7 @@ self.authz.set_rules(reposname, path, rules); self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) @@ -215,7 +215,7 @@ self.authz.del_module(reposname, path); self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-28 15:58:56 UTC (rev 48) @@ -117,7 +117,7 @@ plugin.install(d) except Exception, e: result = "<div class='error'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "plugin": pluginname, "repos":reposname, "msg": e} + "</div>" + "plugin": pluginname, "repos":reposname, "msg": except_to_unicode(e) } + "</div>" else: result = "<div class='info'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' success.") % { "plugin": pluginname, "repos":reposname} + "</div>" @@ -141,7 +141,7 @@ log.info("my delete plugin %s, %s" % (pluginname, hookobj.plugins[pluginname].name)) except Exception, e: result = "<div class='error'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "plugin": ", ".join(plugin_list), "repos":reposname, "msg": e.message} + "</div>" + "plugin": ", ".join(plugin_list), "repos":reposname, "msg": except_to_unicode(e) } + "</div>" else: result = "<div class='info'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' success.") % { "plugin": ", ".join(plugin_list), "repos":reposname} + "</div>" @@ -156,7 +156,7 @@ self.repos.create(reposname) except Exception, e: result = "<div class='error'>" + _("Create repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "repos":reposname, "msg": e.message} + "</div>" + "repos":reposname, "msg": except_to_unicode(e) } + "</div>" else: result = "<div class='info'>" + _("Create repository '%(repos)s' success.") % {"repos":reposname} + "</div>" return result @@ -172,7 +172,7 @@ self.repos.delete(reposname) except Exception, e: result = "<div class='error'>" + _("Delete repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "repos":reposname, "msg": e.message} + "</div>" + "repos":reposname, "msg": except_to_unicode(e) } + "</div>" else: result = "<div class='info'>" + _("Delete blank repository '%(repos)s' success.") % {"repos":reposname} + "</div>" return result Modified: trunk/pysvnmanager/controllers/role.py =================================================================== --- trunk/pysvnmanager/controllers/role.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/controllers/role.py 2008-08-28 15:58:56 UTC (rev 48) @@ -107,7 +107,7 @@ self.authz.set_group(rolename, member_list, autodrop=autodrop) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) @@ -128,7 +128,7 @@ self.authz.del_group(rolename) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) @@ -149,7 +149,7 @@ self.authz.add_alias(aliasname, username) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) @@ -170,7 +170,7 @@ self.authz.del_alias(aliasname) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e.message) + msg = except_to_unicode(e) log.info(log_message) if msg: log.error(msg) Modified: trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py 2008-08-28 15:58:56 UTC (rev 48) @@ -112,7 +112,7 @@ switch = 'no' admin = params.get('admin') if not admin: - raise Exception, _("Wrong configuration.") + raise Exception(_("Wrong configuration.")) self.set_config(self.key_switch, switch) self.set_config(self.key_admin, admin) self.save() Modified: trunk/pysvnmanager/lib/base.py =================================================================== --- trunk/pysvnmanager/lib/base.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/lib/base.py 2008-08-28 15:58:56 UTC (rev 48) @@ -36,6 +36,14 @@ msg = repr(msg)[1:-1] return msg +def except_to_unicode(e): + msg = ', '.join(e.args) + return get_unicode(msg) + +def except_to_utf8(e): + msg = ', '.join(e.args) + return get_utf8(msg) + class BaseController(WSGIController): requires_auth = [] Modified: trunk/pysvnmanager/websetup.py =================================================================== --- trunk/pysvnmanager/websetup.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/pysvnmanager/websetup.py 2008-08-28 15:58:56 UTC (rev 48) @@ -22,6 +22,8 @@ os.mkdir(here+'/config') if not os.path.exists(here+'/config/RCS'): os.mkdir(here+'/config/RCS') + if not os.path.exists(here+'/svnroot'): + os.mkdir(here+'/svnroot') filelist = ['svn.access', 'svn.passwd', 'localconfig.py'] for f in filelist: src = resource_filename('pysvnmanager', 'config/' + f+'.in') Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2008-08-28 11:15:39 UTC (rev 47) +++ trunk/setup.py 2008-08-28 15:58:56 UTC (rev 48) @@ -7,7 +7,7 @@ setup( name='pySvnManager', - version="0.2.0", + version="0.2.1", description='SVN authz web management tools.', author='Jiang Xin', author_email='jia...@os...', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-28 11:15:35
|
Revision: 47 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=47&view=rev Author: jiangx Date: 2008-08-28 11:15:39 +0000 (Thu, 28 Aug 2008) Log Message: ----------- add more hooks plugins; add hook scripts; refactor hook-plugin Modified Paths: -------------- trunk/pySvnManager.egg-info/SOURCES.txt trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py trunk/pysvnmanager/hooks/plugins/EmailNotify.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/model/hooks.py trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/tests/test_repos.py trunk/setup.py Added Paths: ----------- trunk/pysvnmanager/hooks/init/hook1.4/ trunk/pysvnmanager/hooks/init/hook1.4/parse_ini.sh trunk/pysvnmanager/hooks/init/hook1.4/post-commit trunk/pysvnmanager/hooks/init/hook1.4/post-lock.tmpl trunk/pysvnmanager/hooks/init/hook1.4/post-revprop-change trunk/pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl trunk/pysvnmanager/hooks/init/hook1.4/pre-commit trunk/pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl trunk/pysvnmanager/hooks/init/hook1.4/pre-revprop-change trunk/pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl trunk/pysvnmanager/hooks/init/hook1.4/scripts/ trunk/pysvnmanager/hooks/init/hook1.4/scripts/README trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg.example trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.pl trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-block-joke.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-email.pl trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit-email.rb trunk/pysvnmanager/hooks/init/hook1.4/scripts/commit_log_check.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/detect-merge-conflicts.sh trunk/pysvnmanager/hooks/init/hook1.4/scripts/log-police.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/pre-commit-check.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/pre-lock-require-needs-lock.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/svn2rss.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf trunk/pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf.example trunk/pysvnmanager/hooks/init/hook1.4/scripts/svnperms.py trunk/pysvnmanager/hooks/init/hook1.4/scripts/verify-po.py trunk/pysvnmanager/hooks/init/hook1.4/start-commit trunk/pysvnmanager/hooks/init/hook1.5/ trunk/pysvnmanager/hooks/init/hook1.5/parse_ini.sh trunk/pysvnmanager/hooks/init/hook1.5/post-commit trunk/pysvnmanager/hooks/init/hook1.5/post-lock.tmpl trunk/pysvnmanager/hooks/init/hook1.5/post-revprop-change trunk/pysvnmanager/hooks/init/hook1.5/post-unlock.tmpl trunk/pysvnmanager/hooks/init/hook1.5/pre-commit trunk/pysvnmanager/hooks/init/hook1.5/pre-lock.tmpl trunk/pysvnmanager/hooks/init/hook1.5/pre-revprop-change trunk/pysvnmanager/hooks/init/hook1.5/pre-unlock.tmpl trunk/pysvnmanager/hooks/init/hook1.5/scripts/ trunk/pysvnmanager/hooks/init/hook1.5/scripts/README trunk/pysvnmanager/hooks/init/hook1.5/scripts/check-authz.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.pl trunk/pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.pl trunk/pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg.example trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.pl trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-block-joke.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-email.pl trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit-email.rb trunk/pysvnmanager/hooks/init/hook1.5/scripts/commit_log_check.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/detect-merge-conflicts.sh trunk/pysvnmanager/hooks/init/hook1.5/scripts/log-police.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/pre-commit-check.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/pre-lock-require-needs-lock.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/svn2rss.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf trunk/pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf.example trunk/pysvnmanager/hooks/init/hook1.5/scripts/svnperms.py trunk/pysvnmanager/hooks/init/hook1.5/scripts/verify-po.py trunk/pysvnmanager/hooks/init/hook1.5/start-commit trunk/pysvnmanager/hooks/plugins/AllowRevpropChange.py trunk/pysvnmanager/hooks/plugins/CapCheckMergeInfo.py trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py Removed Paths: ------------- trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-27 14:04:28 UTC (rev 46) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-08-28 11:15:39 UTC (rev 47) @@ -20,11 +20,16 @@ pysvnmanager/__init__.py pysvnmanager/websetup.py pysvnmanager/config/DefaultConfig.py +pysvnmanager/config/DefaultConfig.pyc pysvnmanager/config/__init__.py +pysvnmanager/config/__init__.pyc pysvnmanager/config/environment.py +pysvnmanager/config/environment.pyc pysvnmanager/config/localconfig.py.in pysvnmanager/config/middleware.py +pysvnmanager/config/middleware.pyc pysvnmanager/config/routing.py +pysvnmanager/config/routing.pyc pysvnmanager/config/svn.access.in pysvnmanager/config/svn.passwd.in pysvnmanager/controllers/__init__.py @@ -32,9 +37,41 @@ pysvnmanager/controllers/check.py pysvnmanager/controllers/error.py pysvnmanager/controllers/logs.py +pysvnmanager/controllers/repos.py pysvnmanager/controllers/role.py pysvnmanager/controllers/security.py pysvnmanager/controllers/template.py +pysvnmanager/hooks/__init__.py +pysvnmanager/hooks/init/__init__.py +pysvnmanager/hooks/init/hook1.4/parse_ini.sh +pysvnmanager/hooks/init/hook1.4/post-commit +pysvnmanager/hooks/init/hook1.4/post-lock.tmpl +pysvnmanager/hooks/init/hook1.4/post-revprop-change +pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl +pysvnmanager/hooks/init/hook1.4/pre-commit +pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl +pysvnmanager/hooks/init/hook1.4/pre-revprop-change +pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl +pysvnmanager/hooks/init/hook1.4/start-commit +pysvnmanager/hooks/init/hook1.5/parse_ini.sh +pysvnmanager/hooks/init/hook1.5/post-commit +pysvnmanager/hooks/init/hook1.5/post-lock.tmpl +pysvnmanager/hooks/init/hook1.5/post-revprop-change +pysvnmanager/hooks/init/hook1.5/post-unlock.tmpl +pysvnmanager/hooks/init/hook1.5/pre-commit +pysvnmanager/hooks/init/hook1.5/pre-lock.tmpl +pysvnmanager/hooks/init/hook1.5/pre-revprop-change +pysvnmanager/hooks/init/hook1.5/pre-unlock.tmpl +pysvnmanager/hooks/init/hook1.5/start-commit +pysvnmanager/hooks/plugins/AllowRevpropChange.py +pysvnmanager/hooks/plugins/BugtrackMantis.py +pysvnmanager/hooks/plugins/CapCheckMergeInfo.py +pysvnmanager/hooks/plugins/CaseInsensitive.py +pysvnmanager/hooks/plugins/CommitLogCheck.py +pysvnmanager/hooks/plugins/EmailNotify.py +pysvnmanager/hooks/plugins/EolStyleCheck.py +pysvnmanager/hooks/plugins/ReadonlySvnMirror.py +pysvnmanager/hooks/plugins/__init__.py pysvnmanager/i18n/pysvnmanager.pot pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.mo pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po @@ -46,11 +83,19 @@ pysvnmanager/lib/helpers.py pysvnmanager/model/__init__.py pysvnmanager/model/configobj.py +pysvnmanager/model/hooks.py pysvnmanager/model/rcsbackup.py +pysvnmanager/model/repos.py +pysvnmanager/model/rest.py pysvnmanager/model/svnauthz.py pysvnmanager/model/auth/__init__.py pysvnmanager/model/auth/http.py pysvnmanager/model/auth/ldap_login.py +pysvnmanager/public/css/common.css +pysvnmanager/public/img/alert.png +pysvnmanager/public/img/attention.png +pysvnmanager/public/img/icon-error.png +pysvnmanager/public/img/icon-info.png pysvnmanager/templates/auth_failed.mako pysvnmanager/templates/base.mako pysvnmanager/templates/authz/index.mako @@ -61,13 +106,19 @@ pysvnmanager/templates/logs/index.mako pysvnmanager/templates/logs/rollback.mako pysvnmanager/templates/logs/view.mako +pysvnmanager/templates/repos/create.mako +pysvnmanager/templates/repos/hooks.mako +pysvnmanager/templates/repos/remove.mako pysvnmanager/templates/role/index.mako pysvnmanager/tests/__init__.py pysvnmanager/tests/test_models.py pysvnmanager/tests/test_rcs_backup.py +pysvnmanager/tests/test_repos.py +pysvnmanager/tests/data/svnroot.tar.bz2 pysvnmanager/tests/functional/__init__.py pysvnmanager/tests/functional/test_authz.py pysvnmanager/tests/functional/test_check.py pysvnmanager/tests/functional/test_login.py pysvnmanager/tests/functional/test_logs.py +pysvnmanager/tests/functional/test_repos.py pysvnmanager/tests/functional/test_role.py \ No newline at end of file Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-27 14:04:28 UTC (rev 46) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-28 11:15:39 UTC (rev 47) @@ -58,9 +58,9 @@ msg += 'id[0]="%s";' % '...' msg += 'name[0]="%s";\n' % _("Please choose...") total += 1; - for name in h.unapplied_plugins.keys(): + for name in h.unapplied_plugins: msg += 'id[%d]="%s";' % (total, name) - msg += 'name[%d]="%s";\n' % (total, h.plugins[name].name) + msg += 'name[%d]="%s";\n' % (total, name + ': ' + h.plugins[name].name) total += 1; msg += 'total=%d;\n' % total @@ -81,7 +81,7 @@ "<th align='left'>" + _("Plugin name") + "</th>" + \ "<th align='left'>" + _("Type") + "</th>" + \ "</tr>\n" - for name in h.applied_plugins.keys(): + for name in h.applied_plugins: msg += "<tr><td width='1' rolspan='2'>" msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { 'num': num, 'plugin': name, } @@ -117,7 +117,7 @@ plugin.install(d) except Exception, e: result = "<div class='error'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "plugin": pluginname, "repos":reposname, "msg": e.message} + "</div>" + "plugin": pluginname, "repos":reposname, "msg": e} + "</div>" else: result = "<div class='info'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' success.") % { "plugin": pluginname, "repos":reposname} + "</div>" Added: trunk/pysvnmanager/hooks/init/hook1.4/parse_ini.sh =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/parse_ini.sh (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/parse_ini.sh 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,54 @@ +#!/bin/bash + + +CONFIG=../conf/hooks.ini + +function readconf() { + + match=0 + + while read line; do + # skip comments + [[ $line =~ ^\ {0,}# ]] && continue + + + # skip empty lines + [[ -z "$line" ]] && continue + + # still no match? lets check again + if [ $match == 0 ]; then + + # do we have a section tag ? + if [[ $line =~ ^\[.*?\] ]]; then + + #strip [] + line=${line:1:$((${#line}-2))} + # strip whitespace + section=${line// /} + + # do we have a match ? + if [[ "$section" == "$1" ]]; then + match=1 + continue + fi + + continue + fi + + # found next section after config was read - exit loop + elif [[ $line =~ ^\[.*?\] && $match == 1 ]]; then + break + + # got a config line eval it + else + var=${line%%=*} + var=${var// /} + value=${line##*=} + value=${value## } + eval "$var='$value'" + fi + + done < "$CONFIG" +} + + Added: trunk/pysvnmanager/hooks/init/hook1.4/post-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-commit (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-commit 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,88 @@ +#!/bin/sh + +# POST-COMMIT HOOK +# +# The post-commit hook is invoked after a commit. Subversion runs +# this hook by invoking a program (script, executable, binary, etc.) +# named 'post-commit' (for which this file is a template) with the +# following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] REV (the number of the revision just committed) +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# Because the commit has already completed and cannot be undone, +# the exit code of the hook program is ignored. The hook program +# can use the 'svnlook' utility to help it examine the +# newly-committed tree. +# +# On a Unix system, the normal procedure is to have 'post-commit' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'post-commit' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'post-commit.bat' or 'post-commit.exe', +# but the basic idea is the same. +# +# The hook program typically does not inherit the environment of +# its parent process. For example, a common problem is for the +# PATH environment variable to not be set to its usual value, so +# that subprograms fail to launch unless invoked via absolute path. +# If you're having unexpected problems with a hook program, the +# culprit may be unusual (or missing) environment variables. +# +# Here is an example hook script, for a Unix /bin/sh interpreter. +# For more examples and pre-written hooks, see those in +# the Subversion repository at +# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and +# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ + + +REPOS="$1" +REV="$2" +TOOLS_DIR=$REPOS/hooks/scripts + +source $REPOS/hooks/parse_ini.sh +CONFIG=$REPOS/conf/hooks.ini +readconf post_commit +readconf email + +## Sync with downstream mirror sites using svnsync +#SVNSYNCCMD=$REPOS/hooks/svnsync.commit +#if [ -x "$SVNSYNCCMD" ]; then +# $SVNSYNCCMD +#fi + +if [ "$email_notify_enable" = "yes" ]; then + #$TOOLS_DIR/log-commit.py --repository "$REPOS" --revision "$REV" + #$TOOLS_DIR/commit-email.pl "$REPOS" "$REV" -m "." --diff y --from no...@fo...r -r no...@fo...r -s "[Prefix]" li...@fo...r + mailcmd="$TOOLS_DIR/commit-email.pl \"$REPOS\" \"$REV\" $email_notify_config" + eval $mailcmd +fi + +############################################################ +# +# Mantisbt integration ( http://www.worldhello.net ) +# +############################################################ +if [ "$mantis_integration" = "yes" ]; then + SVNLOOK=/opt/svn/bin/svnlook + SED=/bin/sed + MANTISBT=/opt/mantis/web + PHP=/opt/php5/bin/php5 + + if [ -f "$MANTISBT/core/checkin.php" ]; then + export LC_ALL=zh_CN.utf8 + commitlog=`$SVNLOOK log -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` + commitauthor=`$SVNLOOK author -r "$REV" "$REPOS" | $SED -e 's/\$/\\\\n/g'` + commitdiff=`$SVNLOOK diff -r "$REV" "$REPOS" | head -25 | $SED -e 's/\$/\\\\n/g'` + echo -e "Author: $commitauthor\nCommit Log:\n$commitlog\n\n****** Source code change ******\nRepository: $REPOS, Revision: $REV.\n\n$commitdiff" | $PHP -q $MANTISBT/core/checkin.php + fi +fi + Added: trunk/pysvnmanager/hooks/init/hook1.4/post-lock.tmpl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-lock.tmpl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-lock.tmpl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,45 @@ +#!/bin/sh + +# POST-LOCK HOOK +# +# The post-lock hook is run after a path is locked. Subversion runs +# this hook by invoking a program (script, executable, binary, etc.) +# named 'post-lock' (for which this file is a template) with the +# following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] USER (the user who created the lock) +# +# The paths that were just locked are passed to the hook via STDIN (as +# of Subversion 1.2, only one path is passed per invocation, but the +# plan is to pass all locked paths at once, so the hook program +# should be written accordingly). +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# Because the lock has already been created and cannot be undone, +# the exit code of the hook program is ignored. The hook program +# can use the 'svnlook' utility to help it examine the +# newly-created lock. +# +# On a Unix system, the normal procedure is to have 'post-lock' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'post-lock' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'post-lock.bat' or 'post-lock.exe', +# but the basic idea is the same. +# +# Here is an example hook script, for a Unix /bin/sh interpreter: + +REPOS="$1" +USER="$2" +TOOLS_DIR=$REPOS/hooks/scripts + +# Send email to interested parties, let them know a lock was created: +#$TOOLS_DIR/mailer/mailer.py lock "$REPOS" "$USER" $TOOLS_DIR/mailer/mailer.conf Added: trunk/pysvnmanager/hooks/init/hook1.4/post-revprop-change =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-revprop-change (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-revprop-change 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,71 @@ +#!/bin/sh + +# POST-REVPROP-CHANGE HOOK +# +# The post-revprop-change hook is invoked after a revision property +# has been added, modified or deleted. Subversion runs this hook by +# invoking a program (script, executable, binary, etc.) named +# 'post-revprop-change' (for which this file is a template), with the +# following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] REV (the revision that was tweaked) +# [3] USER (the username of the person tweaking the property) +# [4] PROPNAME (the property that was changed) +# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) +# +# [STDIN] PROPVAL ** the old property value is passed via STDIN. +# +# Because the propchange has already completed and cannot be undone, +# the exit code of the hook program is ignored. The hook program +# can use the 'svnlook' utility to help it examine the +# new property value. +# +# On a Unix system, the normal procedure is to have 'post-revprop-change' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'post-revprop-change' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'post-revprop-change.bat' or 'post-revprop-change.exe', +# but the basic idea is the same. +# +# The hook program typically does not inherit the environment of +# its parent process. For example, a common problem is for the +# PATH environment variable to not be set to its usual value, so +# that subprograms fail to launch unless invoked via absolute path. +# If you're having unexpected problems with a hook program, the +# culprit may be unusual (or missing) environment variables. +# +# Here is an example hook script, for a Unix /bin/sh interpreter. +# For more examples and pre-written hooks, see those in +# the Subversion repository at +# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and +# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ + + +REPOS="$1" +REV="$2" +USER="$3" +PROPNAME="$4" +ACTION="$5" +TOOLS_DIR=$REPOS/hooks/scripts + +source $REPOS/hooks/parse_ini.sh +CONFIG=$REPOS/conf/hooks.ini +readconf email + +## Sync with downstream mirror sites using svnsync +#SVNSYNCCMD=$REPOS/hooks/svnsync.revprop +#if [ -x "$SVNSYNCCMD" ]; then +# $SVNSYNCCMD +#fi + +if [ "$email_notify_enable" = "yes" ]; then + #$TOOLS_DIR/commit-email.pl --revprop-change "$REPOS" "$REV" "$USER" "$PROPNAME" -m "." --from no...@fo...r -r no...@fo...r -s "[Prefix]" li...@fo...r + mailcmd="$TOOLS_DIR/commit-email.pl --revprop-change \"$REPOS\" \"$REV\" \"$USER\" \"$PROPNAME\" $email_notify_config" + eval $mailcmd +fi Added: trunk/pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,43 @@ +#!/bin/sh + +# POST-UNLOCK HOOK +# +# The post-unlock hook runs after a path is unlocked. Subversion runs +# this hook by invoking a program (script, executable, binary, etc.) +# named 'post-unlock' (for which this file is a template) with the +# following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] USER (the user who destroyed the lock) +# +# The paths that were just unlocked are passed to the hook via STDIN +# (as of Subversion 1.2, only one path is passed per invocation, but +# the plan is to pass all unlocked paths at once, so the hook program +# should be written accordingly). +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# Because the lock has already been destroyed and cannot be undone, +# the exit code of the hook program is ignored. +# +# On a Unix system, the normal procedure is to have 'post-unlock' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'post-unlock' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'post-unlock.bat' or 'post-unlock.exe', +# but the basic idea is the same. +# +# Here is an example hook script, for a Unix /bin/sh interpreter: + +REPOS="$1" +USER="$2" +TOOLS_DIR=$REPOS/hooks/scripts + +# Send email to interested parties, let them know a lock was removed: +$TOOLS_DIR/mailer/mailer.py unlock "$REPOS" "$USER" $TOOLS_DIR/mailer/mailer.conf Added: trunk/pysvnmanager/hooks/init/hook1.4/pre-commit =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/pre-commit (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/pre-commit 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,89 @@ +#!/bin/sh + +# PRE-COMMIT HOOK +# +# The pre-commit hook is invoked before a Subversion txn is +# committed. Subversion runs this hook by invoking a program +# (script, executable, binary, etc.) named 'pre-commit' (for which +# this file is a template), with the following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] TXN-NAME (the name of the txn about to be committed) +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# If the hook program exits with success, the txn is committed; but +# if it exits with failure (non-zero), the txn is aborted, no commit +# takes place, and STDERR is returned to the client. The hook +# program can use the 'svnlook' utility to help it examine the txn. +# +# On a Unix system, the normal procedure is to have 'pre-commit' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT *** +# *** FOR REVISION PROPERTIES (like svn:log or svn:author). *** +# +# This is why we recommend using the read-only 'svnlook' utility. +# In the future, Subversion may enforce the rule that pre-commit +# hooks should not modify the versioned data in txns, or else come +# up with a mechanism to make it safe to do so (by informing the +# committing client of the changes). However, right now neither +# mechanism is implemented, so hook writers just have to be careful. +# +# Note that 'pre-commit' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'pre-commit.bat' or 'pre-commit.exe', +# but the basic idea is the same. +# +# The hook program typically does not inherit the environment of +# its parent process. For example, a common problem is for the +# PATH environment variable to not be set to its usual value, so +# that subprograms fail to launch unless invoked via absolute path. +# If you're having unexpected problems with a hook program, the +# culprit may be unusual (or missing) environment variables. +# +# Here is an example hook script, for a Unix /bin/sh interpreter. +# For more examples and pre-written hooks, see those in +# the Subversion repository at +# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and +# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ + + +REPOS="$1" +TXN="$2" +TOOLS_DIR=$REPOS/hooks/scripts + +source $REPOS/hooks/parse_ini.sh +CONFIG=$REPOS/conf/hooks.ini +readconf pre_commit + +if [ "$commit_log_check_enable" = "yes" ]; then + # Check commit log, by <WorldHello.net.AT.gmail.com> + $TOOLS_DIR/commit_log_check.py \ + -s "$commit_log_check_size" \ + -p "$commit_log_check_permit" \ + -P "$commit_log_check_prohibit" "$REPOS" "$TXN" || exit 1 +fi + +if [ "$eol_style_check" = "yes" ]; then + # New file must set svn:mime-type and svn:eol-style + $TOOLS_DIR/check-mime-type.py "$REPOS" "$TXN" || exit 1 +fi + +if [ "$detect_case_insensitive_clash" = "yes" ]; then + # Check for case conflicts + $TOOLS_DIR/check-case-insensitive.pl "$REPOS" "$TXN" || exit 1 + #$TOOLS_DIR/check-case-insensitive.py "$REPOS" "$TXN" || exit 1 +fi + +# Check that the author of this commit has the rights to perform +# the commit on the files and directories being modified. +#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1 + +# All checks passed, so allow the commit. +exit 0 Added: trunk/pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,64 @@ +#!/bin/sh + +# PRE-LOCK HOOK +# +# The pre-lock hook is invoked before an exclusive lock is +# created. Subversion runs this hook by invoking a program +# (script, executable, binary, etc.) named 'pre-lock' (for which +# this file is a template), with the following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] LOCKPATH (the path in the repository about to be locked) +# [3] USER (the user creating the lock) +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# If the hook program exits with success, the lock is created; but +# if it exits with failure (non-zero), the lock action is aborted +# and STDERR is returned to the client. + +# On a Unix system, the normal procedure is to have 'pre-lock' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'pre-lock' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'pre-lock.bat' or 'pre-lock.exe', +# but the basic idea is the same. +# +# Here is an example hook script, for a Unix /bin/sh interpreter: + +REPOS="$1" +LOCKPATH="$2" +USER="$3" + +# If a lock exists and is owned by a different person, don't allow it +# to be stolen (e.g., with 'svn lock --force ...'). + +# (Maybe this script could send email to the lock owner?) +SVNLOOK=/opt/svn/bin/svnlook +GREP=/bin/grep +SED=/bin/sed + +LOCK_OWNER=`LANG=C $SVNLOOK lock "$REPOS" "$LOCKPATH" | \ + $GREP '^Owner: ' | $SED 's/Owner: //'` + +# If we get no result from svnlook, there's no lock, allow the lock to +# happen: +if [ "$LOCK_OWNER" = "" ]; then + exit 0 +fi + +# If the person locking matches the lock's owner, allow the lock to +# happen: +if [ "$LOCK_OWNER" = "$USER" ]; then + exit 0 +fi + +# Otherwise, we've got an owner mismatch, so return failure: +echo "Error: $LOCKPATH already locked by ${LOCK_OWNER}." 1>&2 +exit 1 Added: trunk/pysvnmanager/hooks/init/hook1.4/pre-revprop-change =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/pre-revprop-change (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/pre-revprop-change 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,86 @@ +#!/bin/sh + +# PRE-REVPROP-CHANGE HOOK +# +# The pre-revprop-change hook is invoked before a revision property +# is added, modified or deleted. Subversion runs this hook by invoking +# a program (script, executable, binary, etc.) named 'pre-revprop-change' +# (for which this file is a template), with the following ordered +# arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] REVISION (the revision being tweaked) +# [3] USER (the username of the person tweaking the property) +# [4] PROPNAME (the property being set on the revision) +# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) +# +# [STDIN] PROPVAL ** the new property value is passed via STDIN. +# +# If the hook program exits with success, the propchange happens; but +# if it exits with failure (non-zero), the propchange doesn't happen. +# The hook program can use the 'svnlook' utility to examine the +# existing value of the revision property. +# +# WARNING: unlike other hooks, this hook MUST exist for revision +# properties to be changed. If the hook does not exist, Subversion +# will behave as if the hook were present, but failed. The reason +# for this is that revision properties are UNVERSIONED, meaning that +# a successful propchange is destructive; the old value is gone +# forever. We recommend the hook back up the old value somewhere. +# +# On a Unix system, the normal procedure is to have 'pre-revprop-change' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'pre-revprop-change' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'pre-revprop-change.bat' or 'pre-revprop-change.exe', +# but the basic idea is the same. +# +# The hook program typically does not inherit the environment of +# its parent process. For example, a common problem is for the +# PATH environment variable to not be set to its usual value, so +# that subprograms fail to launch unless invoked via absolute path. +# If you're having unexpected problems with a hook program, the +# culprit may be unusual (or missing) environment variables. +# +# Here is an example hook script, for a Unix /bin/sh interpreter. +# For more examples and pre-written hooks, see those in +# the Subversion repository at +# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and +# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ + + +REPOS="$1" +REV="$2" +USER="$3" +PROPNAME="$4" +ACTION="$5" + +source $REPOS/hooks/parse_ini.sh +CONFIG=$REPOS/conf/hooks.ini +readconf pre_revprop_change +readconf start_commit + +if [ "$mirror_readonly" = "yes" ]; then + # Readonly repos if this repos is a mirror using svnsync + if [ "$USER" = "$mirror_admin" ]; then + exit 0 + else + echo "Only the mirror admin may change revprop." >&2 + exit 1 + fi +fi + +if [ "$revprop_change_enable" = "yes" ]; then + if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi + + echo "Changing revision properties other than svn:log is prohibited" >&2 + exit 1 +else + echo "Changing revision properties is prohibited" >&2 + exit 1 +fi Added: trunk/pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,61 @@ +#!/bin/sh + +# PRE-UNLOCK HOOK +# +# The pre-unlock hook is invoked before an exclusive lock is +# destroyed. Subversion runs this hook by invoking a program +# (script, executable, binary, etc.) named 'pre-unlock' (for which +# this file is a template), with the following ordered arguments: +# +# [1] REPOS-PATH (the path to this repository) +# [2] UNLOCKPATH (the path in the repository about to be unlocked) +# [3] USER (the user destroying the lock) +# +# The default working directory for the invocation is undefined, so +# the program should set one explicitly if it cares. +# +# If the hook program exits with success, the lock is destroyed; but +# if it exits with failure (non-zero), the unlock action is aborted +# and STDERR is returned to the client. + +# On a Unix system, the normal procedure is to have 'pre-unlock' +# invoke other programs to do the real work, though it may do the +# work itself too. +# +# Note that 'pre-unlock' must be executable by the user(s) who will +# invoke it (typically the user httpd runs as), and that user must +# have filesystem-level permission to access the repository. +# +# On a Windows system, you should name the hook program +# 'pre-unlock.bat' or 'pre-unlock.exe', +# but the basic idea is the same. +# +# Here is an example hook script, for a Unix /bin/sh interpreter: + +REPOS="$1" +UNLOCKPATH="$2" +USER="$3" + +# If a lock is owned by a different person, don't allow it be broken. +# (Maybe this script could send email to the lock owner?) + +SVNLOOK=/opt/svn/bin/svnlook +GREP=/bin/grep +SED=/bin/sed + +LOCK_OWNER=`LANG=C $SVNLOOK lock "$REPOS" "$UNLOCKPATH" | \ + $GREP '^Owner: ' | $SED 's/Owner: //'` + +# If we get no result from svnlook, there's no lock, return success: +if [ "$LOCK_OWNER" = "" ]; then + exit 0 +fi + +# If the person unlocking matches the lock's owner, return success: +if [ "$LOCK_OWNER" = "$USER" ]; then + exit 0 +fi + +# Otherwise, we've got an owner mismatch, so return failure: +echo "Error: $UNLOCKPATH locked by ${LOCK_OWNER}." 1>&2 +exit 1 Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/README =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/README (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/README 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,4 @@ + +An overview of the scripts can be found at: +http://subversion.tigris.org/tools_contrib.html. + Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,28 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys, locale +from svn import repos, fs, core +locale.setlocale(locale.LC_ALL, 'zh_CN.UTF8') + +def test_authz(path): + try: + repos.svn_repos_authz_read(path, 1) + except core.SubversionException, ( strerror, errorno ): + if errorno == 0: + errorno = 1 + return (errorno, strerror) + except: + return (1, sys.exc_info()[1]) + + return (0, 0) + +filename = sys.argv[1] +(errorno, strerror) = test_authz(filename) +if errorno: + sys.stderr.write('Parse authz config file "%s" failed\n' % (filename)) + sys.stderr.write('Possible errors:\n') + sys.stderr.write(' %s\n' % strerror) + sys.exit(1) +else: + sys.exit(0) Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,263 @@ +#!/usr/bin/perl -w +# ==================================================================== +# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://subversion.tigris.org/license-1.html. +# If newer versions of this license are posted there, you may use a +# newer version instead, at your option. +# +# This software consists of voluntary contributions made by many +# individuals. For exact contribution history, see the revision +# history and logs, available at http://subversion.tigris.org/. +# ==================================================================== + +# This script is deprecated, please use check-case-insensitve.py instead. + +use strict; +require 5.004; # This is when locale support was added. +# This 'use encoding' and setting the LANG environment variable has the +# desired effect of handling the comparison of extended characters and +# preventing a commit. However, if any of the files in conflict have +# extended characters in them this is the error displayed by the client: +# +# Commit failed (details follow): +# svn: MERGE request failed on '/svn/play/martinto/trunk' +# svn: General svn error from server +# +# It should list the file names which are in conflict. But it does stop the +# commit. +use encoding "utf8"; +$ENV{'LANG'} = 'zh_CN.UTF8'; +$ENV{'LC_ALL'} = 'zh_CN.UTF8'; + +# Please check the path to svnlook is correct... +my $svnlook; +if ($^O eq 'MSWin32') { + $svnlook = '"c:\\Program Files\\subversion\\bin\\svnlook.exe"'; +} else { + $svnlook = '/opt/svn/bin/svnlook'; +} + +# This script can be called from a pre-commit hook on either Windows or a Unix +# like operating system. It implements the checks required to ensure that the +# repository acts in a way which is compatible with a case preserving but +# case insensitive file system. +# +# When a file is added this script checks the file tree in the repository for +# files which would be the same name on a case insensitive file system and +# rejects the commit. +# +# On a Unix system put this script in the hooks directory and add this to the +# pre-commit script: +# +# $REPOS/hooks/check-case-insensitive.pl "$REPOS" "$TXN" || exit 1 +# +# On a windows machine add this to pre-commit.bat: +# +# perl <path-to-script>\\check-case-insensitive.pl %1 %2 +# if errorlevel 1 goto :ERROR +# exit 0 +# :ERROR +# echo Error found in commit 1>&2 +# exit 1 +# +# You may need to change the setting of $svnlook to the path to the +# executable on your system. +# +# Turn on debug by adding up to three -debug options as the first options in +# the list. The more -debug options the more output. If you specify more +# than one the output goes into a file. +# +# If you have any problems with this script feel free to contact +# Martin Tomes <ma...@to...> + +# Bugfixes and some debug code added by Jeremy Bettis <je...@de...> + +my $openstr = '-|'; +# Shift off any debug options. +my $debug = 0; +while (@ARGV and $ARGV[0] =~ /^-d(ebug)?$/) { + $debug++; + shift; +} + +# If there is too much debug output to STDERR subversion doesn't like it, so, +# if a lot of output is expected send it to a file instead. +if ($debug > 0) { + if ($^O eq 'MSWin32') { + open(STDERR, ">c:/svnlog.txt") + or die "$0: cannot open 'c:/svnlog.txt' for writing: $!\n"; + } else { + open(STDERR, ">/tmp/svnlog.txt") + or die "$0: cannot open '/tmp/svnlog.txt' for writing: $!\n"; + } +} + +# Fetch the command line arguments. +unless (@ARGV > 1) { + die "usage: $0 [-d [-d [-d]]] repos txn [--revision]\n"; +} + +my $repos = shift; +my $txn = shift; + +# Jeremy Bettis <je...@de...> wrote the $flag code and has this to +# say about it: +# +# The reason I did that was so that I could test the hook without actually +# doing a commit. Whenever I had a commit that succeeded in making a bad file +# or directory, or when a commit took too long I just did a sequence of +# operations like this: +# +# svnlook youngest path +# (it tells me that HEAD is 987 or whatever) +# check-case-insensitive.pl -debug path 987 -r +# and then the check-case-insensitive.pl passes -r to svnlook instead of +# --transaction. +# +# Of course when it gets down to # Get the file tree at the previous revision, +# then it doesn't work, but most of my problems were found before that point. +my $flag = '--transaction'; +$flag = shift if @ARGV; + +# Each added path put here. +my @added; + +# The file tree as a hash, index lower cased name, value actual name. +my %tree; + +# Command being executed. +my $cmd; + +print STDERR "LANG=", $ENV{'LANG'}, "\n" if ($debug and defined($ENV{'LANG'})); +# Get a list of added files. +local *SVNLOOK; +$cmd = "$svnlook changed \"$repos\" $flag $txn"; +print STDERR "$cmd\n" if ($debug); +open(SVNLOOK, $openstr, $cmd) + or die("$0: cannot open '$cmd' pipe for reading: $!\n"); +while (<SVNLOOK>) { + chomp; + if (/^A\s+(\S.*)/) { + push @added, $1; + } +} +close SVNLOOK; + +if ($debug) { + print STDERR "Added " . ($#added + 1) . " items:\n"; + foreach my $itm (@added) { + print STDERR " $itm\n"; + } +} + +unless (@added) { + print STDERR "No files added\n" if ($debug); + # No added files so no problem. + exit(0); +} + +# Get the shortest directory name which has changed, this will be the path +# into the repository to use to get the history. +$cmd = "$svnlook dirs-changed \"$repos\" $flag $txn"; +print STDERR "$cmd\n" if ($debug); +open(SVNLOOK, $openstr, $cmd) + or die("$0: cannot open '$cmd' pipe for reading: $!\n"); +my $shortest=999999; +my $changed; +while (<SVNLOOK>) { + chomp; + print STDERR " ", $_, "\n" if ($debug > 2); + if (length($_) < $shortest) { + $changed = $_; + $shortest = length($_); + } +} +close SVNLOOK; +# There isn't a leading slash on $changed but there is a trailing one. When +# it is the root of the repository the / is a pain, so always remove the +# trailing slash and put it back in where needed. +$changed =~ s/\/$//; + +# Use the history of $changed path to find the revision of the previous commit. +$cmd = "$svnlook history \"$repos\" \"$changed/\""; +print STDERR "$cmd\n" if ($debug); +open(SVNLOOK, $openstr, $cmd) + or die("$0: cannot open '$cmd' pipe for reading: $!\n"); +my $lastrev; +while (<SVNLOOK>) { + chomp; + if (/(\d+)/) { + $lastrev = $1; + last; + } +} +close SVNLOOK; + +# Get the file tree at the previous revision and turn the output into +# complete paths for each file. +my @path; +$cmd = "$svnlook tree \"$repos\" \"$changed/\" --revision $lastrev"; +print STDERR "$cmd\n" if ($debug); +open(SVNLOOK, $openstr, $cmd) + or die("$0: cannot open '$cmd' pipe for reading: $!\n"); +while (<SVNLOOK>) { + chomp; + print STDERR "tree: '", $_, "'\n" if ($debug > 2); + next if (/^\/{1,2}$/); # Ignore the root node. Two /'s at root of the repos. + if (/^(\s+)(.*)\/$/) { # Is a directory. + $#path = length($1)-2; # Number of spaces at start of line is nest level. + push @path, $2; + my $name = join('/', @path) . '/'; + my $index; + if ($changed eq '') { + $index = $name; + } else { + $index = $changed . '/' . $name; + } + $tree{lc($index)} = $name; # Index the hash with case folded name. + print STDERR "\$tree{lc($index)}=$name (dir)\n" if ($debug > 1); + } elsif (/^(\s+)(.*)$/) { # This is a real file name, not a directory. + $#path = length($1)-2; # Number of spaces at start of line is nest level. + my $name; + if ($#path eq -1) { + $name = $2; + } else { + $name = join('/', @path) . '/' . $2; + } + my $index; + if ($changed eq '') { + $index = $name; + } else { + $index = $changed . '/' . $name; + } + $tree{lc($index)} = $name; # Index the hash with case folded name. + print STDERR "\$tree{lc($index)}=$name\n" if ($debug > 1); + } +} +close SVNLOOK; + +my $failmsg; + +my %newtree; +foreach my $newfile (@added) { + print STDERR "Checking \$tree{lc($newfile)}\n" if ($debug > 1); + # Without the following line it gets the lc() wrong. + my $junk = "x$newfile"; + my $lcnewfile = lc($newfile); + if (exists($tree{$lcnewfile})) { + $failmsg .= "\n $newfile 已经存在于 " . $tree{lc($newfile)}; + } + elsif (exists($newtree{$lcnewfile})) { + $failmsg .= "\n $newfile 已经添加为 " . $newtree{lc($newfile)}; + } + $newtree{$lcnewfile} = $newfile; +} +if (defined($failmsg)) { + print STDERR "\n发现文件名大小写冲突:\n" . $failmsg . "\n"; + exit 1; +} + +exit 0; Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# A pre-commit hook to detect case-insensitive filename clashes. +# +# What this script does: +# - Detects new paths that 'clash' with existing, or other new, paths. +# - Ignores existings paths that already 'clash' +# - Exits with an error code, and a diagnostic on stderr, if 'clashes' +# are detected. +# +# How it does it: +# - Get a list of changed paths. +# - From that list extract the new paths that represent adds or replaces. +# - For each new path: +# - Split the path into a directory and a name. +# - Get the names of all the entries in the version of the directory +# within the txn. +# - Compare the canonical new name with each canonical entry name. +# - If the canonical names match and the pristine names do not match +# then we have a 'clash'. +# +# Notes: +# - All the paths from the Subversion filesystem bindings are encoded +# in UTF-8 and the separator is '/' on all OS's. +# - The canonical form determines what constitutes a 'clash', at present +# a simple 'lower case' is used. That's probably not identical to the +# behaviour of Windows or OSX, but it might be good enough. +# - Hooks get invoked with an empty environment so this script explicitly +# sets a locale; make sure it is a sensible value. +# - If used with Apache the 'clash' diagnostic must be ASCII irrespective +# of the locale, see the 'Force' comment near the end of the script for +# one way to achieve this. + +import sys, locale +sys.path.append('/usr/local/subversion/lib/svn-python') +from svn import repos, fs +locale.setlocale(locale.LC_ALL, 'zh_CN.UTF8') + +def canonicalize(path): + return path.decode('utf-8').lower().encode('utf-8') + +def get_new_paths(txn_root): + new_paths = [] + for path, change in fs.paths_changed(txn_root).iteritems(): + if (change.change_kind == fs.path_change_add + or change.change_kind == fs.path_change_replace): + new_paths.append(path) + return new_paths + +def split_path(path): + slash = path.rindex('/') + if (slash == 0): + return '/', path[1:] + return path[:slash], path[slash+1:] + +def join_path(dir, name): + if (dir == '/'): + return '/' + name + return dir + '/' + name + +def ensure_names(path, names, txn_root): + if (not names.has_key(path)): + names[path] = [] + for name, dirent in fs.dir_entries(txn_root, path).iteritems(): + names[path].append([canonicalize(name), name]) + +names = {} # map of: key - path, value - list of two element lists of names +clashes = {} # map of: key - path, value - map of: key - path, value - dummy + +native = locale.getlocale()[1] +if not native: native = 'utf-8' +repos_handle = repos.open(sys.argv[1].decode(native).encode('utf-8')) +fs_handle = repos.fs(repos_handle) +txn_handle = fs.open_txn(fs_handle, sys.argv[2].decode(native).encode('utf-8')) +txn_root = fs.txn_root(txn_handle) + +new_paths = get_new_paths(txn_root) +for path in new_paths: + dir, name = split_path(path) + canonical = canonicalize(name) + ensure_names(dir, names, txn_root) + for name_pair in names[dir]: + if (name_pair[0] == canonical and name_pair[1] != name): + canonical_path = join_path(dir, canonical) + if (not clashes.has_key(canonical_path)): + clashes[canonical_path] = {} + clashes[canonical_path][join_path(dir, name)] = True + clashes[canonical_path][join_path(dir, name_pair[1])] = True + +if (clashes): + # native = 'ascii' # Force ASCII output for Apache + for canonical_path in clashes.iterkeys(): + sys.stderr.write(u'Clash:'.encode(native)) + for path in clashes[canonical_path].iterkeys(): + sys.stderr.write(u' \''.encode(native) + + str(path).decode('utf-8').encode(native, 'replace') + + u'\''.encode(native)) + sys.stderr.write(u'\n'.encode(native)) + sys.exit(1) Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,262 @@ +#!/usr/bin/perl -w + +# ==================================================================== +# commit-mime-type-check.pl: check that every added file has the +# svn:mime-type property set and every added file with a mime-type +# matching text/* also has svn:eol-style set. If any file fails this +# test the user is sent a verbose error message suggesting solutions and +# the commit is aborted. +# +# Usage: commit-mime-type-check.pl REPOS TXN-NAME +# ==================================================================== +# Most of commit-mime-type-check.pl was taken from +# commit-access-control.pl, Revision 9986, 2004-06-14 16:29:22 -0400. +# ==================================================================== +# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://subversion.tigris.org/license.html. +# If newer versions of this license are posted there, you may use a +# newer version instead, at your option. +# +# This software consists of voluntary contributions made by many +# individuals. For exact contribution history, see the revision +# history and logs, available at http://subversion.tigris.org/. +# ==================================================================== + +# Turn on warnings the best way depending on the Perl version. +BEGIN { + if ( $] >= 5.006_000) + { require warnings; import warnings; } + else + { $^W = 1; } +} + +use strict; +use Carp; + + +###################################################################### +# Configuration section. + +# Svnlook path. +my $svnlook = "/opt/svn/bin/svnlook"; +$ENV{'LANG'} = 'zh_CN.UTF8'; +$ENV{'LC_ALL'} = 'zh_CN.UTF8'; + +# Since the path to svnlook depends upon the local installation +# preferences, check that the required program exists to insure that +# the administrator has set up the script properly. +{ + my $ok = 1; + foreach my $program ($svnlook) + { + if (-e $program) + { + unless (-x $program) + { + warn "$0: required program `$program' is not executable, ", + "edit $0.\n"; + $ok = 0; + } + } + else + { + warn "$0: required program `$program' does not exist, edit $0.\n"; + $ok = 0; + } + } + exit 1 unless $ok; +} + +###################################################################### +# Initial setup/command-line handling. + +&usage unless @ARGV == 2; + +my $repos = shift; +my $txn = shift; + +unless (-e $repos) + { + &usage("$0: repository directory `$repos' does not exist."); + } +unless (-d $repos) + { + &usage("$0: repository directory `$repos' is not a directory."); + } + +# Define two constant subroutines to stand for read-only or read-write +# access to the repository. +sub ACCESS_READ_ONLY () { 'read-only' } +sub ACCESS_READ_WRITE () { 'read-write' } + + +###################################################################### +# Harvest data using svnlook. + +# Change into /tmp so that svnlook diff can create its .svnlook +# directory. +my $tmp_dir = '/tmp'; +chdir($tmp_dir) + or die "$0: cannot chdir `$tmp_dir': $!\n"; + +# Figure out what files have added using svnlook. +my @files_added; +foreach my $line (&read_from_process($svnlook, 'changed', $repos, '-t', $txn)) + { + # Add only files that were added to @files_added + if ($line =~ /^A. (.*[^\/])$/) + { + push(@files_added, $1); + } + } + +my @errors; +foreach my $path ( @files_added ) + { + my $mime_type; + my $eol_style; + my $check_mime = 1; + + # Parse the complete list of property values of the file $path to extract + # the mime-type and eol-style + foreach my $prop (&read_from_process($svnlook, 'proplist', $repos, '-t', + $txn, '--verbose', $path)) + { + if ($prop =~ /^\s*svn:mime-type : (\S+)/) + { + $mime_type = $1; + } + elsif ($prop =~ /^\s*svn:eol-style : (\S+)/) + { + $eol_style = $1; + } + elsif ($prop =~ /^\s*svn:special : (\S+)/) + { + $check_mime = 0; + } + } + + # Detect error conditions and add them to @errors + if ($check_mime) + { + if (not $mime_type and not $eol_style) + { + push @errors, "$path : 属性 svn:mime-type 或者 svn:eol-style 没有设置"; + } + elsif ($mime_type =~ /^text\// and not $eol_style) + { + push @errors, "$path : svn:mime-type=$mime_type 但是 svn:eol-style 没有设置"; + } + } + } + +# If there are any errors list the problem files and give information +# on how to avoid the problem. Hopefully people will set up auto-props +# and will not see this verbose message more than once. +if (@errors) + { + warn "$0:\n\n", + join("\n", @errors), "\n\n", + <<EOS; + + 管理员已经启用换行符属性检查。每一个新添加的文件必须 + 指定换行符。如果 svn:mime-type 属性为文本文件,则 + 必须设置 svn:eol-style 属性。 + + 对于二进制文件,执行如下命令: + svn propset svn:mime-type application/octet-stream path/of/file + + 对于文本文件,可以执行如下命令: + svn propset svn:mime-type text/plain path/of/file + svn propset svn:eol-style native path/of/file + + 为了避免每次添加文件手动设置,可以启用自动属性设置。 + 需要修改文件 ~/.subversion/config (Unix平台)。 + 打开 auto-props 设置,并设置扩展名和属性的对应关系。 + 详细设置,参见 Subversion 参考: + (http://svnbook.red-bean.com/), Chapter 7, Properties section, + Automatic Property Setting subsection. +EOS + exit 1; + } +else + { + exit 0; + } + +sub usage +{ + warn "@_\n" if @_; + die "usage: $0 REPOS TXN-NAME\n"; +} + +sub safe_read_from_pipe +{ + unless (@_) + { + croak "$0: safe_read_from_pipe passed no arguments.\n"; + } + print "Running @_\n"; + my $pid = open(SAFE_READ, '-|'); + unless (defined $pid) + { + die "$0: cannot fork: $!\n"; + } + unless ($pid) + { + open(STDERR, ">&STDOUT") + or die "$0: cannot dup STDOUT: $!\n"; + exec(@_) + or die "$0: cannot exec `@_': $!\n"; + } + my @output; + while (<SAFE_READ>) + { + chomp; + push(@output, $_); + } + close(SAFE_READ); + my $result = $?; + my $exit = $result >> 8; + my $signal = $result & 127; + my $cd = $result & 128 ? "with core dump" : ""; + if ($signal or $cd) + { + warn "$0: pipe from `@_' failed $cd: exit=$exit signal=$signal\n"; + } + if (wantarray) + { + return ($result, @output); + } + else + { + return $result; + } +} + +sub read_from_process + { + unless (@_) + { + croak "$0: read_from_process passed no arguments.\n"; + } + my ($status, @output) = &safe_read_from_pipe(@_); + if ($status) + { + if (@output) + { + die "$0: `@_' failed with this output:\n", join("\n", @output), "\n"; + } + else + { + die "$0: `@_' failed with no output.\n"; + } + } + else + { + return @output; + } +} Added: trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py =================================================================== --- trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py (rev 0) +++ trunk/pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py 2008-08-28 11:15:39 UTC (rev 47) @@ -0,0 +1,108 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +""" +check-mime-type.py: check that every added file has the +svn:mime-type property set and every added file with a mime-type +matching text/* also has svn:eol-style set. If any file fails this +test the user is sent a verbose error message suggesting solutions and +the commit is aborted. + +Usage: commit-mime-type-check.pl REPOS TXN-NAME + +Rewrite from check-mime-type.pl, by Jiang Xin<WorldHello.net.AT.gmail.com> +""" + +__revision__ = '$Id: commit_log_check.py 513 2006-05-06 17:12:03Z jiangxin $' + +import sys, os, re, string, locale + +if os.name == 'nt': + SVNLOOK = 'C:/Apps/Subversion/bin/svnlook.exe' +else: + SVNLOOK = '/opt/svn/bin/svnlook' + +os.environ['LANG'] = os.environ['LC_ALL'] = 'zh_CN.UTF8' + +MIN_LENGTH = 5 + +def main(repos, txn): + """main entry point""" + + files_added = [] + cmd = '%s changed -t "%s" "%s"' % (SVNLOOK, txn, repos) + padd = re.compile(r'^A. (.*[^/])$') + + for line in os.popen(cmd, 'r').readlines(): + match = padd.match( line.rstrip("\n") ); + if match: + groups = match.groups() + if len(groups) == 1: + files_added.append( groups[0] ); + + pmime = re.compile(r'\s*svn:mime-type : (\S+)') + peol = re.compile(r'\s*svn:eol-style : (\S+)') + ptext = re.compile(r'^text/') + pspecial = re.compile(r'\s*svn:special : (\S+)') + + errmsg = [] + fo... [truncated message content] |
From: <ji...@us...> - 2008-08-27 14:04:24
|
Revision: 46 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=46&view=rev Author: jiangx Date: 2008-08-27 14:04:28 +0000 (Wed, 27 Aug 2008) Log Message: ----------- plugins refactor; add more hook-plugins Modified Paths: -------------- trunk/config/Makefile trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/templates/repos/hooks.mako trunk/pysvnmanager/tests/functional/test_repos.py trunk/pysvnmanager/tests/test_repos.py Added Paths: ----------- trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py trunk/pysvnmanager/hooks/plugins/EmailNotify.py trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py trunk/pysvnmanager/model/rest.py Modified: trunk/config/Makefile =================================================================== --- trunk/config/Makefile 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/config/Makefile 2008-08-27 14:04:28 UTC (rev 46) @@ -8,6 +8,7 @@ @-rm $(CONFFILE) >/dev/null 2>&1 @-rm localconfig.pyc >/dev/null 2>&1 @-rm -f *,v RCS/*test,v 2>&1 + @-rm -rf ../svnroot.test %: $(SRCDIR)/%.in cp $< $@ Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-27 14:04:28 UTC (rev 46) @@ -66,7 +66,7 @@ return msg - def get_remove_hook_form_content(self): + def get_installed_hook_form(self): reposname = request.params.get('select') h = _hooks.Hooks(self.repos_root + '/' + reposname) msg = '' @@ -86,25 +86,28 @@ msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { 'num': num, 'plugin': name, } msg += "</td>\n" - msg += "<td>" + name + "</td>\n" + msg += "<td><a href='#' onclick=\"show_hook_config_form('%s'); return false;\">" % name + name + "</a></td>\n" msg += "<td>" + h.plugins[name].name + "</td>\n" msg += "<td>" + h.plugins[name].get_type() + "</td>\n" msg += "</tr>\n" - msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].detail + "</td></tr>\n" + msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].show_install_info() + "</td></tr>\n" num += 1 msg += "</table>\n" - msg += '<input type="submit" name="remove_hook" value="%s">\n' % _("Remove selected hooks") + msg += '<input type="submit" name="uninstall_hook" value="%s">\n' % _("Remove selected hooks") return msg - def get_hook_form(self): + def get_hook_setting_form(self): reposname = request.params.get('repos') pluginname = request.params.get('plugin') h = _hooks.Hooks(self.repos_root + '/' + reposname) + result = "<input type='hidden' name='_repos' value='%s'>" % reposname + result += "<input type='hidden' name='_plugin' value='%s'>" % pluginname + result += h.plugins[pluginname].show_install_config_form() - return h.plugins[pluginname].install_config_form() + return result - def apply_new_hook(self): + def setup_hook(self): try: d = request.params reposname = d.get("_repos") @@ -120,7 +123,7 @@ "plugin": pluginname, "repos":reposname} + "</div>" return result - def remove_hook(self): + def uninstall_hook(self): plugin_list=[] d = request.params reposname = d.get("_repos") Added: trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,84 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class MantisIntegration(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Mantis bugtracking integration") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Integration Subversion with Mantis bugtracking. " + "If commit-log has proper format (contains bugid), " + "it will change bug status and append commint-log " + "and code differ as comment of bug status change.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_POST_COMMIT + + # Plugin config option/value in config ini file. + key = "mantis_integration" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return MantisIntegration(repospath) Modified: trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-27 14:04:28 UTC (rev 46) @@ -6,29 +6,41 @@ class CaseInsensitive(PluginBase): + # Plugin id + id = __name__.rsplit('.',1)[-1] + # Brief name for this plugin. name = _("check case insensitive") - # Longer description for this plugin. + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. description = _("A pre-commit hook to detect case-insensitive filename clashes.") + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = T_PRE_COMMIT - + # Plugin config option/value in config ini file. key = "case_insensitive" value = "yes" def enabled(self): """ - Return True, if this plugin has been setup. + Return True, if this plugin has been installed. Simply call 'has_config()'. """ return self.has_config() - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ return self.description @@ -37,10 +49,8 @@ This method will be called to build setup configuration form. If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - - Default: just output description. """ - return super(CaseInsensitive, self).install_config_form() + return "" def uninstall(self): """ Added: trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class CommitLogCheck(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Check commit log message") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("User must provide commit-log message when checkin.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "commit_log_check" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return CommitLogCheck(repospath) Added: trunk/pysvnmanager/hooks/plugins/EmailNotify.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EmailNotify.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/EmailNotify.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,144 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class EmailNotify(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Send email notify for commit event") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Send a notification email describing either a commit or " + "a revprop-change action on a Subversion repository.") + + # Long description for this plugin. + detail = _(""" +You must provide proper options to commit-email.pl using the +configuration form for this plugin. + +You can simply just provide the email_addr as the options. + + [options] email_addr [email_addr ...] + +But to be more versitile, you can setup a path-based email +notifier. + + [-m regex1] [options] [email_addr ...] + [-m regex2] [options] [email_addr ...] + ... + +Options: + +-m regex Regular expression to match committed path +--from email_address Email address for 'From:' (overrides -h) +-r email_address Email address for 'Reply-To: +-s subject_prefix Subject line prefix +--diff n Do not include diff in message (default: y) +""") + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_POST_COMMIT + + # Plugin config option/value in config ini file. + # email_notify_enable = yes|no + # email_notify_config = -m "." --diff y --from <from@addr> -r <reply@addr> -s "[prefix]" to@addr + key_switch = "email_notify_enable" + key_config = "email_notify_config" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config(self.key_switch) and self.has_config(self.key_config) + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + result = self.description + if self.enabled(): + result += "\n\n" + result += "**Current configuration**\n\n" + if self.get_config(self.key_switch) == "yes": + result += _("- Email notify enabled.") + else: + result += _("- Email notify disabled.") + result += "\n" + result += _("- Parameters: ``") + self.get_config(self.key_config) + '``' + + return result + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + if self.get_config(self.key_switch)=="yes": + enable_checked = "checked" + disable_checked = "" + else: + enable_checked = "" + disable_checked = "checked" + + result = "" + result += "<p><strong>%s</strong></p>" % _("Fill this form") + result += "<blockquote>" + result += _("Enable email notify.") + result += "<input type='radio' name='switch' value='yes' " + \ + enable_checked + ">" + _("Enable") + " " + result += "<input type='radio' name='switch' value='no' " + \ + disable_checked + ">" + _("Disable") + "<br>" + result += _("Input email notify configurations: ") + \ + "<input type='text' name='config' size='64' value='%s'>" % \ + self.get_config(self.key_config) + result += "</blockquote>" + return result + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config(self.key_config) + self.unset_config(self.key_switch) + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + switch = params.get('switch', 'yes') + if switch != 'yes': + switch = 'no' + config = params.get('config') + if not config: + raise Exception, _("Wrong configuration.") + self.set_config(self.key_switch, switch) + self.set_config(self.key_config, config) + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return EmailNotify(repospath) Modified: trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-27 14:04:28 UTC (rev 46) @@ -6,12 +6,21 @@ class EolStyleCheck(PluginBase): + # Plugin id + id = __name__.rsplit('.',1)[-1] + # Brief name for this plugin. name = _("mime-type and eol-style check") - # Longer description for this plugin. + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. description = _("New file must provide svn:eol-style if not binary file.") + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = T_PRE_COMMIT @@ -21,14 +30,17 @@ def enabled(self): """ - Return True, if this plugin has been setup. + Return True, if this plugin has been installed. Simply call 'has_config()'. """ return self.has_config() - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ return self.description @@ -37,10 +49,8 @@ This method will be called to build setup configuration form. If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - - Default: just output description. """ - return super(EolStyleCheck, self).install_config_form() + return "" def uninstall(self): """ Added: trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/MergeinfoClient.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ + +class MergeinfoClient(PluginBase): + + # Plugin id + id = __name__.rsplit('.',1)[-1] + + # Brief name for this plugin. + name = _("Subversion client mergeinfo capability check") + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + + # Short description for this plugin. + description = _("Do not allow subversion client (<1.5) to checkin.") + + # Long description for this plugin. + detail = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "client_capibility_check" + value = "yes" + + def enabled(self): + """ + Return True, if this plugin has been installed. + Simply call 'has_config()'. + """ + return self.has_config() + + def install_info(self): + """ + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html + """ + return self.description + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + """ + return "" + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() + + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return MergeinfoClient(repospath) Modified: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-27 14:04:28 UTC (rev 46) @@ -5,6 +5,8 @@ import time import logging +from pysvnmanager.model.rest import reSTify + # i18n works only as pysvnmanager (a pylons app) model. from pylons import config if config.get('package') and not config.has_key('unittest'): @@ -64,12 +66,21 @@ class PluginBase(object): """ Base class for hook plugins """ + # Plugin id (must be override!) + id = __name__.rsplit('.',1)[-1] + + # Both description and detail are reStructuredText format. + # Reference about reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html + # Brief name for this plugin. name = "" - # Longer description for this plugin. + # Short description for this plugin. description = "" + # Long description for this plugin. + detail = "" + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK type = 0 @@ -116,6 +127,14 @@ # not out-of-date if config file not exist, or timestamp not changed. return False + def __cmp__(self, obj): + assert isinstance(obj, PluginBase) + if self.type == obj.type: + return cmp(self.id, obj.id) + else: + return cmp(self.type, obj.type) + + def reload(self, force=True): """ Reload the default config ini file, if out-of-date. @@ -152,26 +171,48 @@ result = default return result - def has_config(self): + def has_config(self, key="", value=""): """ Test if self.key = self.value is in the default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key + + if value == "": + if hasattr(self, "value"): + value = self.value if hasattr(self, "section"): section = self.section else: section = 'main' - return self.get_config(self.key, section=section) == self.value + setting = self.get_config(key, section=section) + if value: + return setting == value + elif setting != "": + return True + else: + return False - def set_config(self): + def set_config(self, key="", value=""): """ add self.key = self.value to default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key + + if value == "": + if not hasattr(self, "value"): + raise Exception, _("Plugin not fully implemented.") + else: + value = self.value if hasattr(self, "section"): section = self.section @@ -180,14 +221,17 @@ if not self.cp.has_section(section): self.cp.add_section(section) - self.cp.set(section, self.key, self.value) + self.cp.set(section, key, value) - def unset_config(self): + def unset_config(self, key=""): """ Remove self.key from default config ini file. """ - if not hasattr(self, "key") or not hasattr(self, "value"): - raise Exception, _("Plugin not fully implemented.") + if key == "": + if not hasattr(self, "key"): + raise Exception, _("Plugin not fully implemented.") + else: + key = self.key if hasattr(self, "section"): section = self.section @@ -195,21 +239,22 @@ section = 'main' if self.cp.has_section(section): - self.cp.remove_option(section, self.key) + self.cp.remove_option(section, key) # test if section is blank after remove option. if not self.cp.options(section): self.cp.remove_section(section) - def get_detail(self): + def install_info(self): """ - Show detail informantion if plugin is already installed. + Show configurations if plugin is already installed. + + return reStructuredText. + reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html """ - if self.enabled(): - return self.description - else: - return "" + return self.description - detail = property(get_detail) + def show_install_info(self): + return reSTify(self.install_info()) def get_type(self): type = "UNDEFINED" @@ -239,13 +284,44 @@ If this plugin needs parameters, provides form fields here. Any html and javascript are welcome. - Default: just output description. + If plugin does not need further configuration, simply return null str. """ - result = "<ul><li>" + _("Plugin name") + ": " + self.name + "\n" + \ - "<li>" + _("Type") + ": " + self.get_type() + "\n" + \ - "<li>" + _("Description") + ": " + self.description + "\n" - return result + return "" + + def show_install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + + return output reSTified html. + """ + header = """ +**%(id)s** +- %(t_name)s: %(name)s +- %(t_name)s: %(type)s + +**%(t_desc)s** + +%(desc)s + +%(detail)s +""" % { + 't_name': _('Name'), + 't_type': _('Type'), + 't_desc': _('Description'), + 'id':self.id.rsplit('.',1)[-1], + 'name': self.name, + 'type': self.get_type(), + 'desc': self.description, + 'detail': self.detail, + } + + header = reSTify(header) + form = self.install_config_form() or "" + return header + form + def enabled(self): """ Return True, if this plugin has been setup. Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-27 14:04:28 UTC (rev 46) @@ -9,7 +9,7 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-27 00:06+0800\n" +"PO-Revision-Date: 2008-08-27 21:52+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -144,12 +144,11 @@ msgstr "" #: pysvnmanager/controllers/repos.py:81 -#: pysvnmanager/hooks/plugins/__init__.py:244 msgid "Plugin name" msgstr "" #: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "" @@ -157,55 +156,55 @@ msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" @@ -245,42 +244,146 @@ msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log" +" and code differ as comment of bug status change." +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" msgstr "" @@ -421,7 +524,7 @@ #: pysvnmanager/templates/base.mako:36 #: pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "" @@ -502,7 +605,7 @@ msgstr "" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "" @@ -661,23 +764,23 @@ msgid "Repository name:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" msgstr "" #: pysvnmanager/templates/role/index.mako:5 @@ -761,3 +864,17 @@ msgid "User name:" msgstr "" +#~ msgid "" +#~ "\n" +#~ "**%(id)s**\n" +#~ "\n" +#~ "- %(t_name)s: %(name)s\n" +#~ "- %(t_name)s: %(type)s\n" +#~ "\n" +#~ "**%(t_desc)s**\n" +#~ "\n" +#~ "%(desc)s\n" +#~ "\n" +#~ "%(detail)s\n" +#~ msgstr "" + Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-27 14:04:28 UTC (rev 46) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: pySvnManager 0.2.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-27 00:06+0800\n" +"POT-Creation-Date: 2008-08-27 21:52+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -136,11 +136,11 @@ msgid "Id" msgstr "" -#: pysvnmanager/controllers/repos.py:81 pysvnmanager/hooks/plugins/__init__.py:244 +#: pysvnmanager/controllers/repos.py:81 msgid "Plugin name" msgstr "" -#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "" @@ -148,55 +148,55 @@ msgid "Remove selected hooks" msgstr "" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" "%(msg)s" msgstr "" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "" @@ -236,42 +236,146 @@ msgid "User %s logged out" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log and" +" code differ as comment of bug status change." +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" msgstr "" @@ -410,7 +514,7 @@ msgstr "" #: pysvnmanager/templates/base.mako:36 pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "" @@ -491,7 +595,7 @@ msgstr "" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "" @@ -650,23 +754,23 @@ msgid "Repository name:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" msgstr "" #: pysvnmanager/templates/role/index.mako:5 Modified: trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-08-27 14:04:28 UTC (rev 46) @@ -8,18 +8,17 @@ # Jiang Xin <wor...@gm...>, 2008. msgid "" msgstr "" -"Project-Id-Version: pysvnmanager\n" +"Project-Id-Version: pysvnmanager\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-08-27 00:07+0800\n" +"PO-Revision-Date: 2008-08-27 21:52+0800\n" "Last-Translator: Jiang Xin <wor...@gm...>\n" -"Language-Team: <zh...@li...>\n" +"Language-Team: <zh...@li...>\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.2\n" -"X-Generator: KBabel 1.11.4\n" #: pysvnmanager/controllers/authz.py:43 #: pysvnmanager/templates/authz/index.mako:152 @@ -147,12 +146,11 @@ msgstr "Id" #: pysvnmanager/controllers/repos.py:81 -#: pysvnmanager/hooks/plugins/__init__.py:244 msgid "Plugin name" msgstr "插件名称" #: pysvnmanager/controllers/repos.py:82 -#: pysvnmanager/hooks/plugins/__init__.py:245 +#: pysvnmanager/hooks/plugins/__init__.py:312 msgid "Type" msgstr "类型" @@ -160,7 +158,7 @@ msgid "Remove selected hooks" msgstr "删除选择的插件" -#: pysvnmanager/controllers/repos.py:116 +#: pysvnmanager/controllers/repos.py:119 #, python-format msgid "" "Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -169,12 +167,12 @@ "启用版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:119 +#: pysvnmanager/controllers/repos.py:122 #, python-format msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功启用版本库'%(repos)s'的插件'%(plugin)s'。 " -#: pysvnmanager/controllers/repos.py:140 +#: pysvnmanager/controllers/repos.py:143 #, python-format msgid "" "Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" @@ -183,17 +181,17 @@ "删除版本库'%(repos)s'的插件'%(plugin)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:143 +#: pysvnmanager/controllers/repos.py:146 #, python-format msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'的插件'%(plugin)s'。" -#: pysvnmanager/controllers/repos.py:146 +#: pysvnmanager/controllers/repos.py:149 #, python-format msgid "No plugin has been deleted for '%(repos)s'." msgstr "未删除版本库'%(repos)s'的插件。" -#: pysvnmanager/controllers/repos.py:155 +#: pysvnmanager/controllers/repos.py:158 #, python-format msgid "" "Create repository '%(repos)s' Failed. Error message:<br>\n" @@ -202,12 +200,12 @@ "创建版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:158 +#: pysvnmanager/controllers/repos.py:161 #, python-format msgid "Create repository '%(repos)s' success." msgstr "成功创建版本库'%(repos)s'。" -#: pysvnmanager/controllers/repos.py:171 +#: pysvnmanager/controllers/repos.py:174 #, python-format msgid "" "Delete repository '%(repos)s' Failed. Error message:<br>\n" @@ -216,7 +214,7 @@ "删除版本库'%(repos)s'失败。错误信息:<br>\n" "%(msg)s" -#: pysvnmanager/controllers/repos.py:174 +#: pysvnmanager/controllers/repos.py:177 #, python-format msgid "Delete blank repository '%(repos)s' success." msgstr "成功删除版本库'%(repos)s'。" @@ -256,44 +254,170 @@ msgid "User %s logged out" msgstr "用户 %s 登出" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 +msgid "Mantis bugtracking integration" +msgstr "整合 Mantis 缺陷跟踪系统" + +#: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 +msgid "" +"Integration Subversion with Mantis bugtracking. If commit-log has proper " +"format (contains bugid), it will change bug status and append commint-log" +" and code differ as comment of bug status change." +msgstr "" +"与 Mantis 缺陷跟踪系统整合。当提交日志符合特定的规范(包含 bugid),将会触发 Mantis 缺陷跟踪系统,将 bug " +"的状态修改为已修改,并将commit-log 以及代码变更添加到说明中。" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 msgid "check case insensitive" msgstr "大小写不敏感" -#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 msgid "A pre-commit hook to detect case-insensitive filename clashes." msgstr "在 pre-commit 钩子中执行,检查文件名大小写引起的文件名冲突。" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 +msgid "Check commit log message" +msgstr "检查提交说明" + +#: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 +msgid "User must provide commit-log message when checkin." +msgstr "用户在代码提交时,必须提供提交说明。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:13 +msgid "Send email notify for commit event" +msgstr "针对代码变更发出邮件通知" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:19 +msgid "" +"Send a notification email describing either a commit or a revprop-change " +"action on a Subversion repository." +msgstr "当对 Subversion 代码库中的代码修改或者修改状态,发出邮件通知。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:23 +msgid "" +"\n" +"You must provide proper options to commit-email.pl using the\n" +"configuration form for this plugin.\n" +"\n" +"You can simply just provide the email_addr as the options.\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"But to be more versitile, you can setup a path-based email \n" +"notifier.\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"Options:\n" +"\n" +"-m regex Regular expression to match committed path\n" +"--from email_address Email address for 'From:' (overrides -h)\n" +"-r email_address Email address for 'Reply-To:\n" +"-s subject_prefix Subject line prefix\n" +"--diff n Do not include diff in message (default: y)\n" +msgstr "" +"\n" +"您需要为代码变更的邮件通知设置参数。\n" +"\n" +"可以简单的提供邮件地址即可:\n" +"\n" +" [options] email_addr [email_addr ...]\n" +"\n" +"或者基于正则表达式,提供一个基于路径的代码变更的邮件通知。\n" +"\n" +" [-m regex1] [options] [email_addr ...]\n" +" [-m regex2] [options] [email_addr ...] \n" +" ...\n" +"\n" +"参数:\n" +"\n" +"-m regex 和提交路径相匹配的正则表达式\n" +"--from email_address 发信人地址\n" +"-r email_address 回复邮件地址\n" +"-s subject_prefix 标题的前缀,如 [Prefix]\n" +"--diff n 不包含代码差异(缺省包含)\n" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:75 +msgid "- Email notify enabled." +msgstr "- 邮件通知启用。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:77 +msgid "- Email notify disabled." +msgstr "- 邮件通知关闭。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:79 +msgid "- Parameters: ``" +msgstr "- 参数: ``" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:97 +msgid "Fill this form" +msgstr "填写表单" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:99 +msgid "Enable email notify." +msgstr "启用邮件通知。" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:101 +msgid "Enable" +msgstr "启用" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:103 +msgid "Disable" +msgstr "关闭" + +#: pysvnmanager/hooks/plugins/EmailNotify.py:104 +msgid "Input email notify configurations: " +msgstr "输入邮件通知配置参数: " + +#: pysvnmanager/hooks/plugins/EmailNotify.py:131 +msgid "Wrong configuration." +msgstr "错误的配置" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 msgid "mime-type and eol-style check" msgstr "文件类型和换行符设置检查" -#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 msgid "New file must provide svn:eol-style if not binary file." msgstr "新增的文本文件,必须设置换行符。" -#: pysvnmanager/hooks/plugins/__init__.py:84 +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 +msgid "Subversion client mergeinfo capability check" +msgstr "Subversion 客户端版本检查(mergeinfo 功能)" + +#: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 +msgid "Do not allow subversion client (<1.5) to checkin." +msgstr "不允许小于 1.5 的 subversion 客户端进行提交。" + +#: pysvnmanager/hooks/plugins/__init__.py:95 #, python-format msgid "repos '%s' not exist!" msgstr "版本库 %s 不存在!" -#: pysvnmanager/hooks/plugins/__init__.py:133 +#: pysvnmanager/hooks/plugins/__init__.py:152 #, python-format msgid "Conflict: plugin '%s' is modified by others." msgstr "冲突:插件'%s'被其他人修改了。" -#: pysvnmanager/hooks/plugins/__init__.py:160 -#: pysvnmanager/hooks/plugins/__init__.py:174 -#: pysvnmanager/hooks/plugins/__init__.py:190 -#: pysvnmanager/hooks/plugins/__init__.py:254 -#: pysvnmanager/hooks/plugins/__init__.py:261 -#: pysvnmanager/hooks/plugins/__init__.py:270 +#: pysvnmanager/hooks/plugins/__init__.py:180 +#: pysvnmanager/hooks/plugins/__init__.py:207 +#: pysvnmanager/hooks/plugins/__init__.py:213 +#: pysvnmanager/hooks/plugins/__init__.py:232 +#: pysvnmanager/hooks/plugins/__init__.py:330 +#: pysvnmanager/hooks/plugins/__init__.py:337 +#: pysvnmanager/hooks/plugins/__init__.py:346 msgid "Plugin not fully implemented." msgstr "插件未完全实现。" -#: pysvnmanager/hooks/plugins/__init__.py:246 +#: pysvnmanager/hooks/plugins/__init__.py:311 +msgid "Name" +msgstr "名称" + +#: pysvnmanager/hooks/plugins/__init__.py:313 msgid "Description" -msgstr "描述" +msgstr "说明" #: pysvnmanager/model/repos.py:39 #, python-format @@ -452,7 +576,7 @@ #: pysvnmanager/templates/base.mako:36 #: pysvnmanager/templates/repos/hooks.mako:5 -#: pysvnmanager/templates/repos/hooks.mako:189 +#: pysvnmanager/templates/repos/hooks.mako:182 msgid "Repos management" msgstr "版本库管理" @@ -533,7 +657,7 @@ msgstr "成功删除模组:" #: pysvnmanager/templates/authz/index.mako:597 -#: pysvnmanager/templates/repos/hooks.mako:195 +#: pysvnmanager/templates/repos/hooks.mako:188 msgid "Repository:" msgstr "版本库:" @@ -692,24 +816,24 @@ msgid "Repository name:" msgstr "版本库名称:" -#: pysvnmanager/templates/repos/hooks.mako:198 +#: pysvnmanager/templates/repos/hooks.mako:191 msgid "Add repository" msgstr "添加版本库" -#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/hooks.mako:192 #: pysvnmanager/templates/repos/remove.mako:5 #: pysvnmanager/templates/repos/remove.mako:49 #: pysvnmanager/templates/repos/remove.mako:67 msgid "Remove repository" msgstr "删除版本库" -#: pysvnmanager/templates/repos/hooks.mako:204 +#: pysvnmanager/templates/repos/hooks.mako:197 msgid "Uninstalled hooks:" msgstr "尚未安装的插件:" -#: pysvnmanager/templates/repos/hooks.mako:226 -msgid "Enable this hook" -msgstr "启用此插件" +#: pysvnmanager/templates/repos/hooks.mako:223 +msgid "Install this plugin" +msgstr "安装此插件" #: pysvnmanager/templates/role/index.mako:5 #: pysvnmanager/templates/role/index.mako:625 @@ -792,3 +916,17 @@ msgid "User name:" msgstr "用户名:" +#~ msgid "" +#~ "\n" +#~ "**%(id)s**\n" +#~ "\n" +#~ "- %(t_name)s: %(name)s\n" +#~ "- %(t_name)s: %(type)s\n" +#~ "\n" +#~ "**%(t_desc)s**\n" +#~ "\n" +#~ "%(desc)s\n" +#~ "\n" +#~ "%(detail)s\n" +#~ msgstr "" + Added: trunk/pysvnmanager/model/rest.py =================================================================== --- trunk/pysvnmanager/model/rest.py (rev 0) +++ trunk/pysvnmanager/model/rest.py 2008-08-27 14:04:28 UTC (rev 46) @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from docutils import core +from docutils.writers.html4css1 import Writer,HTMLTranslator + +class NoHeaderHTMLTranslator(HTMLTranslator): + def __init__(self, document): + HTMLTranslator.__init__(self,document) + self.head_prefix = ['','','','',''] + self.body_prefix = [] + self.body_suffix = [] + self.stylesheet = [] + + def astext(self): + return ''.join(self.body) + + +_w = Writer() +_w.translator_class = NoHeaderHTMLTranslator + +def reSTify(string): + result = core.publish_string(string,writer=_w) + if isinstance(result, basestring): + result = unicode(result, 'utf-8') + return result Modified: trunk/pysvnmanager/templates/repos/hooks.mako =================================================================== --- trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-26 16:18:33 UTC (rev 45) +++ trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-27 14:04:28 UTC (rev 46) @@ -15,14 +15,14 @@ document.getElementById('repos_list_box').style.visibility = 'visible'; document.getElementById('repos_list_box').style.position = 'relative'; - document.getElementById('new_hook_list_box').style.visibility = 'hidden'; - document.getElementById('new_hook_list_box').style.position = 'absolute'; + document.getElementById('uninstall_hook_box').style.visibility = 'hidden'; + document.getElementById('uninstall_hook_box').style.position = 'absolute'; - document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; - document.getElementById('new_hook_setting_box').style.position = 'absolute'; + document.getElementById('hook_setting_box').style.visibility = 'hidden'; + document.getElementById('hook_setting_box').style.position = 'absolute'; - document.getElementById('remove_hook_box').style.visibility = 'visible'; - document.getElementById('remove_hook_box').style.position = 'relative'; + document.getElementById('installed_hook_box').style.visibility = 'visible'; + document.getElementById('installed_hook_box').style.position = 'relative'; } @@ -68,7 +68,7 @@ if (name=='...'||name=='') { - document.getElementById('remove_hook_form_content').innerHTML = ""; + document.getElementById('installed_hook_form_contents').innerHTML = ""; show_init_form(); } else @@ -84,8 +84,8 @@ }); new Ajax.Updater( - 'remove_hook_form_content', - '${h.url_for(controller="repos", action="get_remove_hook_form_content")}', + 'installed_hook_form_contents', + '${h.url_for(controller="repos", action="get_installed_hook_form")}', {asynchronous:true, evalScripts:true, method:'post', onComplete: function(request) @@ -108,15 +108,15 @@ eval(code); if (total==1) { - document.getElementById('new_hook_list_box').style.visibility = 'hidden'; - document.getElementById('new_hook_list_box').style.position = 'absolute'; - document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; - document.getElementById('new_hook_setting_box').style.position = 'absolute'; + docum... [truncated message content] |
From: <ji...@us...> - 2008-08-26 16:18:28
|
Revision: 45 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=45&view=rev Author: jiangx Date: 2008-08-26 16:18:33 +0000 (Tue, 26 Aug 2008) Log Message: ----------- add unittest; i18n; refactor plugins Modified Paths: -------------- trunk/config/Makefile trunk/development.ini trunk/pySvnManager.egg-info/paste_deploy_config.ini_tmpl trunk/pysvnmanager/controllers/authz.py trunk/pysvnmanager/controllers/check.py trunk/pysvnmanager/controllers/logs.py trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/controllers/role.py trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/model/hooks.py trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/model/svnauthz.py trunk/pysvnmanager/templates/authz/index.mako trunk/pysvnmanager/templates/base.mako trunk/pysvnmanager/templates/check/index.mako trunk/pysvnmanager/templates/repos/hooks.mako trunk/pysvnmanager/templates/role/index.mako trunk/pysvnmanager/tests/functional/test_authz.py trunk/pysvnmanager/tests/functional/test_check.py trunk/pysvnmanager/tests/functional/test_repos.py trunk/pysvnmanager/tests/test_repos.py trunk/test.ini Added Paths: ----------- trunk/pysvnmanager/public/css/ trunk/pysvnmanager/public/css/common.css trunk/pysvnmanager/public/img/ trunk/pysvnmanager/public/img/alert.png trunk/pysvnmanager/public/img/attention.png trunk/pysvnmanager/public/img/icon-error.png trunk/pysvnmanager/public/img/icon-info.png trunk/pysvnmanager/tests/data/ trunk/pysvnmanager/tests/data/svnroot.tar.bz2 Modified: trunk/config/Makefile =================================================================== --- trunk/config/Makefile 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/config/Makefile 2008-08-26 16:18:33 UTC (rev 45) @@ -2,7 +2,7 @@ SRCDIR=../pysvnmanager/config CONFFILE=localconfig.py svn.access svn.passwd svn.access.test svn.passwd.test -all: $(CONFFILE) +all: $(CONFFILE) ../svnroot.test clean: @-rm $(CONFFILE) >/dev/null 2>&1 @@ -15,5 +15,9 @@ %.test: $(SRCDIR)/%.in cp $< $@ +../svnroot.test: ../pysvnmanager/tests/data/svnroot.tar.bz2 + @if [ ! -d $@ ]; then \ + tar -C .. -jxvf $< ; \ + fi .PHONY : all clean Modified: trunk/development.ini =================================================================== --- trunk/development.ini 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/development.ini 2008-08-26 16:18:33 UTC (rev 45) @@ -55,7 +55,7 @@ authz_file = %(here)s/config/svn.access # svn repository root path -repos_root = %(here)s/svnroot/ +repos_root = %(here)s/svnroot #[filter:proxy-prefix] #use = egg:PasteDeploy#prefix @@ -77,7 +77,7 @@ [logger_pysvnmanager] level = DEBUG -handlers = console +handlers = qualname = pysvnmanager [handler_console] Modified: trunk/pySvnManager.egg-info/paste_deploy_config.ini_tmpl =================================================================== --- trunk/pySvnManager.egg-info/paste_deploy_config.ini_tmpl 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pySvnManager.egg-info/paste_deploy_config.ini_tmpl 2008-08-26 16:18:33 UTC (rev 45) @@ -49,6 +49,8 @@ # authz_file: svn authz config file with administrative extension. (ossxp.com) authz_file = %(here)s/config/svn.access +# svn repository root path +repos_root = %(here)s/svnroot #[filter:proxy-prefix] #use = egg:PasteDeploy#prefix @@ -56,7 +58,7 @@ # Logging configuration [loggers] -keys = root +keys = root, pysvnmanager [handlers] keys = console @@ -68,6 +70,11 @@ level = INFO handlers = console +[logger_pysvnmanager] +level = DEBUG +handlers = +qualname = pysvnmanager + [handler_console] class = StreamHandler args = (sys.stderr,) Modified: trunk/pysvnmanager/controllers/authz.py =================================================================== --- trunk/pysvnmanager/controllers/authz.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/controllers/authz.py 2008-08-26 16:18:33 UTC (rev 45) @@ -3,6 +3,7 @@ from pysvnmanager.lib.base import * from pysvnmanager.model.svnauthz import * +from pysvnmanager.model import repos as _repos log = logging.getLogger(__name__) @@ -14,8 +15,20 @@ self.login_as = session.get('user') # Used as checked in user to rcs file. self.authz.login_as = self.login_as - self.reposlist = self.authz.get_manageable_repos_list(self.login_as) + self.reposlist = set(self.authz.get_manageable_repos_list(self.login_as)) + # self.reposlist_new is what in ReposRoot directory. + self.reposlist_real = set(_repos.Repos(cfg.repos_root).repos_list) + self.reposlist_real.add('/') + + self.reposlist_set = self.reposlist & self.reposlist_real + self.reposlist_unexist = self.reposlist - self.reposlist_real + + if self.authz.is_super_user(self.login_as): + self.reposlist_unset = self.reposlist_real - self.reposlist + else: + self.reposlist_unset = set() + def __before__(self, action): super(AuthzController, self).__before__(action) if not self.reposlist: @@ -23,6 +36,7 @@ def index(self): c.revision = self.authz.version + # used for functional test. c.reposlist = self.reposlist all_avail_users = [] @@ -53,10 +67,18 @@ msg += 'id[0]="%s";' % '...' msg += 'name[0]="%s";\n' % _("Please choose...") total += 1; - for reposname in self.reposlist: + for reposname in sorted(self.reposlist_set): msg += 'id[%d]="%s";' % (total, reposname) msg += 'name[%d]="%s";\n' % (total, reposname) total += 1; + for reposname in sorted(self.reposlist_unexist): + msg += 'id[%d]="%s";' % (total, reposname) + msg += 'name[%d]="%s";\n' % (total, reposname+' (?)') + total += 1; + for reposname in sorted(self.reposlist_unset): + msg += 'id[%d]="%s";' % (total, reposname) + msg += 'name[%d]="%s";\n' % (total, reposname+' (!)') + total += 1; msg += 'total=%d;\n' % total msg += 'revision="%s";\n' % self.authz.version return msg @@ -67,6 +89,9 @@ d = request.params select = d.get('select') repos = self.authz.get_repos(select) + if not repos: + log.warning("Repos '%s' not exists. Create authz config automatically." % select) + repos = self.authz.add_repos(select) if repos: # get javascript code for top_form's role_selector @@ -140,6 +165,10 @@ repos = self.authz.add_repos(reposname) else: repos = self.authz.get_repos(reposname) + if not repos: + log.warning("Repos '%s' not exists. Create authz config automatically." % reposname) + repos = self.authz.add_repos(reposname) + if not repos: raise Exception, _("Repository %s not exist.") % reposname @@ -163,7 +192,7 @@ self.authz.set_rules(reposname, path, rules); self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) @@ -186,7 +215,7 @@ self.authz.del_module(reposname, path); self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) Modified: trunk/pysvnmanager/controllers/check.py =================================================================== --- trunk/pysvnmanager/controllers/check.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/controllers/check.py 2008-08-26 16:18:33 UTC (rev 45) @@ -3,6 +3,7 @@ from pysvnmanager.lib.base import * from pysvnmanager.model.svnauthz import * +from pysvnmanager.model import repos as _repos log = logging.getLogger(__name__) @@ -15,6 +16,11 @@ # Used as checked in user to rcs file. self.authz.login_as = self.login_as self.reposlist = self.authz.get_manageable_repos_list(self.login_as) + if self.authz.is_super_user(self.login_as): + for i in _repos.Repos(cfg.repos_root).repos_list: + if i not in self.reposlist: + self.reposlist.append(i) + self.reposlist = sorted(self.reposlist) def __before__(self, action): super(CheckController, self).__before__(action) Modified: trunk/pysvnmanager/controllers/logs.py =================================================================== --- trunk/pysvnmanager/controllers/logs.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/controllers/logs.py 2008-08-26 16:18:33 UTC (rev 45) @@ -155,7 +155,7 @@ self.rcslog.restore(id) self.rcslog.backup(comment=log_message, user=self.login_as) except Exception, e: - msg = "%s" % e + msg = e.message if isinstance(msg, str): msg = unicode(msg, 'utf-8') c.msg = _("Rollback failed: %s") % msg Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-26 16:18:33 UTC (rev 45) @@ -50,7 +50,7 @@ def get_plugin_list(self): reposname = request.params.get('select') - h = _hooks.Hooks(self.repos_root + reposname) + h = _hooks.Hooks(self.repos_root + '/' + reposname) total = 0; msg = '' @@ -68,23 +68,31 @@ def get_remove_hook_form_content(self): reposname = request.params.get('select') - h = _hooks.Hooks(self.repos_root + reposname) + h = _hooks.Hooks(self.repos_root + '/' + reposname) msg = '' if len(h.applied_plugins) > 0: msg += _("Installed hooks:") msg += "<br>\n" num = 0 - + + msg += "<table class='hidden'>\n" + msg += "<tr><th align='left'></th>" + \ + "<th align='left'>" + _("Id") + "</th>" + \ + "<th align='left'>" + _("Plugin name") + "</th>" + \ + "<th align='left'>" + _("Type") + "</th>" + \ + "</tr>\n" for name in h.applied_plugins.keys(): + msg += "<tr><td width='1' rolspan='2'>" msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { 'num': num, 'plugin': name, } - desc = h.plugins[name].description - detail = h.plugins[name].detail - msg += '%(plugin)s - %(desc)s' % { - 'plugin': name, 'name': h.plugins[name].name, 'desc': desc, } - if detail and detail != desc: - msg += ' - %(detail)s' % { 'detail': detail, } - msg += '<br>\n' + msg += "</td>\n" + msg += "<td>" + name + "</td>\n" + msg += "<td>" + h.plugins[name].name + "</td>\n" + msg += "<td>" + h.plugins[name].get_type() + "</td>\n" + msg += "</tr>\n" + msg += "<tr><td></td><td colspan='3'>" + h.plugins[name].detail + "</td></tr>\n" + num += 1 + msg += "</table>\n" msg += '<input type="submit" name="remove_hook" value="%s">\n' % _("Remove selected hooks") return msg @@ -92,42 +100,50 @@ def get_hook_form(self): reposname = request.params.get('repos') pluginname = request.params.get('plugin') - h = _hooks.Hooks(self.repos_root + reposname) + h = _hooks.Hooks(self.repos_root + '/' + reposname) - return h.plugins[pluginname].show_form() + return h.plugins[pluginname].install_config_form() def apply_new_hook(self): try: d = request.params reposname = d.get("_repos") pluginname = d.get("_plugin") - h = _hooks.Hooks(self.repos_root + reposname) + h = _hooks.Hooks(self.repos_root + '/' + reposname) plugin = h.plugins[pluginname] - plugin.set_plugin(d) + plugin.install(d) except Exception, e: - result = _("Apply plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "plugin": pluginname, "repos":reposname, "msg": e} + result = "<div class='error'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "plugin": pluginname, "repos":reposname, "msg": e.message} + "</div>" else: - result = _("Apply plugin '%(plugin)s on '%(repos)s' success.") % { - "plugin": pluginname, "repos":reposname} + result = "<div class='info'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' success.") % { + "plugin": pluginname, "repos":reposname} + "</div>" return result def remove_hook(self): - try: - d = request.params - reposname = d.get("_repos") - h = _hooks.Hooks(self.repos_root + reposname) - for i in d.keys(): - if "pluginid_" in i: - pluginname = d[i] - plugin = h.plugins[pluginname] - plugin.delete_plugin() - except Exception, e: - result = _("Delete plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "plugin": pluginname, "repos":reposname, "msg": e} + plugin_list=[] + d = request.params + reposname = d.get("_repos") + for i in d.keys(): + if "pluginid_" in i: + plugin_list.append(d[i]) + + if plugin_list: + log.debug("plugin_list:" + ','.join(plugin_list)) + try: + hookobj = _hooks.Hooks(self.repos_root + '/' + reposname) + for pluginname in plugin_list: + hookobj.plugins[pluginname].reload() + hookobj.plugins[pluginname].uninstall() + log.info("my delete plugin %s, %s" % (pluginname, hookobj.plugins[pluginname].name)) + except Exception, e: + result = "<div class='error'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "plugin": ", ".join(plugin_list), "repos":reposname, "msg": e.message} + "</div>" + else: + result = "<div class='info'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' success.") % { + "plugin": ", ".join(plugin_list), "repos":reposname} + "</div>" else: - result = _("Delete plugin '%(plugin)s on '%(repos)s' success.") % { - "plugin": pluginname, "repos":reposname} + result = "<div class='error'>" + _("No plugin has been deleted for '%(repos)s'.") % {"repos":reposname} + "</div>" return result def create_submit(self): @@ -136,10 +152,10 @@ reposname = d.get("reposname") self.repos.create(reposname) except Exception, e: - result = _("Create repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "repos":reposname, "msg": e} + result = "<div class='error'>" + _("Create repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "repos":reposname, "msg": e.message} + "</div>" else: - result = _("Create repository '%(repos)s' success.") % {"repos":reposname} + result = "<div class='info'>" + _("Create repository '%(repos)s' success.") % {"repos":reposname} + "</div>" return result def create(self): @@ -152,10 +168,10 @@ reposname = d.get("repos_list") self.repos.delete(reposname) except Exception, e: - result = _("Delete repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { - "repos":reposname, "msg": e} + result = "<div class='error'>" + _("Delete repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "repos":reposname, "msg": e.message} + "</div>" else: - result = _("Delete blank repository '%(repos)s' success.") % {"repos":reposname} + result = "<div class='info'>" + _("Delete blank repository '%(repos)s' success.") % {"repos":reposname} + "</div>" return result def remove(self): Modified: trunk/pysvnmanager/controllers/role.py =================================================================== --- trunk/pysvnmanager/controllers/role.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/controllers/role.py 2008-08-26 16:18:33 UTC (rev 45) @@ -107,7 +107,7 @@ self.authz.set_group(rolename, member_list, autodrop=autodrop) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) @@ -128,7 +128,7 @@ self.authz.del_group(rolename) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) @@ -149,7 +149,7 @@ self.authz.add_alias(aliasname, username) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) @@ -170,7 +170,7 @@ self.authz.del_alias(aliasname) self.authz.save(revision, comment=log_message) except Exception, e: - msg = get_unicode(e[0]) + msg = get_unicode(e.message) log.info(log_message) if msg: log.error(msg) Modified: trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-26 16:18:33 UTC (rev 45) @@ -1,31 +1,65 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from pysvnmanager.hooks.plugins import PluginBase +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ class CaseInsensitive(PluginBase): - name = "check case insensitive" - description = "A pre-commit hook to detect case-insensitive filename clashes." - option = "case_insensitive" + + # Brief name for this plugin. + name = _("check case insensitive") + + # Longer description for this plugin. + description = _("A pre-commit hook to detect case-insensitive filename clashes.") + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "case_insensitive" value = "yes" - def is_set(self): - return self.get_config(self.option) == self.value + def enabled(self): + """ + Return True, if this plugin has been setup. + Simply call 'has_config()'. + """ + return self.has_config() - def show(self): + def get_detail(self): + """ + Show detail informantion if plugin is already installed. + """ return self.description - def show_form(self): - return self.description + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. - def delete_plugin(self): - self.del_config(self.option) - self.write() + Default: just output description. + """ + return super(CaseInsensitive, self).install_config_form() + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() - def set_plugin(self, form=None): - self.set_config(self.option, self.value) - self.write() + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + def execute(repospath=""): """ Generate and return a hooks plugin object @@ -34,4 +68,4 @@ @rtype: Plugin @return: Plugin object """ - return CaseInsensitive(repospath) \ No newline at end of file + return CaseInsensitive(repospath) Modified: trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-26 16:18:33 UTC (rev 45) @@ -1,31 +1,65 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from pysvnmanager.hooks.plugins import PluginBase +from pysvnmanager.hooks.plugins import * +from pysvnmanager.hooks.plugins import _ class EolStyleCheck(PluginBase): - name = "mime-type and eol-style check" - description = "New file must provide svn:eol-style if not binary file." - option = "check_eol_style" + + # Brief name for this plugin. + name = _("mime-type and eol-style check") + + # Longer description for this plugin. + description = _("New file must provide svn:eol-style if not binary file.") + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = T_PRE_COMMIT + + # Plugin config option/value in config ini file. + key = "check_eol_style" value = "yes" - def is_set(self): - return self.get_config(self.option) == self.value + def enabled(self): + """ + Return True, if this plugin has been setup. + Simply call 'has_config()'. + """ + return self.has_config() - def show(self): + def get_detail(self): + """ + Show detail informantion if plugin is already installed. + """ return self.description - def show_form(self): - return self.description + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. - def delete_plugin(self): - self.del_config(self.option) - self.write() + Default: just output description. + """ + return super(EolStyleCheck, self).install_config_form() + + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + self.unset_config() + self.save() - def set_plugin(self, form=None): - self.set_config(self.option, self.value) - self.write() + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + Form fields in setup_config() will pass as params. + """ + self.set_config() + self.save() + def execute(repospath=""): """ Generate and return a hooks plugin object @@ -34,4 +68,4 @@ @rtype: Plugin @return: Plugin object """ - return EolStyleCheck(repospath) \ No newline at end of file + return EolStyleCheck(repospath) Modified: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-26 16:18:33 UTC (rev 45) @@ -1,11 +1,24 @@ -# create a list of extension actions from the package directory +# -*- coding: utf-8 -*- + import ConfigParser import os +import time +import logging +# i18n works only as pysvnmanager (a pylons app) model. +from pylons import config +if config.get('package') and not config.has_key('unittest'): + from pylons.i18n import _ +else: + _ = lambda x:x + +log = logging.getLogger(__name__) + def getPackageModules(packagefile): - """ Return a list of modules for a package, omitting any modules - starting with an underscore. """ + Return a list of modules for a package, omitting any modules + starting with an underscore. + """ import os, re packagedir = os.path.dirname(packagefile) @@ -38,67 +51,223 @@ module = getattr(module, comp) return module +T_START_COMMIT = 1 +T_PRE_COMMIT = 2 +T_POST_COMMIT = 3 +T_PRE_REVPROP_CHANGE = 4 +T_POST_REVPROP_CHANGE = 5 +T_PRE_LOCK = 6 +T_POST_LOCK = 7 +T_PRE_UNLOCK = 8 +T_POST_UNLOCK = 9 class PluginBase(object): """ Base class for hook plugins """ + # Brief name for this plugin. name = "" + + # Longer description for this plugin. description = "" + + # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK + type = 0 + # Store file timestamp as plugin revision, avoid config confliction. + # Not edit it manually. + revision = "" + def __init__(self, repospath): + # Test if repository is exists. self.__repospath = repospath if not os.path.exists(self.__repospath): - raise Exception, "repos '%s' not exist!" % os.path.basename(self.__repospath) + raise Exception, _("repos '%s' not exist!") % os.path.basename(self.__repospath) + + # Read configuration from the default config ini file. self.__configfile = "%s/conf/hooks.ini" % self.__repospath - self.cp = ConfigParser.ConfigParser() self.__read_config() - def __read_config(self): - if os.path.exists(self.__configfile): + def __read_config(self, force=False): + # only read config file if out-of-date. + if force or self.__is_outofdate(): + #log.debug("config is outofdate for '%s'." % self.name) + timestamp = os.path.getmtime(self.__configfile) + + # ConfigParser has not cleanup method, so we initial it again. + self.cp = ConfigParser.ConfigParser() self.cp.read(self.__configfile) - else: + + # Set timestamp as revision + self.revision = timestamp + # if config file not exist. + elif not self.revision: + self.cp = ConfigParser.ConfigParser() self.cp.add_section('main') + self.revision = time.time() - def write(self): + def __is_outofdate(self): + """ + Test if timestamp of the config file is the same we load it last time. + """ + if os.path.exists(self.__configfile): + timestamp = os.path.getmtime(self.__configfile) + if not self.revision or self.revision != timestamp: + return True + # not out-of-date if config file not exist, or timestamp not changed. + return False + + def reload(self, force=True): + """ + Reload the default config ini file, if out-of-date. + """ + self.__read_config(force) + + def save(self): + """ + Save config to the default config ini file. + + If the file modified time is different with the time last load, Conflict raises. + """ + # Test if timestamp of the config file is the same we load it last time. + if self.__is_outofdate(): + raise Exception(_("Conflict: plugin '%s' is modified by others.") % self.name) + + # Save to file. fp = open(self.__configfile, 'w') self.cp.write(fp) + fp.close() + + # Update revision as file timestamp. + self.revision = os.path.getmtime(self.__configfile) - def get_config(self, option, default="", section='main'): + def get_config(self, key, default="", section='main'): + """ + Get config from the default config file. + """ if not self.cp.has_section(section): self.cp.add_section(section) - if self.cp.has_option(section, option): - result = self.cp.get(section, option) + if self.cp.has_option(section, key): + result = self.cp.get(section, key) else: result = default return result - def set_config(self, option, value="", section='main'): + def has_config(self): + """ + Test if self.key = self.value is in the default config ini file. + """ + if not hasattr(self, "key") or not hasattr(self, "value"): + raise Exception, _("Plugin not fully implemented.") + + if hasattr(self, "section"): + section = self.section + else: + section = 'main' + + return self.get_config(self.key, section=section) == self.value + + def set_config(self): + """ + add self.key = self.value to default config ini file. + """ + if not hasattr(self, "key") or not hasattr(self, "value"): + raise Exception, _("Plugin not fully implemented.") + + if hasattr(self, "section"): + section = self.section + else: + section = 'main' + if not self.cp.has_section(section): self.cp.add_section(section) - self.cp.set(section, option, value) + self.cp.set(section, self.key, self.value) - def del_config(self, option, section='main'): + def unset_config(self): + """ + Remove self.key from default config ini file. + """ + if not hasattr(self, "key") or not hasattr(self, "value"): + raise Exception, _("Plugin not fully implemented.") + + if hasattr(self, "section"): + section = self.section + else: + section = 'main' + if self.cp.has_section(section): - self.cp.remove_option(section, option) + self.cp.remove_option(section, self.key) + # test if section is blank after remove option. if not self.cp.options(section): self.cp.remove_section(section) - - def is_set(self): - raise Exception, "Not implement." - def show(self): - return self.description + def get_detail(self): + """ + Show detail informantion if plugin is already installed. + """ + if self.enabled(): + return self.description + else: + return "" - detail = property(show) + detail = property(get_detail) - def show_form(self): - return self.description + def get_type(self): + type = "UNDEFINED" + if self.type == T_START_COMMIT: + type = "start-commit" + elif self.type == T_PRE_COMMIT: + type = "pre-commit" + elif self.type == T_POST_COMMIT: + type = "post-commit" + elif self.type == T_PRE_REVPROP_CHANGE: + type = "pre-revprop-change" + elif self.type == T_POST_REVPROP_CHANGE: + type = "post-revprop-change" + elif self.type == T_PRE_LOCK: + type = "pre-lock" + elif self.type == T_POST_LOCK: + type = "post-lock" + elif self.type == T_PRE_UNLOCK: + type = "pre-unlock" + elif self.type == T_POST_UNLOCK: + type = "post-unlock" + return type + + def install_config_form(self): + """ + This method will be called to build setup configuration form. + If this plugin needs parameters, provides form fields here. + Any html and javascript are welcome. + + Default: just output description. + """ + result = "<ul><li>" + _("Plugin name") + ": " + self.name + "\n" + \ + "<li>" + _("Type") + ": " + self.get_type() + "\n" + \ + "<li>" + _("Description") + ": " + self.description + "\n" + return result + + def enabled(self): + """ + Return True, if this plugin has been setup. + Simply call 'has_config()'. + """ + raise Exception, _("Plugin not fully implemented.") - def delete_plugin(self): - raise Exception, "Not implement." + def uninstall(self): + """ + Uninstall hooks-plugin from repository. + Simply call 'unset_config()' and 'save()'. + """ + raise Exception, _("Plugin not fully implemented.") - def set_plugin(self, form=None): - raise Exception, "Not implement." + def install(self, params=None): + """ + Install hooks-plugin from repository. + Simply call 'set_config()' and 'save()'. + + Form fields in setup_config() will pass as params. + """ + raise Exception, _("Plugin not fully implemented.") modules = getPackageModules(__file__) Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-08-26 16:18:33 UTC (rev 45) @@ -9,7 +9,7 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-07-31 09:21+0800\n" +"PO-Revision-Date: 2008-08-27 00:06+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -18,27 +18,27 @@ "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.2\n" -#: pysvnmanager/controllers/authz.py:29 -#: pysvnmanager/templates/authz/index.mako:159 +#: pysvnmanager/controllers/authz.py:43 +#: pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:30 -#: pysvnmanager/templates/authz/index.mako:161 +#: pysvnmanager/controllers/authz.py:44 +#: pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:31 -#: pysvnmanager/templates/authz/index.mako:163 +#: pysvnmanager/controllers/authz.py:45 +#: pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:36 pysvnmanager/controllers/role.py:50 +#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 #: pysvnmanager/controllers/role.py:70 -#: pysvnmanager/templates/authz/index.mako:155 +#: pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 #: pysvnmanager/templates/role/index.mako:37 @@ -47,9 +47,9 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:39 pysvnmanager/controllers/role.py:55 +#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 #: pysvnmanager/controllers/role.py:72 -#: pysvnmanager/templates/authz/index.mako:157 +#: pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 #: pysvnmanager/templates/role/index.mako:42 @@ -58,8 +58,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:54 pysvnmanager/controllers/authz.py:74 -#: pysvnmanager/controllers/check.py:83 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 +#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 +#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -67,31 +68,31 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:135 +#: pysvnmanager/controllers/authz.py:160 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:144 +#: pysvnmanager/controllers/authz.py:173 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:152 +#: pysvnmanager/controllers/authz.py:181 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:158 +#: pysvnmanager/controllers/authz.py:187 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:183 +#: pysvnmanager/controllers/authz.py:212 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:63 +#: pysvnmanager/controllers/check.py:69 #: pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" @@ -124,16 +125,91 @@ msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:148 +#: pysvnmanager/controllers/logs.py:152 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:157 +#: pysvnmanager/controllers/logs.py:161 #, python-format msgid "Rollback failed: %s" msgstr "" +#: pysvnmanager/controllers/repos.py:74 +msgid "Installed hooks:" +msgstr "" + +#: pysvnmanager/controllers/repos.py:80 +msgid "Id" +msgstr "" + +#: pysvnmanager/controllers/repos.py:81 +#: pysvnmanager/hooks/plugins/__init__.py:244 +msgid "Plugin name" +msgstr "" + +#: pysvnmanager/controllers/repos.py:82 +#: pysvnmanager/hooks/plugins/__init__.py:245 +msgid "Type" +msgstr "" + +#: pysvnmanager/controllers/repos.py:96 +msgid "Remove selected hooks" +msgstr "" + +#: pysvnmanager/controllers/repos.py:116 +#, python-format +msgid "" +"Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:119 +#, python-format +msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:140 +#, python-format +msgid "" +"Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:143 +#, python-format +msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:146 +#, python-format +msgid "No plugin has been deleted for '%(repos)s'." +msgstr "" + +#: pysvnmanager/controllers/repos.py:155 +#, python-format +msgid "" +"Create repository '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:158 +#, python-format +msgid "Create repository '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:171 +#, python-format +msgid "" +"Delete repository '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:174 +#, python-format +msgid "Delete blank repository '%(repos)s' success." +msgstr "" + #: pysvnmanager/controllers/role.py:103 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" @@ -169,6 +245,60 @@ msgid "User %s logged out" msgstr "" +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +msgid "check case insensitive" +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +msgid "A pre-commit hook to detect case-insensitive filename clashes." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +msgid "mime-type and eol-style check" +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +msgid "New file must provide svn:eol-style if not binary file." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:84 +#, python-format +msgid "repos '%s' not exist!" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:133 +#, python-format +msgid "Conflict: plugin '%s' is modified by others." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:160 +#: pysvnmanager/hooks/plugins/__init__.py:174 +#: pysvnmanager/hooks/plugins/__init__.py:190 +#: pysvnmanager/hooks/plugins/__init__.py:254 +#: pysvnmanager/hooks/plugins/__init__.py:261 +#: pysvnmanager/hooks/plugins/__init__.py:270 +msgid "Plugin not fully implemented." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:246 +msgid "Description" +msgstr "" + +#: pysvnmanager/model/repos.py:39 +#, python-format +msgid "Repos root does not exist: %s" +msgstr "" + +#: pysvnmanager/model/repos.py:68 +#, python-format +msgid "Repos %s already exists." +msgstr "" + +#: pysvnmanager/model/repos.py:137 +#, python-format +msgid "Repos %s is not a blank repository." +msgstr "" + #: pysvnmanager/model/svnauthz.py:61 msgid "Name is not given." msgstr "" @@ -222,22 +352,22 @@ msgid "%s is referenced by [%s]." msgstr "" -#: pysvnmanager/model/svnauthz.py:1770 +#: pysvnmanager/model/svnauthz.py:1769 #, python-format msgid "User %(username)s has Full (RW) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1772 +#: pysvnmanager/model/svnauthz.py:1771 #, python-format msgid "User %(username)s has ReadOnly (RO) rights for module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1774 +#: pysvnmanager/model/svnauthz.py:1773 #, python-format msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" msgstr "" -#: pysvnmanager/model/svnauthz.py:1812 +#: pysvnmanager/model/svnauthz.py:1813 #, python-format msgid "" "\n" @@ -249,7 +379,7 @@ "\n" msgstr "" -#: pysvnmanager/model/svnauthz.py:1831 +#: pysvnmanager/model/svnauthz.py:1832 #, python-format msgid "" "\n" @@ -267,152 +397,163 @@ "%(sep)s\n" msgstr "" -#: pysvnmanager/templates/base.mako:11 +#: pysvnmanager/templates/base.mako:12 msgid "Loading, please wait..." msgstr "" -#: pysvnmanager/templates/base.mako:27 +#: pysvnmanager/templates/base.mako:19 +msgid "Clear message" +msgstr "" + +#: pysvnmanager/templates/base.mako:33 msgid "Check permissions" msgstr "" -#: pysvnmanager/templates/base.mako:28 +#: pysvnmanager/templates/base.mako:34 msgid "Role management" msgstr "" -#: pysvnmanager/templates/base.mako:29 +#: pysvnmanager/templates/base.mako:35 #: pysvnmanager/templates/authz/index.mako:5 -#: pysvnmanager/templates/authz/index.mako:603 +#: pysvnmanager/templates/authz/index.mako:590 msgid "ACL management" msgstr "" -#: pysvnmanager/templates/base.mako:30 -msgid "Logs" +#: pysvnmanager/templates/base.mako:36 +#: pysvnmanager/templates/repos/hooks.mako:5 +#: pysvnmanager/templates/repos/hooks.mako:189 +msgid "Repos management" msgstr "" -#: pysvnmanager/templates/base.mako:32 +#: pysvnmanager/templates/base.mako:37 +msgid "Change log" +msgstr "" + +#: pysvnmanager/templates/base.mako:39 msgid "Logout" msgstr "" -#: pysvnmanager/templates/authz/index.mako:165 +#: pysvnmanager/templates/authz/index.mako:158 msgid "User:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:174 +#: pysvnmanager/templates/authz/index.mako:167 msgid "Readonly" msgstr "" -#: pysvnmanager/templates/authz/index.mako:178 -#: pysvnmanager/templates/authz/index.mako:677 +#: pysvnmanager/templates/authz/index.mako:171 +#: pysvnmanager/templates/authz/index.mako:664 msgid "Full" msgstr "" -#: pysvnmanager/templates/authz/index.mako:182 -#: pysvnmanager/templates/authz/index.mako:678 +#: pysvnmanager/templates/authz/index.mako:175 +#: pysvnmanager/templates/authz/index.mako:665 msgid "Denied" msgstr "" -#: pysvnmanager/templates/authz/index.mako:380 +#: pysvnmanager/templates/authz/index.mako:373 msgid "No rights selected! Please check proper rights for selected users." msgstr "" -#: pysvnmanager/templates/authz/index.mako:391 +#: pysvnmanager/templates/authz/index.mako:384 msgid "Unknown rights: " msgstr "" -#: pysvnmanager/templates/authz/index.mako:479 +#: pysvnmanager/templates/authz/index.mako:472 msgid "Please input module path." msgstr "" -#: pysvnmanager/templates/authz/index.mako:485 +#: pysvnmanager/templates/authz/index.mako:478 msgid "Please input repository name." msgstr "" -#: pysvnmanager/templates/authz/index.mako:490 +#: pysvnmanager/templates/authz/index.mako:483 msgid "Save failed." msgstr "" -#: pysvnmanager/templates/authz/index.mako:510 +#: pysvnmanager/templates/authz/index.mako:503 msgid "Update ACL failed:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:517 +#: pysvnmanager/templates/authz/index.mako:508 msgid "Update ACL successfully." msgstr "" -#: pysvnmanager/templates/authz/index.mako:539 +#: pysvnmanager/templates/authz/index.mako:529 msgid "No path selected." msgstr "" -#: pysvnmanager/templates/authz/index.mako:544 +#: pysvnmanager/templates/authz/index.mako:534 msgid "Are you sure to delete module:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:546 -#: pysvnmanager/templates/role/index.mako:450 -#: pysvnmanager/templates/role/index.mako:541 +#: pysvnmanager/templates/authz/index.mako:536 +#: pysvnmanager/templates/role/index.mako:446 +#: pysvnmanager/templates/role/index.mako:531 msgid "Click Ok to proceed, or click cancel" msgstr "" -#: pysvnmanager/templates/authz/index.mako:567 +#: pysvnmanager/templates/authz/index.mako:557 msgid "Can not delete module " msgstr "" -#: pysvnmanager/templates/authz/index.mako:574 +#: pysvnmanager/templates/authz/index.mako:562 msgid "Successfully delete module:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:610 +#: pysvnmanager/templates/authz/index.mako:597 +#: pysvnmanager/templates/repos/hooks.mako:195 msgid "Repository:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:613 +#: pysvnmanager/templates/authz/index.mako:600 msgid "New repository" msgstr "" -#: pysvnmanager/templates/authz/index.mako:617 +#: pysvnmanager/templates/authz/index.mako:604 msgid "Repository Name:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:622 +#: pysvnmanager/templates/authz/index.mako:609 msgid "Administrators:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:634 +#: pysvnmanager/templates/authz/index.mako:621 msgid "Module:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:637 +#: pysvnmanager/templates/authz/index.mako:624 msgid "New module" msgstr "" -#: pysvnmanager/templates/authz/index.mako:643 +#: pysvnmanager/templates/authz/index.mako:630 msgid "Module Path:" msgstr "" -#: pysvnmanager/templates/authz/index.mako:657 +#: pysvnmanager/templates/authz/index.mako:644 msgid "ACL" msgstr "" -#: pysvnmanager/templates/authz/index.mako:662 +#: pysvnmanager/templates/authz/index.mako:649 msgid "Users" msgstr "" -#: pysvnmanager/templates/authz/index.mako:676 +#: pysvnmanager/templates/authz/index.mako:663 msgid "ReadOnly" msgstr "" -#: pysvnmanager/templates/authz/index.mako:693 -#: pysvnmanager/templates/role/index.mako:727 +#: pysvnmanager/templates/authz/index.mako:678 +#: pysvnmanager/templates/role/index.mako:711 msgid "Save" msgstr "" -#: pysvnmanager/templates/authz/index.mako:694 -#: pysvnmanager/templates/role/index.mako:728 +#: pysvnmanager/templates/authz/index.mako:679 +#: pysvnmanager/templates/role/index.mako:712 msgid "Delete" msgstr "" -#: pysvnmanager/templates/authz/index.mako:695 -#: pysvnmanager/templates/role/index.mako:729 +#: pysvnmanager/templates/authz/index.mako:680 +#: pysvnmanager/templates/role/index.mako:713 msgid "Cancel" msgstr "" @@ -493,7 +634,7 @@ msgstr "" #: pysvnmanager/templates/logs/rollback.mako:14 -#: pysvnmanager/templates/logs/view.mako:18 +#: pysvnmanager/templates/logs/view.mako:20 msgid "Close" msgstr "" @@ -505,88 +646,118 @@ msgid "Rollback to this revision, are you sure?" msgstr "" -#: pysvnmanager/templates/logs/view.mako:16 +#: pysvnmanager/templates/logs/view.mako:17 msgid "Rollback to this revision" msgstr "" +#: pysvnmanager/templates/repos/create.mako:5 +#: pysvnmanager/templates/repos/create.mako:8 +#: pysvnmanager/templates/repos/create.mako:25 +msgid "Create repository" +msgstr "" + +#: pysvnmanager/templates/repos/create.mako:22 +#: pysvnmanager/templates/repos/remove.mako:63 +msgid "Repository name:" +msgstr "" + +#: pysvnmanager/templates/repos/hooks.mako:198 +msgid "Add repository" +msgstr "" + +#: pysvnmanager/templates/repos/hooks.mako:199 +#: pysvnmanager/templates/repos/remove.mako:5 +#: pysvnmanager/templates/repos/remove.mako:49 +#: pysvnmanager/templates/repos/remove.mako:67 +msgid "Remove repository" +msgstr "" + +#: pysvnmanager/templates/repos/hooks.mako:204 +msgid "Uninstalled hooks:" +msgstr "" + +#: pysvnmanager/templates/repos/hooks.mako:226 +msgid "Enable this hook" +msgstr "" + #: pysvnmanager/templates/role/index.mako:5 -#: pysvnmanager/templates/role/index.mako:638 +#: pysvnmanager/templates/role/index.mako:625 msgid "Role Management" msgstr "" -#: pysvnmanager/templates/role/index.mako:420 +#: pysvnmanager/templates/role/index.mako:418 msgid "Update group failed:" msgstr "" -#: pysvnmanager/templates/role/index.mako:427 +#: pysvnmanager/templates/role/index.mako:424 msgid "Update group successfully." msgstr "" -#: pysvnmanager/templates/role/index.mako:448 +#: pysvnmanager/templates/role/index.mako:444 msgid "Are you sure to delete group:" msgstr "" -#: pysvnmanager/templates/role/index.mako:471 +#: pysvnmanager/templates/role/index.mako:467 msgid "Delete group failed:" msgstr "" -#: pysvnmanager/templates/role/index.mako:478 +#: pysvnmanager/templates/role/index.mako:472 msgid "Delete group successfully." msgstr "" -#: pysvnmanager/templates/role/index.mako:512 +#: pysvnmanager/templates/role/index.mako:505 msgid "Update alias failed:" msgstr "" -#: pysvnmanager/templates/role/index.mako:519 +#: pysvnmanager/templates/role/index.mako:510 msgid "Update alias successfully." msgstr "" -#: pysvnmanager/templates/role/index.mako:539 +#: pysvnmanager/templates/role/index.mako:529 msgid "Are you sure to delete alias:" msgstr "" -#: pysvnmanager/templates/role/index.mako:562 +#: pysvnmanager/templates/role/index.mako:552 msgid "Delete alias failed:" msgstr "" -#: pysvnmanager/templates/role/index.mako:569 +#: pysvnmanager/templates/role/index.mako:557 msgid "Delete alias successfully." msgstr "" -#: pysvnmanager/templates/role/index.mako:645 +#: pysvnmanager/templates/role/index.mako:632 msgid "Select a role name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:649 +#: pysvnmanager/templates/role/index.mako:636 msgid "New Group" msgstr "" -#: pysvnmanager/templates/role/index.mako:650 +#: pysvnmanager/templates/role/index.mako:637 msgid "New Alias" msgstr "" -#: pysvnmanager/templates/role/index.mako:654 +#: pysvnmanager/templates/role/index.mako:641 msgid "New group name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:658 +#: pysvnmanager/templates/role/index.mako:645 msgid "New alias name:" msgstr "" -#: pysvnmanager/templates/role/index.mako:670 +#: pysvnmanager/templates/role/index.mako:657 msgid "Members list" msgstr "" -#: pysvnmanager/templates/role/index.mako:675 +#: pysvnmanager/templates/role/index.mako:662 msgid "Other users" msgstr "" -#: pysvnmanager/templates/role/index.mako:694 +#: pysvnmanager/templates/role/index.mako:681 msgid "Ignore recursive" msgstr "" -#: pysvnmanager/templates/role/index.mako:706 +#: pysvnmanager/templates/role/index.mako:693 msgid "User name:" msgstr "" Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-25 10:27:15 UTC (rev 44) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-08-26 16:18:33 UTC (rev 45) @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pySvnManager 0.1.3\n" +"Project-Id-Version: pySvnManager 0.2.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-07-31 09:21+0800\n" +"POT-Creation-Date: 2008-08-27 00:06+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -17,23 +17,23 @@ "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.2\n" -#: pysvnmanager/controllers/authz.py:29 pysvnmanager/templates/authz/index.mako:159 +#: pysvnmanager/controllers/authz.py:43 pysvnmanager/templates/authz/index.mako:152 #: pysvnmanager/templates/check/index.mako:10 msgid "All users(with anon)" msgstr "" -#: pysvnmanager/controllers/authz.py:30 pysvnmanager/templates/authz/index.mako:161 +#: pysvnmanager/controllers/authz.py:44 pysvnmanager/templates/authz/index.mako:154 #: pysvnmanager/templates/check/index.mako:11 msgid "Known users" msgstr "" -#: pysvnmanager/controllers/authz.py:31 pysvnmanager/templates/authz/index.mako:163 +#: pysvnmanager/controllers/authz.py:45 pysvnmanager/templates/authz/index.mako:156 #: pysvnmanager/templates/check/index.mako:12 msgid "Anonymous" msgstr "" -#: pysvnmanager/controllers/authz.py:36 pysvnmanager/controllers/role.py:50 -#: pysvnmanager/controllers/role.py:70 pysvnmanager/templates/authz/index.mako:155 +#: pysvnmanager/controllers/authz.py:50 pysvnmanager/controllers/role.py:50 +#: pysvnmanager/controllers/role.py:70 pysvnmanager/templates/authz/index.mako:148 #: pysvnmanager/templates/check/index.mako:17 #: pysvnmanager/templates/role/index.mako:18 #: pysvnmanager/templates/role/index.mako:37 @@ -42,8 +42,8 @@ msgid "Group:" msgstr "" -#: pysvnmanager/controllers/authz.py:39 pysvnmanager/controllers/role.py:55 -#: pysvnmanager/controllers/role.py:72 pysvnmanager/templates/authz/index.mako:157 +#: pysvnmanager/controllers/authz.py:53 pysvnmanager/controllers/role.py:55 +#: pysvnmanager/controllers/role.py:72 pysvnmanager/templates/authz/index.mako:150 #: pysvnmanager/templates/check/index.mako:19 #: pysvnmanager/templates/role/index.mako:23 #: pysvnmanager/templates/role/index.mako:42 @@ -52,8 +52,9 @@ msgid "Alias:" msgstr "" -#: pysvnmanager/controllers/authz.py:54 pysvnmanager/controllers/authz.py:74 -#: pysvnmanager/controllers/check.py:83 pysvnmanager/controllers/role.py:43 +#: pysvnmanager/controllers/authz.py:68 pysvnmanager/controllers/authz.py:99 +#: pysvnmanager/controllers/check.py:89 pysvnmanager/controllers/repos.py:40 +#: pysvnmanager/controllers/repos.py:59 pysvnmanager/controllers/role.py:43 #: pysvnmanager/templates/check/index.mako:9 #: pysvnmanager/templates/check/index.mako:23 #: pysvnmanager/templates/role/index.mako:12 @@ -61,31 +62,31 @@ msgid "Please choose..." msgstr "" -#: pysvnmanager/controllers/authz.py:135 +#: pysvnmanager/controllers/authz.py:160 #, python-format msgid "User %(user)s changed authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/authz.py:144 +#: pysvnmanager/controllers/authz.py:173 #, python-format msgid "Repository %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:152 +#: pysvnmanager/controllers/authz.py:181 #, python-format msgid "Module %s not exist." msgstr "" -#: pysvnmanager/controllers/authz.py:158 +#: pysvnmanager/controllers/authz.py:187 msgid "You can not delete yourself from admin list." msgstr "" -#: pysvnmanager/controllers/authz.py:183 +#: pysvnmanager/controllers/authz.py:212 #, python-format msgid "User %(user)s delete authz rules. (rev:%(rev)s)" msgstr "" -#: pysvnmanager/controllers/check.py:63 pysvnmanager/templates/auth_failed.mako:3 +#: pysvnmanager/controllers/check.py:69 pysvnmanager/templates/auth_failed.mako:3 msgid "Permission denied." msgstr "" @@ -117,16 +118,89 @@ msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:148 +#: pysvnmanager/controllers/logs.py:152 #, python-format msgid "Rollback successfully to revision: %s" msgstr "" -#: pysvnmanager/controllers/logs.py:157 +#: pysvnmanager/controllers/logs.py:161 #, python-format msgid "Rollback failed: %s" msgstr "" +#: pysvnmanager/controllers/repos.py:74 +msgid "Installed hooks:" +msgstr "" + +#: pysvnmanager/controllers/repos.py:80 +msgid "Id" +msgstr "" + +#: pysvnmanager/controllers/repos.py:81 pysvnmanager/hooks/plugins/__init__.py:244 +msgid "Plugin name" +msgstr "" + +#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:245 +msgid "Type" +msgstr "" + +#: pysvnmanager/controllers/repos.py:96 +msgid "Remove selected hooks" +msgstr "" + +#: pysvnmanager/controllers/repos.py:116 +#, python-format +msgid "" +"Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:119 +#, python-format +msgid "Apply plugin '%(plugin)s' on '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:140 +#, python-format +msgid "" +"Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:143 +#, python-format +msgid "Delete plugin '%(plugin)s' on '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:146 +#, python-format +msgid "No plugin has been deleted for '%(repos)s'." +msgstr "" + +#: pysvnmanager/controllers/repos.py:155 +#, python-format +msgid "" +"Create repository '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:158 +#, python-format +msgid "Create repository '%(repos)s' success." +msgstr "" + +#: pysvnmanager/controllers/repos.py:171 +#, python-format +msgid "" +"Delete repository '%(repos)s' Failed. Error message:<br>\n" +"%(msg)s" +msgstr "" + +#: pysvnmanager/controllers/repos.py:174 +#, python-format +msgid "Delete blank repository '%(repos)s' success." +msgstr "" + #: pysvnmanager/controllers/role.py:103 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" @@ -162,6 +236,60 @@ msgid "User %s logged out" msgstr "" +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 +msgid "check case insensitive" +msgstr "" + +#: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 +msgid "A pre-commit hook to detect case-insensitive filename clashes." +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 +msgid "mime-type and eol-style check" +msgstr "" + +#: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 +msgid "New file must provide svn:eol-style if not binary file." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:84 +#, python-format +msgid "repos '%s' not exist!" +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:133 +#, python-format +msgid "Conflict: plugin '%s' is modified by others." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:160 +#: pysvnmanager/hooks/plugins/__init__.py:174 +#: pysvnmanager/hooks/plugins/__init__.py:190 +#: pysvnmanager/hooks/plugins/__init__.py:254 +#: pysvnmanager/hooks/plugins/__init__.py:261 +#: pysvnmanager/hooks/plugins/__init__.py:270 +msgid "Plugin not fully implemented." +msgstr "" + +#: pysvnmanager/hooks/plugins/__init__.py:246 +msgid "Description" +msgstr "" + +#: pysvnmanager/model/repos.py:39 +#, python-format +msgid "Repos root does not exist: %s" +msgstr "" + +#: pysvnmanager/model/repos.py:68 +#, python-format +msgid "Repos %s already exists.... [truncated message content] |
From: <ji...@us...> - 2008-08-25 10:27:06
|
Revision: 44 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=44&view=rev Author: jiangx Date: 2008-08-25 10:27:15 +0000 (Mon, 25 Aug 2008) Log Message: ----------- add controller/view for svn repos add/remove management. Modified Paths: -------------- trunk/README.txt trunk/development.ini trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/templates/repos/hooks.mako trunk/setup.py Added Paths: ----------- trunk/pysvnmanager/templates/repos/create.mako trunk/pysvnmanager/templates/repos/remove.mako Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/README.txt 2008-08-25 10:27:15 UTC (rev 44) @@ -17,3 +17,26 @@ paster setup-app config.ini Then you are ready to go. + +Installation from Source code +============================= + +Check source code from sourceforge.net:: + + svn co https://sourceforge.net/projects/pysvnmanager/trunk pysvnmanager + +Make a config file as follows:: + + cd pysvnmanager/config + make + +Compile l18n messages:: + + cd pysvnmanager + python setup.py compile_catalog + +Start web service:: + + paster serve --reload develogment.ini + + Modified: trunk/development.ini =================================================================== --- trunk/development.ini 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/development.ini 2008-08-25 10:27:15 UTC (rev 44) @@ -77,7 +77,7 @@ [logger_pysvnmanager] level = DEBUG -handlers = +handlers = console qualname = pysvnmanager [handler_console] Modified: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-25 10:27:15 UTC (rev 44) @@ -6,7 +6,6 @@ from pysvnmanager.model import repos as _repos from pysvnmanager.model import hooks as _hooks - log = logging.getLogger(__name__) class ReposController(BaseController): @@ -32,6 +31,7 @@ return render('/repos/hooks.mako') def init_repos_list(self): + filter = request.params.get('filter') total = 0; msg = '' @@ -40,15 +40,16 @@ msg += 'name[0]="%s";\n' % _("Please choose...") total += 1; for reposname in self.repos_list: + if filter=='blank' and not self.repos.is_blank_svn_repos(reposname): + continue msg += 'id[%d]="%s";' % (total, reposname) msg += 'name[%d]="%s";\n' % (total, reposname) total += 1; msg += 'total=%d;\n' % total - msg += 'revision="%s";\n' % self.authz.version return msg def get_plugin_list(self): - reposname = request.params.get('select') + reposname = request.params.get('select') h = _hooks.Hooks(self.repos_root + reposname) total = 0; msg = '' @@ -66,11 +67,11 @@ return msg def get_remove_hook_form_content(self): - reposname = request.params.get('select') + reposname = request.params.get('select') h = _hooks.Hooks(self.repos_root + reposname) msg = '' if len(h.applied_plugins) > 0: - msg += "Installed hooks:" + msg += _("Installed hooks:") msg += "<br>\n" num = 0 @@ -84,7 +85,7 @@ if detail and detail != desc: msg += ' - %(detail)s' % { 'detail': detail, } msg += '<br>\n' - msg += '<input type="submit" name="remove_hook" value="Remove selected hooks">\n' + msg += '<input type="submit" name="remove_hook" value="%s">\n' % _("Remove selected hooks") return msg @@ -104,10 +105,10 @@ plugin = h.plugins[pluginname] plugin.set_plugin(d) except Exception, e: - result = "Apply plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s" % { + result = _("Apply plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { "plugin": pluginname, "repos":reposname, "msg": e} else: - result = "Apply plugin '%(plugin)s on '%(repos)s' success." % { + result = _("Apply plugin '%(plugin)s on '%(repos)s' success.") % { "plugin": pluginname, "repos":reposname} return result @@ -122,15 +123,40 @@ plugin = h.plugins[pluginname] plugin.delete_plugin() except Exception, e: - result = "Delete plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s" % { + result = _("Delete plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { "plugin": pluginname, "repos":reposname, "msg": e} else: - result = "Delete plugin '%(plugin)s on '%(repos)s' success." % { + result = _("Delete plugin '%(plugin)s on '%(repos)s' success.") % { "plugin": pluginname, "repos":reposname} return result - + + def create_submit(self): + try: + d = request.params + reposname = d.get("reposname") + self.repos.create(reposname) + except Exception, e: + result = _("Create repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "repos":reposname, "msg": e} + else: + result = _("Create repository '%(repos)s' success.") % {"repos":reposname} + return result + def create(self): return render('/repos/create.mako') + + def remove_submit(self): + try: + d = request.params + reposname = d.get("repos_list") + self.repos.delete(reposname) + except Exception, e: + result = _("Delete repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { + "repos":reposname, "msg": e} + else: + result = _("Delete blank repository '%(repos)s' success.") % {"repos":reposname} + return result + def remove(self): return render('/repos/remove.mako') Modified: trunk/pysvnmanager/model/repos.py =================================================================== --- trunk/pysvnmanager/model/repos.py 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/pysvnmanager/model/repos.py 2008-08-25 10:27:15 UTC (rev 44) @@ -59,6 +59,9 @@ repos_list = property(__get_repos_list) def create(self, repos_name): + repos_name = repos_name.strip() + assert repos_name != "" + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} if os.path.exists(repos_path): raise Exception, _("Repos %s already exists.") % repos_name @@ -121,14 +124,17 @@ return False def delete(self, repos_name): + repos_name = repos_name.strip() + assert repos_name != "" repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} if os.path.exists(repos_path): if self.is_blank_svn_repos(repos_name): from svn import repos as _repos - _repos.delete(repos_path) - else: - raise Exception, _("Repos %s is not a blank repository.") % repos_name + return _repos.delete(repos_path) + raise Exception, _("Repos %s is not a blank repository.") % repos_name + + if __name__ == '__main__': import doctest Added: trunk/pysvnmanager/templates/repos/create.mako =================================================================== --- trunk/pysvnmanager/templates/repos/create.mako (rev 0) +++ trunk/pysvnmanager/templates/repos/create.mako 2008-08-25 10:27:15 UTC (rev 44) @@ -0,0 +1,27 @@ +## -*- coding: utf-8 -*- +<%inherit file="/base.mako" /> + +<%def name="head_tags()"> + <title>${_("Create repository")}</title> +</%def> + +<h2>${_("Create repository")}</h2> + +##<form name="main_form" method="post" action="${h.url_for(action="create_submit")}"> +<% + context.write( + h.form_remote_tag( + html={'id':'main_form'}, + url=h.url(action='create_submit'), + update="message", + method='post', before='showNoticesPopup()', + complete='hideNoticesPopup();switch_message_box();', + ) + ) +%> +${_("Repository name:")} + <input type="text" name="reposname" value=""> + <br> + <input type="submit" name="submit" value="${_("Create repository")}"> + +</form> Modified: trunk/pysvnmanager/templates/repos/hooks.mako =================================================================== --- trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-25 10:27:15 UTC (rev 44) @@ -43,7 +43,6 @@ var id = new Array(); var name = new Array(); var total = 0; - var revision = ''; repos_list = document.main_form.repos_list; repos_list.options.length = 0; @@ -54,7 +53,6 @@ { repos_list.options[i] = new Option(name[i], id[i]); } - document.main_form.revision.value = revision; } catch(exception) { alert(exception); @@ -67,7 +65,6 @@ { var name = document.main_form.repos_list.value; var params = {select:name}; - var revision = ''; if (name=='...'||name=='') { @@ -192,15 +189,16 @@ <h2>${_("Repos management")}</h2> <form name="main_form" method="post"> -<input type="hidden" name="revision" value="${c.revision}"> <DIV style="position:relative;" class=gainlayout> <DIV id="repos_list_box" class=gainlayout> ${_("Repository:")} <select name="repos_list" size="1" onChange='repos_changed()'> </select> -<a href="#" onclick='#'>[+${_("Add repository")}]</a> -<a href="#" onclick='#'>[-${_("Remove repository")}]</a> +${h.link_to(_("Add repository"), h.url(action="create"))} +${h.link_to(_("Remove repository"), h.url(action="remove"))} +##<a href="#" onclick='#'>[+${_("Add repository")}]</a> +##<a href="#" onclick='#'>[-${_("Remove repository")}]</a> </DIV> <DIV id="new_hook_list_box" class=gainlayout style="visibility:hidden;position:absolute"> @@ -217,7 +215,7 @@ h.form_remote_tag( html={'id':'apply_new_hook_form'}, url=h.url(action='apply_new_hook'), - update=dict(success="message", failure="message"), + update="message", method='post', before='apply_new_hook_form_submit(this); showNoticesPopup()', complete='hideNoticesPopup();switch_message_box();repos_changed()', ) @@ -240,7 +238,7 @@ h.form_remote_tag( html={'id':'remove_hook_form'}, url=h.url(action='remove_hook'), - update=dict(success="message", failure="message"), + update="message", method='post', before='remove_hook_form_submit(this); showNoticesPopup()', complete='hideNoticesPopup();switch_message_box();repos_changed()', ) Added: trunk/pysvnmanager/templates/repos/remove.mako =================================================================== --- trunk/pysvnmanager/templates/repos/remove.mako (rev 0) +++ trunk/pysvnmanager/templates/repos/remove.mako 2008-08-25 10:27:15 UTC (rev 44) @@ -0,0 +1,69 @@ +## -*- coding: utf-8 -*- +<%inherit file="/base.mako" /> + +<%def name="head_tags()"> + <title>${_("Remove repository")}</title> +</%def> + +<%def name="body_params()"> onload="init_repos_list()" </%def> + +<SCRIPT LANGUAGE="JavaScript"> + +function init_repos_list() +{ + showNoticesPopup(); + var params = {filter:'blank'}; + new Ajax.Request( + '${h.url_for(controller="repos", action="init_repos_list")}', + {asynchronous:true, evalScripts:true, method:'post', + onComplete: + function(request) + {hideNoticesPopup();ajax_init_repos_list(request.responseText);}, + parameters:params + }); +} + +function ajax_init_repos_list(code) +{ + var id = new Array(); + var name = new Array(); + var total = 0; + + repos_list = document.getElementById('repos_list'); + repos_list.options.length = 0; + + try { + eval(code); + for (var i=0; i < total; i++) + { + repos_list.options[i] = new Option(name[i], id[i]); + } + } + catch(exception) { + alert(exception); + } +} + +</SCRIPT> + +<h2>${_("Remove repository")}</h2> + +##<form name="main_form" method="post" action="${h.url_for(action="remove_submit")}"> +<% + context.write( + h.form_remote_tag( + html={'id':'main_form'}, + url=h.url(action='remove_submit'), + update="message", + method='post', before='showNoticesPopup()', + complete='hideNoticesPopup();switch_message_box();init_repos_list();', + ) + ) +%> +${_("Repository name:")} + <select id="repos_list" name="repos_list" size="1"> + </select> + <br> + <input type="submit" name="submit" value="${_("Remove repository")}"> + +</form> Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2008-08-25 10:25:09 UTC (rev 43) +++ trunk/setup.py 2008-08-25 10:27:15 UTC (rev 44) @@ -7,7 +7,7 @@ setup( name='pySvnManager', - version="0.1.3", + version="0.2.0", description='SVN authz web management tools.', author='Jiang Xin', author_email='jia...@os...', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-25 10:25:06
|
Revision: 43 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=43&view=rev Author: jiangx Date: 2008-08-25 10:25:09 +0000 (Mon, 25 Aug 2008) Log Message: ----------- add controller/view for svn plugin management. Modified Paths: -------------- trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/model/hooks.py trunk/pysvnmanager/templates/authz/index.mako trunk/pysvnmanager/templates/base.mako trunk/pysvnmanager/templates/check/index.mako trunk/pysvnmanager/templates/role/index.mako trunk/pysvnmanager/tests/test_repos.py Added Paths: ----------- trunk/pysvnmanager/controllers/repos.py trunk/pysvnmanager/templates/repos/ trunk/pysvnmanager/templates/repos/hooks.mako trunk/pysvnmanager/tests/functional/test_repos.py Added: trunk/pysvnmanager/controllers/repos.py =================================================================== --- trunk/pysvnmanager/controllers/repos.py (rev 0) +++ trunk/pysvnmanager/controllers/repos.py 2008-08-25 10:25:09 UTC (rev 43) @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +import logging + +from pysvnmanager.lib.base import * +from pysvnmanager.model.svnauthz import * +from pysvnmanager.model import repos as _repos +from pysvnmanager.model import hooks as _hooks + + +log = logging.getLogger(__name__) + +class ReposController(BaseController): + requires_auth = True + + def __init__(self): + self.authz = SvnAuthz(cfg.authz_file) + self.login_as = session.get('user') + # Used as checked in user to rcs file. + self.authz.login_as = self.login_as + + self.repos_root = cfg.repos_root + self.repos = _repos.Repos(self.repos_root) + self.repos_list = self.repos.repos_list + + + def __before__(self, action): + super(ReposController, self).__before__(action) + if not self.authz.is_super_user(self.login_as): + return redirect_to(h.url_for(controller='security', action='failed')) + + def index(self): + return render('/repos/hooks.mako') + + def init_repos_list(self): + total = 0; + msg = '' + + # get javascript code for top_form's role_selector + msg += 'id[0]="%s";' % '...' + msg += 'name[0]="%s";\n' % _("Please choose...") + total += 1; + for reposname in self.repos_list: + msg += 'id[%d]="%s";' % (total, reposname) + msg += 'name[%d]="%s";\n' % (total, reposname) + total += 1; + msg += 'total=%d;\n' % total + msg += 'revision="%s";\n' % self.authz.version + return msg + + def get_plugin_list(self): + reposname = request.params.get('select') + h = _hooks.Hooks(self.repos_root + reposname) + total = 0; + msg = '' + + # get javascript code for top_form's role_selector + msg += 'id[0]="%s";' % '...' + msg += 'name[0]="%s";\n' % _("Please choose...") + total += 1; + for name in h.unapplied_plugins.keys(): + msg += 'id[%d]="%s";' % (total, name) + msg += 'name[%d]="%s";\n' % (total, h.plugins[name].name) + total += 1; + msg += 'total=%d;\n' % total + + return msg + + def get_remove_hook_form_content(self): + reposname = request.params.get('select') + h = _hooks.Hooks(self.repos_root + reposname) + msg = '' + if len(h.applied_plugins) > 0: + msg += "Installed hooks:" + msg += "<br>\n" + num = 0 + + for name in h.applied_plugins.keys(): + msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { + 'num': num, 'plugin': name, } + desc = h.plugins[name].description + detail = h.plugins[name].detail + msg += '%(plugin)s - %(desc)s' % { + 'plugin': name, 'name': h.plugins[name].name, 'desc': desc, } + if detail and detail != desc: + msg += ' - %(detail)s' % { 'detail': detail, } + msg += '<br>\n' + msg += '<input type="submit" name="remove_hook" value="Remove selected hooks">\n' + + return msg + + def get_hook_form(self): + reposname = request.params.get('repos') + pluginname = request.params.get('plugin') + h = _hooks.Hooks(self.repos_root + reposname) + + return h.plugins[pluginname].show_form() + + def apply_new_hook(self): + try: + d = request.params + reposname = d.get("_repos") + pluginname = d.get("_plugin") + h = _hooks.Hooks(self.repos_root + reposname) + plugin = h.plugins[pluginname] + plugin.set_plugin(d) + except Exception, e: + result = "Apply plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s" % { + "plugin": pluginname, "repos":reposname, "msg": e} + else: + result = "Apply plugin '%(plugin)s on '%(repos)s' success." % { + "plugin": pluginname, "repos":reposname} + return result + + def remove_hook(self): + try: + d = request.params + reposname = d.get("_repos") + h = _hooks.Hooks(self.repos_root + reposname) + for i in d.keys(): + if "pluginid_" in i: + pluginname = d[i] + plugin = h.plugins[pluginname] + plugin.delete_plugin() + except Exception, e: + result = "Delete plugin '%(plugin)s on '%(repos)s' Failed. Error message:<br>\n%(msg)s" % { + "plugin": pluginname, "repos":reposname, "msg": e} + else: + result = "Delete plugin '%(plugin)s on '%(repos)s' success." % { + "plugin": pluginname, "repos":reposname} + return result + + def create(self): + return render('/repos/create.mako') + + def remove(self): + return render('/repos/remove.mako') Modified: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-25 10:25:09 UTC (rev 43) @@ -89,6 +89,8 @@ def show(self): return self.description + detail = property(show) + def show_form(self): return self.description Modified: trunk/pysvnmanager/model/hooks.py =================================================================== --- trunk/pysvnmanager/model/hooks.py 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/model/hooks.py 2008-08-25 10:25:09 UTC (rev 43) @@ -48,12 +48,20 @@ self.plugins[m] = plugins.getHandler(m)(self.__repos_path) def __get_applied_plugins(self): - return [m for m in self.pluginnames if self.plugins[m].is_set()] + result={} + for k,v in self.plugins.iteritems(): + if v.is_set(): + result[k]=v + return result applied_plugins = property(__get_applied_plugins) def __get_unapplied_plugins(self): - return [m for m in self.pluginnames if not self.plugins[m].is_set()] + result={} + for k,v in self.plugins.iteritems(): + if not v.is_set(): + result[k]=v + return result unapplied_plugins = property(__get_unapplied_plugins) Modified: trunk/pysvnmanager/templates/authz/index.mako =================================================================== --- trunk/pysvnmanager/templates/authz/index.mako 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/templates/authz/index.mako 2008-08-25 10:25:09 UTC (rev 43) @@ -21,11 +21,6 @@ all_users.sort(); -function clean_message() -{ - document.getElementById('result').innerHTML = ''; -} - // Display repos list only. function show_init_form() { @@ -49,8 +44,6 @@ document.getElementById('action_box').style.visibility = 'hidden'; document.getElementById('action_box').style.position = 'absolute'; - - document.getElementById('result').innerHTML = ''; } // Display repos_list, admins_input, path_list. @@ -508,15 +501,12 @@ if (message) { message = '${_("Update ACL failed:")}' + message; - alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Update ACL successfully.")}'; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); if (document.main_form.repos_list.value == reposname) { repos_changed(); @@ -565,15 +555,12 @@ if (message) { message = '${_("Can not delete module ")}' + reposname + ':' + path + ' : ' + message; - alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Successfully delete module:")}' + reposname + ':' + path; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); repos_changed(); } } @@ -687,8 +674,6 @@ <table width='100%'> <tr> <td align='center'> - <div id='result'></div> - <br> <input type="hidden" name="reposname"> <input type="button" name="save_btn" value='${_("Save")}' onClick="save_authz(this.form)"> <input type="button" name="delete_btn" value='${_("Delete")}' onClick="delete_authz(this.form)"> Modified: trunk/pysvnmanager/templates/base.mako =================================================================== --- trunk/pysvnmanager/templates/base.mako 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/templates/base.mako 2008-08-25 10:25:09 UTC (rev 43) @@ -12,6 +12,11 @@ </div> ${self.nav_bar()} + + <div id="message_box" style="visibility:hidden;position:absolute" class=gainlayout> + <span id="message"></span> + <br><a class="clear-link" href="#" onClick="document.getElementById('message').innerHTML='';switch_message_box()">Clear message</a> + </div> ${next.body()} </body> @@ -27,6 +32,7 @@ <td>${h.link_to(_("Check permissions"), h.url_for(controller="check", id=None))}</td> <td>${h.link_to(_("Role management"), h.url(controller="role", id=None))}</td> <td>${h.link_to(_("ACL management"), h.url(controller="authz", id=None))}</td> + <td>${h.link_to(_("Repos management"), h.url(controller="repos", id=None))}</td> <td>${h.link_to(_("Logs"), h.url(controller="logs", id=None))}</td> <td>welcome ${session.get('user')}</td> <td>${h.link_to(_("Logout"), h.url(controller="logout", id=None))}</td> @@ -107,6 +113,28 @@ document.getElementById('popup_notices').style.visibility = 'hidden'; document.getElementById('popup_notices').style.display = 'none'; } + +function set_message_box(message) +{ + document.getElementById('message').innerHTML=message; + switch_message_box(); +} + +function switch_message_box() +{ + c=document.getElementById('message').innerHTML; + s=document.getElementById('message_box').style; + if (c) + { + s.visibility='visible'; + s.position = 'relative'; + } + else + { + s.visibility='hidden'; + s.position = 'absolute'; + } +} </script> </%def> Modified: trunk/pysvnmanager/templates/check/index.mako =================================================================== --- trunk/pysvnmanager/templates/check/index.mako 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/templates/check/index.mako 2008-08-25 10:25:09 UTC (rev 43) @@ -114,7 +114,7 @@ h.form_remote_tag( html={'id':'main_form'}, url=h.url(action='access_map'), - update=dict(success="acl_msg", failure="acl_error"), + update=dict(success="acl_msg", failure="message"), method='post', before='showNoticesPopup()', complete='hideNoticesPopup();'+h.visual_effect("Highlight", "acl_msg", duration=1), ) @@ -182,5 +182,4 @@ ## classic form: ${c.access_map_msg} <div id='acl_msg'></div> -<div id='acl_error'></div> Added: trunk/pysvnmanager/templates/repos/hooks.mako =================================================================== --- trunk/pysvnmanager/templates/repos/hooks.mako (rev 0) +++ trunk/pysvnmanager/templates/repos/hooks.mako 2008-08-25 10:25:09 UTC (rev 43) @@ -0,0 +1,254 @@ +## -*- coding: utf-8 -*- +<%inherit file="/base.mako" /> + +<%def name="head_tags()"> + <title>${_("Repos management")}</title> +</%def> + +<%def name="body_params()"> onload="init_repos_list()" </%def> + +<SCRIPT LANGUAGE="JavaScript"> + +// Display repos list only. +function show_init_form() +{ + document.getElementById('repos_list_box').style.visibility = 'visible'; + document.getElementById('repos_list_box').style.position = 'relative'; + + document.getElementById('new_hook_list_box').style.visibility = 'hidden'; + document.getElementById('new_hook_list_box').style.position = 'absolute'; + + document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; + document.getElementById('new_hook_setting_box').style.position = 'absolute'; + + document.getElementById('remove_hook_box').style.visibility = 'visible'; + document.getElementById('remove_hook_box').style.position = 'relative'; +} + + +function init_repos_list() +{ + showNoticesPopup(); + new Ajax.Request( + '${h.url_for(controller="repos", action="init_repos_list")}', + {asynchronous:true, evalScripts:true, method:'post', + onComplete: + function(request) + {hideNoticesPopup();ajax_init_repos_list(request.responseText);} + }); +} + +function ajax_init_repos_list(code) +{ + var id = new Array(); + var name = new Array(); + var total = 0; + var revision = ''; + + repos_list = document.main_form.repos_list; + repos_list.options.length = 0; + + try { + eval(code); + for (var i=0; i < total; i++) + { + repos_list.options[i] = new Option(name[i], id[i]); + } + document.main_form.revision.value = revision; + } + catch(exception) { + alert(exception); + } + + repos_changed(); +} + +function repos_changed() +{ + var name = document.main_form.repos_list.value; + var params = {select:name}; + var revision = ''; + + if (name=='...'||name=='') + { + document.getElementById('remove_hook_form_content').innerHTML = ""; + show_init_form(); + } + else + { + showNoticesPopup(); + new Ajax.Request( + '${h.url_for(controller="repos", action="get_plugin_list")}', + {asynchronous:true, evalScripts:true, method:'post', + onComplete: + function(request) + {hideNoticesPopup();ajax_repos_changed(request.responseText);}, + parameters:params + }); + + new Ajax.Updater( + 'remove_hook_form_content', + '${h.url_for(controller="repos", action="get_remove_hook_form_content")}', + {asynchronous:true, evalScripts:true, method:'post', + onComplete: + function(request) + {hideNoticesPopup();}, + parameters:params + }); + } +} + +function ajax_repos_changed(code) +{ + var id = new Array(); + var name = new Array(); + var total = 0; + + unset_plugin_list = document.main_form.unset_plugin_list; + unset_plugin_list.options.length = 0; + + try { + eval(code); + if (total==1) + { + document.getElementById('new_hook_list_box').style.visibility = 'hidden'; + document.getElementById('new_hook_list_box').style.position = 'absolute'; + document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; + document.getElementById('new_hook_setting_box').style.position = 'absolute'; + } + else + { + document.getElementById('new_hook_list_box').style.visibility = 'visible'; + document.getElementById('new_hook_list_box').style.position = 'relative'; + for (var i=0; i < total; i++) + { + unset_plugin_list.options[i] = new Option(name[i], id[i]); + } + } + } + catch(exception) { + alert(exception); + } + + path_changed(); +} + +function select_unset_hook_list() +{ + var reposname = document.main_form.repos_list.value; + var pluginname = document.main_form.unset_plugin_list.value; + var params = {repos:reposname, plugin:pluginname}; + + if (pluginname=='...'||pluginname=='') + { + document.getElementById('apply_new_hook_form_content').innerHTML = ""; + document.getElementById('new_hook_setting_box').style.visibility = 'hidden'; + document.getElementById('new_hook_setting_box').style.position = 'absolute'; + } + else + { + document.getElementById('new_hook_setting_box').style.visibility = 'visible'; + document.getElementById('new_hook_setting_box').style.position = 'relative'; + showNoticesPopup(); + new Ajax.Updater( + {success:'apply_new_hook_form_content',failure:'apply_new_hook_form_content'}, + '${h.url_for(controller="repos", action="get_hook_form")}', + {asynchronous:true, evalScripts:true, method:'post', + onComplete: + function(request) + {hideNoticesPopup();}, + parameters:params + }); + } +} + +function apply_new_hook_form_submit(form) +{ + var reposname = document.main_form.repos_list.value; + var pluginname = document.main_form.unset_plugin_list.value; + if (pluginname=='...'||pluginname==''||reposname=="..."||reposname=="") + { + alert("Bad repository or plugin name"); + return false; + } + form._repos.value = reposname; + form._plugin.value = pluginname; +} + +function remove_hook_form_submit(form) +{ + var reposname = document.main_form.repos_list.value; + if (reposname=="..."||reposname=="") + { + alert("Bad repository or plugin name"); + return false; + } + form._repos.value = reposname; +} + +</SCRIPT> + + +<h2>${_("Repos management")}</h2> + +<form name="main_form" method="post"> +<input type="hidden" name="revision" value="${c.revision}"> +<DIV style="position:relative;" class=gainlayout> + +<DIV id="repos_list_box" class=gainlayout> +${_("Repository:")} + <select name="repos_list" size="1" onChange='repos_changed()'> + </select> +<a href="#" onclick='#'>[+${_("Add repository")}]</a> +<a href="#" onclick='#'>[-${_("Remove repository")}]</a> +</DIV> + +<DIV id="new_hook_list_box" class=gainlayout style="visibility:hidden;position:absolute"> +${_("Available hooks:")} + <select name="unset_plugin_list" size="1" onChange='select_unset_hook_list()'> + </select> +</form> +</DIV> +<DIV id="new_hook_setting_box" class=gainlayout style="visibility:hidden;position:absolute"> +## <form name="apply_new_hook_form" method="post" action="${h.url_for(action='apply_new_hook')}" +## onSubmit="apply_new_hook_form_submit(this)"> +<% + context.write( + h.form_remote_tag( + html={'id':'apply_new_hook_form'}, + url=h.url(action='apply_new_hook'), + update=dict(success="message", failure="message"), + method='post', before='apply_new_hook_form_submit(this); showNoticesPopup()', + complete='hideNoticesPopup();switch_message_box();repos_changed()', + ) + ) + %> + <input type=hidden name="_repos" value=""> + <input type=hidden name="_plugin" value=""> + <div id="apply_new_hook_form_content"></div> + <input type="submit" name="apply" value="${_("Enable this hook")}"> +</form> +</DIV> + +<hr size='1'> + +<DIV id="remove_hook_box" class=gainlayout style="visibility:visible;position:relative"> +## <form name="remove_hook_form" method="post" action="${h.url_for(action='remove_hook')}" +## onSubmit="remove_hook_form_submit(this)"> +<% + context.write( + h.form_remote_tag( + html={'id':'remove_hook_form'}, + url=h.url(action='remove_hook'), + update=dict(success="message", failure="message"), + method='post', before='remove_hook_form_submit(this); showNoticesPopup()', + complete='hideNoticesPopup();switch_message_box();repos_changed()', + ) + ) + %> + <input type=hidden name="_repos" value=""> + <div id="remove_hook_form_content"></div> +</DIV> + +</DIV> + Modified: trunk/pysvnmanager/templates/role/index.mako =================================================================== --- trunk/pysvnmanager/templates/role/index.mako 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/templates/role/index.mako 2008-08-25 10:25:09 UTC (rev 43) @@ -355,8 +355,6 @@ else show_init_form(); - document.getElementById('result').innerHTML = ''; - if(name.charAt(0) == '@') { showNoticesPopup(); @@ -419,14 +417,12 @@ { message = '${_("Update group failed:")}' + message; alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Update group successfully.")}'; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); if (document.main_form.role_list.value == rolename) { role_changed(); @@ -469,15 +465,12 @@ if (message) { message = '${_("Delete group failed:")}' + message; - alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Delete group successfully.")}'; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); reset_main_form(); } } @@ -510,15 +503,12 @@ if (message) { message = '${_("Update alias failed:")}' + message; - alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Update alias successfully.")}'; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); if (document.main_form.role_list.value == aliasname) { role_changed(); @@ -560,15 +550,12 @@ if (message) { message = '${_("Delete alias failed:")}' + message; - alert(message); - document.getElementById('result').innerHTML = message; - document.getElementById('result').style.visibility = 'visible'; + set_message_box(message); } else { message = '${_("Delete alias successfully.")}'; - document.getElementById('result').innerHTML = message; - alert(message); + set_message_box(message); reset_main_form(); } } @@ -718,9 +705,6 @@ </DIV> -<div id='result' style="position:relative;" class=gainlayout> -</div> - <!-- begin: action_box --> <div id='action_box' style="position:relative;" class=gainlayout> <input type="hidden" name="rolename"> Added: trunk/pysvnmanager/tests/functional/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/functional/test_repos.py (rev 0) +++ trunk/pysvnmanager/tests/functional/test_repos.py 2008-08-25 10:25:09 UTC (rev 43) @@ -0,0 +1,7 @@ +from pysvnmanager.tests import * + +class TestReposController(TestController): + + def test_index(self): + response = self.app.get(url_for(controller='repos')) + # Test response... Modified: trunk/pysvnmanager/tests/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/test_repos.py 2008-08-25 10:22:44 UTC (rev 42) +++ trunk/pysvnmanager/tests/test_repos.py 2008-08-25 10:25:09 UTC (rev 43) @@ -87,7 +87,7 @@ myhooks = hooks.Hooks(self.repos_root + '/repos1') self.assert_(myhooks.pluginnames==['CaseInsensitive', 'EolStyleCheck'], myhooks.pluginnames) - self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) m = myhooks.plugins['CaseInsensitive'] self.assert_(m.name=="check case insensitive", m.name) @@ -98,18 +98,18 @@ m = myhooks.plugins['CaseInsensitive'] self.assert_(m.is_set()==False) - self.assert_(myhooks.applied_plugins==[], myhooks.applied_plugins) - self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + self.assert_(myhooks.applied_plugins.keys()==[], myhooks.applied_plugins.keys()) + self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) m.set_plugin() self.assert_(m.is_set()==True) - self.assert_(myhooks.applied_plugins==['CaseInsensitive'], myhooks.applied_plugins) - self.assert_(myhooks.unapplied_plugins==['EolStyleCheck'], myhooks.unapplied_plugins) + self.assert_(myhooks.applied_plugins.keys()==['CaseInsensitive'], myhooks.applied_plugins.keys()) + self.assert_(myhooks.unapplied_plugins.keys()==['EolStyleCheck'], myhooks.unapplied_plugins.keys()) m.delete_plugin() self.assert_(m.is_set()==False) - self.assert_(myhooks.applied_plugins==[], myhooks.applied_plugins) - self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + self.assert_(myhooks.applied_plugins.keys()==[], myhooks.applied_plugins.keys()) + self.assert_(myhooks.unapplied_plugins.keys()==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins.keys()) if __name__ == '__main__': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-25 10:22:36
|
Revision: 42 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=42&view=rev Author: jiangx Date: 2008-08-25 10:22:44 +0000 (Mon, 25 Aug 2008) Log Message: ----------- add model for svn plugins management. Modified Paths: -------------- trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/tests/test_repos.py Added Paths: ----------- trunk/pysvnmanager/hooks/ trunk/pysvnmanager/hooks/__init__.py trunk/pysvnmanager/hooks/init/ trunk/pysvnmanager/hooks/init/__init__.py trunk/pysvnmanager/hooks/plugins/ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py trunk/pysvnmanager/hooks/plugins/__init__.py trunk/pysvnmanager/model/hooks.py Added: trunk/pysvnmanager/hooks/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/__init__.py (rev 0) +++ trunk/pysvnmanager/hooks/__init__.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,4 @@ +__all__ = ["init", "plugins"] + +import init +import plugins Added: trunk/pysvnmanager/hooks/init/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/init/__init__.py (rev 0) +++ trunk/pysvnmanager/hooks/init/__init__.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os + +svn_hooks_init_dict = { '1.4': 'hook1.4', + '1.5': 'hook1.5', + 'default': 'hook1.5', + } + +svn_hooks_init_base = os.path.dirname(os.path.abspath(__file__)) Added: trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import PluginBase + +class CaseInsensitive(PluginBase): + name = "check case insensitive" + description = "A pre-commit hook to detect case-insensitive filename clashes." + option = "case_insensitive" + value = "yes" + + def is_set(self): + return self.get_config(self.option) == self.value + + def show(self): + return self.description + + def show_form(self): + return self.description + + def delete_plugin(self): + self.del_config(self.option) + self.write() + + def set_plugin(self, form=None): + self.set_config(self.option, self.value) + self.write() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return CaseInsensitive(repospath) \ No newline at end of file Added: trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from pysvnmanager.hooks.plugins import PluginBase + +class EolStyleCheck(PluginBase): + name = "mime-type and eol-style check" + description = "New file must provide svn:eol-style if not binary file." + option = "check_eol_style" + value = "yes" + + def is_set(self): + return self.get_config(self.option) == self.value + + def show(self): + return self.description + + def show_form(self): + return self.description + + def delete_plugin(self): + self.del_config(self.option) + self.write() + + def set_plugin(self, form=None): + self.set_config(self.option, self.value) + self.write() + +def execute(repospath=""): + """ + Generate and return a hooks plugin object + + @param request: repos full path + @rtype: Plugin + @return: Plugin object + """ + return EolStyleCheck(repospath) \ No newline at end of file Added: trunk/pysvnmanager/hooks/plugins/__init__.py =================================================================== --- trunk/pysvnmanager/hooks/plugins/__init__.py (rev 0) +++ trunk/pysvnmanager/hooks/plugins/__init__.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,102 @@ +# create a list of extension actions from the package directory +import ConfigParser +import os + +def getPackageModules(packagefile): + """ Return a list of modules for a package, omitting any modules + starting with an underscore. + """ + import os, re + + packagedir = os.path.dirname(packagefile) + pyre = re.compile(r"^([^_].*)\.py$") + dirlist = os.listdir(packagedir) + + matches = [pyre.match(fn) for fn in dirlist] + modules = [match.group(1) for match in matches if match] + + modules.sort() + return modules + + +def getHandler(name, function="execute"): + """ return a handler function for a given action or None """ + if function: + fromlist = [function] + else: + fromlist = [] + moduleName = 'pysvnmanager.hooks.plugins.' + name + module = __import__(moduleName, globals(), {}, fromlist) + + if function: + # module has the obj for module <moduleName> + return getattr(module, function) + else: + # module now has the toplevel module of <moduleName> (see __import__ docs!) + components = moduleName.split('.') + for comp in components[1:]: + module = getattr(module, comp) + return module + + +class PluginBase(object): + """ Base class for hook plugins + """ + name = "" + description = "" + + def __init__(self, repospath): + self.__repospath = repospath + if not os.path.exists(self.__repospath): + raise Exception, "repos '%s' not exist!" % os.path.basename(self.__repospath) + self.__configfile = "%s/conf/hooks.ini" % self.__repospath + self.cp = ConfigParser.ConfigParser() + self.__read_config() + + def __read_config(self): + if os.path.exists(self.__configfile): + self.cp.read(self.__configfile) + else: + self.cp.add_section('main') + + def write(self): + fp = open(self.__configfile, 'w') + self.cp.write(fp) + + def get_config(self, option, default="", section='main'): + if not self.cp.has_section(section): + self.cp.add_section(section) + if self.cp.has_option(section, option): + result = self.cp.get(section, option) + else: + result = default + return result + + def set_config(self, option, value="", section='main'): + if not self.cp.has_section(section): + self.cp.add_section(section) + self.cp.set(section, option, value) + + def del_config(self, option, section='main'): + if self.cp.has_section(section): + self.cp.remove_option(section, option) + if not self.cp.options(section): + self.cp.remove_section(section) + + def is_set(self): + raise Exception, "Not implement." + + def show(self): + return self.description + + def show_form(self): + return self.description + + def delete_plugin(self): + raise Exception, "Not implement." + + def set_plugin(self, form=None): + raise Exception, "Not implement." + + +modules = getPackageModules(__file__) Added: trunk/pysvnmanager/model/hooks.py =================================================================== --- trunk/pysvnmanager/model/hooks.py (rev 0) +++ trunk/pysvnmanager/model/hooks.py 2008-08-25 10:22:44 UTC (rev 42) @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +"""Subversion repos hooks plugin. + +Basic classes used for Subversion hooks management. +""" + +import re +import sys +import os +import StringIO +import logging +log = logging.getLogger(__name__) + +from pylons import config +config_path = config["here"] + '/config' +if config_path not in sys.path: + sys.path.insert(0, config_path) +from localconfig import LocalConfig as cfg + +sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) +from pysvnmanager.hooks import plugins +from pysvnmanager.model import repos + +# i18n works only as pysvnmanager (a pylons app) model. +if config.get('package') and not config.has_key('unittest'): + from pylons.i18n import _ +else: + def _(message): return message + +#reload(sys) # in Python2.5, method sys.setdefaultencoding + #will be delete after initialize. we need reload it. +#sys.setdefaultencoding('utf-8') + +class Hooks: + + def __init__(self, repos_path): + self.__repos_path = os.path.abspath(repos_path) + self.__repos_root = os.path.dirname(self.__repos_path) + self.__repos_name = os.path.basename(self.__repos_path) + self.repos = repos.Repos(self.__repos_root) + assert self.repos.is_svn_repos(self.__repos_name) + + self.plugins = {} + self.pluginnames = plugins.modules + for m in self.pluginnames: + self.plugins[m] = plugins.getHandler(m)(self.__repos_path) + + def __get_applied_plugins(self): + return [m for m in self.pluginnames if self.plugins[m].is_set()] + + applied_plugins = property(__get_applied_plugins) + + def __get_unapplied_plugins(self): + return [m for m in self.pluginnames if not self.plugins[m].is_set()] + + unapplied_plugins = property(__get_unapplied_plugins) + + def __get_repos_root(self): + return self.__repos_root + + repos_root = property(__get_repos_root) + + def __get_repos_name(self): + return self.__repos_name + + repos_name = property(__get_repos_name) + + def __get_repos_path(self): + return self.__repos_path + + repos_path = property(__get_repos_path) + + + +if __name__ == '__main__': + import doctest + doctest.testmod() Modified: trunk/pysvnmanager/model/repos.py =================================================================== --- trunk/pysvnmanager/model/repos.py 2008-08-25 10:19:22 UTC (rev 41) +++ trunk/pysvnmanager/model/repos.py 2008-08-25 10:22:44 UTC (rev 42) @@ -1,9 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -"""Subversion authz config file management. +"""Subversion repos management. -Basic classes used for Subversion authz management. +Basic classes used for Subversion repository add/remove. """ import re @@ -13,8 +13,16 @@ import logging log = logging.getLogger(__name__) +from pylons import config +config_path = config["here"] + '/config' +if config_path not in sys.path: + sys.path.insert(0, config_path) +from localconfig import LocalConfig as cfg + +sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) +from pysvnmanager import hooks + # i18n works only as pysvnmanager (a pylons app) model. -from pylons import config if config.get('package') and not config.has_key('unittest'): from pylons.i18n import _ else: @@ -59,8 +67,28 @@ self.hooks_init(repos_name) def hooks_init(self, repos_name): - version = self.svnversion() - repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + import distutils.version as dv + version = '.'.join(self.svnversion()) + matched = 'default' + for ver in sorted(hooks.init.svn_hooks_init_dict.keys(), + cmp = lambda x,y: cmp(dv.LooseVersion(x), dv.LooseVersion(y)), + reverse=True): + if dv.LooseVersion(version) >= dv.LooseVersion(ver): + matched = ver + break + + #log.debug('Hooks version matched: %s' % matched) + #log.debug('svn_hooks_init_base: %s' % hooks.init.svn_hooks_init_base) + + # copy hook-scripts from matched hooks templates directory. + src = hooks.init.svn_hooks_init_base + '/' + hooks.init.svn_hooks_init_dict[matched] + dest = "%(root)s/%(entry)s/hooks" % { "root": self.repos_root, "entry": repos_name} + + log.debug('Now copy hooks from \n\t%s to \n\t%s' % (src, dest)) + import shutil + shutil.rmtree(dest) + shutil.copytree(src, dest, symlinks=True) + def svnversion(self): cmd = 'LC_ALL=C svn --version' @@ -93,12 +121,13 @@ return False def delete(self, repos_name): - if self.is_blank_svn_repos(repos_name): - repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} - from svn import repos as _repos - _repos.delete(repos_path) - else: - raise Exception, _("Repos %s is not a blank repository.") % repos_name + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + if os.path.exists(repos_path): + if self.is_blank_svn_repos(repos_name): + from svn import repos as _repos + _repos.delete(repos_path) + else: + raise Exception, _("Repos %s is not a blank repository.") % repos_name if __name__ == '__main__': Modified: trunk/pysvnmanager/tests/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/test_repos.py 2008-08-25 10:19:22 UTC (rev 41) +++ trunk/pysvnmanager/tests/test_repos.py 2008-08-25 10:22:44 UTC (rev 42) @@ -8,14 +8,17 @@ from pysvnmanager.tests import * from pysvnmanager import model from pysvnmanager.model import repos +from pysvnmanager.model import hooks +from pysvnmanager.hooks import plugins + import StringIO from pprint import pprint class TestRepos(TestController): def __init__(self, *args): - repos_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/svnroot' - self.repos = repos.Repos(repos_root) + self.repos_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/svnroot' + self.repos = repos.Repos(self.repos_root) super(TestRepos, self).__init__(*args) def setUp(self): @@ -26,27 +29,89 @@ #print '+'*40, 'teardown' pass - def testReposRoot(self): - repos.Repos('/tmp') - self.assertRaises(Exception, repos.Repos, '/tmp/svnroot.noexists') - - def testReposlist(self): - self.assert_(sorted(self.repos.repos_list) == ['repos1', 'repos2'], u','.join(self.repos.repos_list).encode('utf-8')) - def testReposCreate(self): self.assertRaises(Exception, self.repos.create, 'repos1') + self.repos.delete('repos3') self.repos.create('repos3') self.assert_(sorted(self.repos.repos_list) == ['repos1', 'repos2', 'repos3'], self.repos.repos_list) - self.repos.delete('repos3') def testReposDelete(self): self.assertRaises(Exception, self.repos.delete, 'repos1') + def testReposRoot(self): + repos.Repos('/tmp') + self.assertRaises(Exception, repos.Repos, '/tmp/svnroot.noexists') + + def testReposlist(self): + self.assert_(sorted(self.repos.repos_list) == ['repos1', 'repos2', 'repos3'], u','.join(self.repos.repos_list).encode('utf-8')) + def testSvnVersion(self): svnversion = self.repos.svnversion() self.assert_(svnversion[0]!='', svnversion[0]) self.assert_(svnversion[1]!='', svnversion[1]) + +class TestReposPlugin(TestController): + def __init__(self, *args): + self.repos_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/svnroot' + super(TestReposPlugin, self).__init__(*args) + + def setUp(self): + #print '+'*40, 'setup' + pass + + def tearDown(self): + #print '+'*40, 'teardown' + pass + + def testPluginList(self): + self.assert_(plugins.modules==['CaseInsensitive', 'EolStyleCheck'], plugins.modules) + + def testPluginImport(self): + self.assertRaises(Exception, plugins.getHandler("CaseInsensitive"), "") + module_ci = plugins.getHandler("CaseInsensitive")(self.repos_root + '/repos1') + self.assert_(module_ci.name=="check case insensitive", module_ci.name) + self.assert_(module_ci.description!="", module_ci.description) + + def testPluginSetting(self): + m = plugins.getHandler("CaseInsensitive")(self.repos_root + '/repos1') + self.assert_(m.is_set()==False) + m.set_plugin() + self.assert_(m.is_set()==True) + m.delete_plugin() + self.assert_(m.is_set()==False) + + def testHooks(self): + # self.repos_root is not a repository. + self.assertRaises(AssertionError, hooks.Hooks, self.repos_root) + + myhooks = hooks.Hooks(self.repos_root + '/repos1') + self.assert_(myhooks.pluginnames==['CaseInsensitive', 'EolStyleCheck'], myhooks.pluginnames) + self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + + m = myhooks.plugins['CaseInsensitive'] + self.assert_(m.name=="check case insensitive", m.name) + self.assert_(m.description!="", m.description) + + def testHooksSetting(self): + myhooks = hooks.Hooks(self.repos_root + '/repos1') + + m = myhooks.plugins['CaseInsensitive'] + self.assert_(m.is_set()==False) + self.assert_(myhooks.applied_plugins==[], myhooks.applied_plugins) + self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + + m.set_plugin() + self.assert_(m.is_set()==True) + self.assert_(myhooks.applied_plugins==['CaseInsensitive'], myhooks.applied_plugins) + self.assert_(myhooks.unapplied_plugins==['EolStyleCheck'], myhooks.unapplied_plugins) + + m.delete_plugin() + self.assert_(m.is_set()==False) + self.assert_(myhooks.applied_plugins==[], myhooks.applied_plugins) + self.assert_(myhooks.unapplied_plugins==['CaseInsensitive', 'EolStyleCheck'], myhooks.unapplied_plugins) + + if __name__ == '__main__': import unittest unittest.main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-08-25 10:19:13
|
Revision: 41 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=41&view=rev Author: jiangx Date: 2008-08-25 10:19:22 +0000 (Mon, 25 Aug 2008) Log Message: ----------- add model for repository add/remove. Modified Paths: -------------- trunk/development.ini trunk/pysvnmanager/config/DefaultConfig.py Added Paths: ----------- trunk/pysvnmanager/model/repos.py trunk/pysvnmanager/tests/test_repos.py Modified: trunk/development.ini =================================================================== --- trunk/development.ini 2008-07-31 13:53:39 UTC (rev 40) +++ trunk/development.ini 2008-08-25 10:19:22 UTC (rev 41) @@ -54,6 +54,9 @@ # authz_file: svn authz config file with administrative extension. (ossxp.com) authz_file = %(here)s/config/svn.access +# svn repository root path +repos_root = %(here)s/svnroot/ + #[filter:proxy-prefix] #use = egg:PasteDeploy#prefix #prefix = /svnadmin Modified: trunk/pysvnmanager/config/DefaultConfig.py =================================================================== --- trunk/pysvnmanager/config/DefaultConfig.py 2008-07-31 13:53:39 UTC (rev 40) +++ trunk/pysvnmanager/config/DefaultConfig.py 2008-08-25 10:19:22 UTC (rev 41) @@ -19,6 +19,9 @@ # Numbers of logs in each page. log_per_page = 10 + # svn repository root + repos_root = config.get('repos_root', "") % {'here': config.get('here')} + # pysvnmanager authentication method. # You can use htpasswd_login, or ldap_login, or both. # You can also implement your own auth module. Added: trunk/pysvnmanager/model/repos.py =================================================================== --- trunk/pysvnmanager/model/repos.py (rev 0) +++ trunk/pysvnmanager/model/repos.py 2008-08-25 10:19:22 UTC (rev 41) @@ -0,0 +1,106 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +"""Subversion authz config file management. + +Basic classes used for Subversion authz management. +""" + +import re +import sys +import os +import StringIO +import logging +log = logging.getLogger(__name__) + +# i18n works only as pysvnmanager (a pylons app) model. +from pylons import config +if config.get('package') and not config.has_key('unittest'): + from pylons.i18n import _ +else: + def _(message): return message + +#reload(sys) # in Python2.5, method sys.setdefaultencoding + #will be delete after initialize. we need reload it. +#sys.setdefaultencoding('utf-8') + +class Repos: + + def __init__(self, repos_root): + if not repos_root or not os.path.exists(repos_root): + raise Exception, _("Repos root does not exist: %s") % repos_root + + self.__repos_root = os.path.abspath(repos_root) + self.__repos_list = [] + self.svnversion_re = re.compile(ur'version\s+(?P<main>[\S]+)(\s+\((?P<sub>.*)\))?') + + def __get_repos_root(self): + return self.__repos_root + + repos_root = property(__get_repos_root) + + def __get_repos_list(self): + self.__repos_list = [] + for i in os.listdir(self.repos_root): + i=unicode(i, 'utf-8') + if self.is_svn_repos(i): + self.__repos_list.append(i) + + return self.__repos_list + + repos_list = property(__get_repos_list) + + def create(self, repos_name): + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + if os.path.exists(repos_path): + raise Exception, _("Repos %s already exists.") % repos_name + from svn import repos as _repos + _repos.create(repos_path, "", "", None, { "fs-type": "fsfs" }) + self.hooks_init(repos_name) + + def hooks_init(self, repos_name): + version = self.svnversion() + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + + def svnversion(self): + cmd = 'LC_ALL=C svn --version' + buff = os.popen(cmd).readline().strip() + m = self.svnversion_re.search(buff) + if m: + return (m.group('main'), m.group('sub')) + else: + return (None, None) + + def is_svn_repos(self, repos_name): + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + if os.path.exists(repos_path): + if os.path.exists("%s/db/revs/0" % repos_path) and \ + os.path.exists("%s/hooks" % repos_path): + return True + return False + + def is_blank_svn_repos(self, repos_name): + if self.is_svn_repos(repos_name): + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + if len(os.listdir("%s/db/revs" % repos_path))!= 1: + return False + elif os.path.isdir("%s/db/revs/0" % repos_path) and \ + len(os.listdir("%s/db/revs/0" % repos_path))!= 1: + return False + else: + return True + + return False + + def delete(self, repos_name): + if self.is_blank_svn_repos(repos_name): + repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name} + from svn import repos as _repos + _repos.delete(repos_path) + else: + raise Exception, _("Repos %s is not a blank repository.") % repos_name + + +if __name__ == '__main__': + import doctest + doctest.testmod() Added: trunk/pysvnmanager/tests/test_repos.py =================================================================== --- trunk/pysvnmanager/tests/test_repos.py (rev 0) +++ trunk/pysvnmanager/tests/test_repos.py 2008-08-25 10:19:22 UTC (rev 41) @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys +sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) + +from pysvnmanager.tests import * +from pysvnmanager import model +from pysvnmanager.model import repos +import StringIO +from pprint import pprint + +class TestRepos(TestController): + + def __init__(self, *args): + repos_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/svnroot' + self.repos = repos.Repos(repos_root) + super(TestRepos, self).__init__(*args) + + def setUp(self): + #print '+'*40, 'setup' + pass + + def tearDown(self): + #print '+'*40, 'teardown' + pass + + def testReposRoot(self): + repos.Repos('/tmp') + self.assertRaises(Exception, repos.Repos, '/tmp/svnroot.noexists') + + def testReposlist(self): + self.assert_(sorted(self.repos.repos_list) == ['repos1', 'repos2'], u','.join(self.repos.repos_list).encode('utf-8')) + + def testReposCreate(self): + self.assertRaises(Exception, self.repos.create, 'repos1') + self.repos.create('repos3') + self.assert_(sorted(self.repos.repos_list) == ['repos1', 'repos2', 'repos3'], self.repos.repos_list) + self.repos.delete('repos3') + + def testReposDelete(self): + self.assertRaises(Exception, self.repos.delete, 'repos1') + + def testSvnVersion(self): + svnversion = self.repos.svnversion() + self.assert_(svnversion[0]!='', svnversion[0]) + self.assert_(svnversion[1]!='', svnversion[1]) + +if __name__ == '__main__': + import unittest + unittest.main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-07-31 13:53:32
|
Revision: 40 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=40&view=rev Author: jiangx Date: 2008-07-31 13:53:39 +0000 (Thu, 31 Jul 2008) Log Message: ----------- add init.d script Modified Paths: -------------- trunk/pySvnManager.egg-info/SOURCES.txt Added Paths: ----------- trunk/init.d Added: trunk/init.d =================================================================== --- trunk/init.d (rev 0) +++ trunk/init.d 2008-07-31 13:53:39 UTC (rev 40) @@ -0,0 +1,79 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: <my_app> application instance +# Required-Start: $all +# Required-Stop: $all +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: starts instance of <my_app> app +# Description: starts instance of <my app> app using start-stop-daemon +### END INIT INFO + +############### EDIT ME ################## +# path to workingenv install if any +#PYTHONPATH=<path to pylons workingenv>/lib/python2.4 + +# path to app +APP_PATH=/opt/svnadmin + +# path to paster bin +DAEMON=/usr/bin/paster + +# log file name +LOG_FILE=$APP_PATH/run/paster.log + +PID_FILE=$APP_PATH/run/paster.pid + +# startup args +DAEMON_OPTS=" serve --monitor-restart --log-file $LOG_FILE production.ini" + +# script name +NAME=svnadmin + +# app name +DESC=pySvnManager + +# pylons user +RUN_AS=www-data + +############### END EDIT ME ################## + +test -x $DAEMON || exit 0 + +set -e + +case "$1" in + start) + if [ -f "$PID_FILE" ]; then + if [ -f "/proc/`cat $PID_FILE`/stat" ]; then + echo "Daemon aleady started? pid: `cat $PID_FILE`" + exit 1 + fi + fi + echo -n "Starting $DESC: " + start-stop-daemon -c $RUN_AS -d $APP_PATH --start --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --pidfile $PID_FILE + echo "$NAME." + ;; + + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --pidfile $PID_FILE + sleep 1 + start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + Property changes on: trunk/init.d ___________________________________________________________________ Added: svn:executable + * Added: svn:eol-style + native Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-31 09:50:08 UTC (rev 39) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-31 13:53:39 UTC (rev 40) @@ -1,6 +1,7 @@ MANIFEST.in README.txt development.ini +init.d setup.cfg setup.py test.ini @@ -19,16 +20,11 @@ pysvnmanager/__init__.py pysvnmanager/websetup.py pysvnmanager/config/DefaultConfig.py -pysvnmanager/config/DefaultConfig.pyc pysvnmanager/config/__init__.py -pysvnmanager/config/__init__.pyc pysvnmanager/config/environment.py -pysvnmanager/config/environment.pyc pysvnmanager/config/localconfig.py.in pysvnmanager/config/middleware.py -pysvnmanager/config/middleware.pyc pysvnmanager/config/routing.py -pysvnmanager/config/routing.pyc pysvnmanager/config/svn.access.in pysvnmanager/config/svn.passwd.in pysvnmanager/controllers/__init__.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-07-31 09:49:59
|
Revision: 39 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=39&view=rev Author: jiangx Date: 2008-07-31 09:50:08 +0000 (Thu, 31 Jul 2008) Log Message: ----------- disable rollback button for latest revision Modified Paths: -------------- trunk/pysvnmanager/controllers/logs.py trunk/pysvnmanager/templates/logs/view.mako Modified: trunk/pysvnmanager/controllers/logs.py =================================================================== --- trunk/pysvnmanager/controllers/logs.py 2008-07-31 09:48:57 UTC (rev 38) +++ trunk/pysvnmanager/controllers/logs.py 2008-07-31 09:50:08 UTC (rev 39) @@ -142,6 +142,10 @@ assert id and isinstance(id, basestring) c.contents = self.rcslog.cat(id) c.log = self.rcslog.get_logs(id, id)[0] + if self.rcslog.head == id: + c.rollback_enabled = True + else: + c.rollback_enabled = False return render('/logs/view.mako') def rollback(self, id): Modified: trunk/pysvnmanager/templates/logs/view.mako =================================================================== --- trunk/pysvnmanager/templates/logs/view.mako 2008-07-31 09:48:57 UTC (rev 38) +++ trunk/pysvnmanager/templates/logs/view.mako 2008-07-31 09:50:08 UTC (rev 39) @@ -13,7 +13,9 @@ </textarea> <form name="main_form" action="${h.url_for(action='rollback')}" onsubmit="return confirm('${_("Rollback to this revision, are you sure?")}');"> +% if not c.rollback_enabled: <input type="submit" name="submit" value='${_("Rollback to this revision")}'> +% endif <input type="button" name="close" value='${_("Close")}' onclick="window.close();"> </form> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-07-31 09:48:50
|
Revision: 38 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=38&view=rev Author: jiangx Date: 2008-07-31 09:48:57 +0000 (Thu, 31 Jul 2008) Log Message: ----------- bugfix: remove -L option from rlog command; add templates for rollback view Modified Paths: -------------- trunk/config/Makefile trunk/pySvnManager.egg-info/SOURCES.txt trunk/pysvnmanager/controllers/logs.py trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/i18n/pysvnmanager.pot trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po trunk/pysvnmanager/model/rcsbackup.py trunk/pysvnmanager/templates/base.mako trunk/pysvnmanager/templates/logs/view.mako trunk/pysvnmanager/tests/test_rcs_backup.py Added Paths: ----------- trunk/pysvnmanager/templates/logs/rollback.mako Modified: trunk/config/Makefile =================================================================== --- trunk/config/Makefile 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/config/Makefile 2008-07-31 09:48:57 UTC (rev 38) @@ -7,7 +7,7 @@ clean: @-rm $(CONFFILE) >/dev/null 2>&1 @-rm localconfig.pyc >/dev/null 2>&1 - @-rm -f *,v RCS/*,v 2>&1 + @-rm -f *,v RCS/*test,v 2>&1 %: $(SRCDIR)/%.in cp $< $@ Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-31 09:48:57 UTC (rev 38) @@ -63,6 +63,7 @@ pysvnmanager/templates/login/login.mako pysvnmanager/templates/login/logout.mako pysvnmanager/templates/logs/index.mako +pysvnmanager/templates/logs/rollback.mako pysvnmanager/templates/logs/view.mako pysvnmanager/templates/role/index.mako pysvnmanager/tests/__init__.py Modified: trunk/pysvnmanager/controllers/logs.py =================================================================== --- trunk/pysvnmanager/controllers/logs.py 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/controllers/logs.py 2008-07-31 09:48:57 UTC (rev 38) @@ -68,7 +68,10 @@ </tr>''' % {'rev' : logs[i].get('revision',''), 'who' : logs[i].get('author',''), 'when': logs[i].get('date',''), - 'why' : h.link_to(logs[i].get('log',''), h.url(action='view', id=logs[i].get('revision',''))), + 'why' : h.link_to(logs[i].get('log',''), \ + h.url(action='view', id=logs[i].get('revision','')), \ + popup=['view_logs'] + ), } buff += ''' @@ -137,17 +140,23 @@ def view(self, id): assert id and isinstance(id, basestring) - c.contents = unicode(self.rcslog.cat(id), 'utf-8') + c.contents = self.rcslog.cat(id) c.log = self.rcslog.get_logs(id, id)[0] return render('/logs/view.mako') def rollback(self, id): - msg = _("Rollback to revision: %s" % id) + log_message = _("Rollback successfully to revision: %s") % id try: assert id and isinstance(id, basestring) self.rcslog.restore(id) - self.rcslog.backup(comment=msg, user=self.login_as) + self.rcslog.backup(comment=log_message, user=self.login_as) except Exception, e: - return e + msg = "%s" % e + if isinstance(msg, str): + msg = unicode(msg, 'utf-8') + c.msg = _("Rollback failed: %s") % msg else: - return msg \ No newline at end of file + c.msg = log_message + + return render('/logs/rollback.mako') + \ No newline at end of file Modified: trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po 2008-07-31 09:48:57 UTC (rev 38) @@ -9,7 +9,7 @@ "Project-Id-Version: pysvnmanager 0.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-07-31 01:18+0800\n" +"PO-Revision-Date: 2008-07-31 09:21+0800\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: en <LL...@li...>\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -116,19 +116,24 @@ msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:94 +#: pysvnmanager/controllers/logs.py:97 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:130 +#: pysvnmanager/controllers/logs.py:133 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:145 +#: pysvnmanager/controllers/logs.py:148 #, python-format -msgid "Rollback to revision: %s" +msgid "Rollback successfully to revision: %s" msgstr "" +#: pysvnmanager/controllers/logs.py:157 +#, python-format +msgid "Rollback failed: %s" +msgstr "" + #: pysvnmanager/controllers/role.py:103 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" @@ -262,29 +267,29 @@ "%(sep)s\n" msgstr "" -#: pysvnmanager/templates/base.mako:84 +#: pysvnmanager/templates/base.mako:11 msgid "Loading, please wait..." msgstr "" -#: pysvnmanager/templates/base.mako:88 +#: pysvnmanager/templates/base.mako:27 msgid "Check permissions" msgstr "" -#: pysvnmanager/templates/base.mako:89 +#: pysvnmanager/templates/base.mako:28 msgid "Role management" msgstr "" -#: pysvnmanager/templates/base.mako:90 +#: pysvnmanager/templates/base.mako:29 #: pysvnmanager/templates/authz/index.mako:5 #: pysvnmanager/templates/authz/index.mako:603 msgid "ACL management" msgstr "" -#: pysvnmanager/templates/base.mako:91 +#: pysvnmanager/templates/base.mako:30 msgid "Logs" msgstr "" -#: pysvnmanager/templates/base.mako:93 +#: pysvnmanager/templates/base.mako:32 msgid "Logout" msgstr "" @@ -474,7 +479,8 @@ #: pysvnmanager/templates/logs/index.mako:5 #: pysvnmanager/templates/logs/index.mako:60 -#: pysvnmanager/templates/logs/view.mako:5 +#: pysvnmanager/templates/logs/rollback.mako:4 +#: pysvnmanager/templates/logs/view.mako:4 msgid "Administration logs" msgstr "" @@ -482,11 +488,24 @@ msgid "Compare revisions" msgstr "" -#: pysvnmanager/templates/logs/view.mako:16 +#: pysvnmanager/templates/logs/rollback.mako:9 +msgid "Rollback" +msgstr "" + +#: pysvnmanager/templates/logs/rollback.mako:14 +#: pysvnmanager/templates/logs/view.mako:18 +msgid "Close" +msgstr "" + +#: pysvnmanager/templates/logs/view.mako:9 msgid "View history, revision" msgstr "" -#: pysvnmanager/templates/logs/view.mako:23 +#: pysvnmanager/templates/logs/view.mako:15 +msgid "Rollback to this revision, are you sure?" +msgstr "" + +#: pysvnmanager/templates/logs/view.mako:16 msgid "Rollback to this revision" msgstr "" Modified: trunk/pysvnmanager/i18n/pysvnmanager.pot =================================================================== --- trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/i18n/pysvnmanager.pot 2008-07-31 09:48:57 UTC (rev 38) @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pySvnManager 0.1.2\n" +"Project-Id-Version: pySvnManager 0.1.3\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-07-31 01:18+0800\n" +"POT-Creation-Date: 2008-07-31 09:21+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -109,19 +109,24 @@ msgid "Compare" msgstr "" -#: pysvnmanager/controllers/logs.py:94 +#: pysvnmanager/controllers/logs.py:97 msgid "Page: " msgstr "" -#: pysvnmanager/controllers/logs.py:130 +#: pysvnmanager/controllers/logs.py:133 msgid "Compares between" msgstr "" -#: pysvnmanager/controllers/logs.py:145 +#: pysvnmanager/controllers/logs.py:148 #, python-format -msgid "Rollback to revision: %s" +msgid "Rollback successfully to revision: %s" msgstr "" +#: pysvnmanager/controllers/logs.py:157 +#, python-format +msgid "Rollback failed: %s" +msgstr "" + #: pysvnmanager/controllers/role.py:103 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" @@ -255,28 +260,28 @@ "%(sep)s\n" msgstr "" -#: pysvnmanager/templates/base.mako:84 +#: pysvnmanager/templates/base.mako:11 msgid "Loading, please wait..." msgstr "" -#: pysvnmanager/templates/base.mako:88 +#: pysvnmanager/templates/base.mako:27 msgid "Check permissions" msgstr "" -#: pysvnmanager/templates/base.mako:89 +#: pysvnmanager/templates/base.mako:28 msgid "Role management" msgstr "" -#: pysvnmanager/templates/base.mako:90 pysvnmanager/templates/authz/index.mako:5 +#: pysvnmanager/templates/base.mako:29 pysvnmanager/templates/authz/index.mako:5 #: pysvnmanager/templates/authz/index.mako:603 msgid "ACL management" msgstr "" -#: pysvnmanager/templates/base.mako:91 +#: pysvnmanager/templates/base.mako:30 msgid "Logs" msgstr "" -#: pysvnmanager/templates/base.mako:93 +#: pysvnmanager/templates/base.mako:32 msgid "Logout" msgstr "" @@ -466,7 +471,8 @@ #: pysvnmanager/templates/logs/index.mako:5 #: pysvnmanager/templates/logs/index.mako:60 -#: pysvnmanager/templates/logs/view.mako:5 +#: pysvnmanager/templates/logs/rollback.mako:4 +#: pysvnmanager/templates/logs/view.mako:4 msgid "Administration logs" msgstr "" @@ -474,11 +480,24 @@ msgid "Compare revisions" msgstr "" -#: pysvnmanager/templates/logs/view.mako:16 +#: pysvnmanager/templates/logs/rollback.mako:9 +msgid "Rollback" +msgstr "" + +#: pysvnmanager/templates/logs/rollback.mako:14 +#: pysvnmanager/templates/logs/view.mako:18 +msgid "Close" +msgstr "" + +#: pysvnmanager/templates/logs/view.mako:9 msgid "View history, revision" msgstr "" -#: pysvnmanager/templates/logs/view.mako:23 +#: pysvnmanager/templates/logs/view.mako:15 +msgid "Rollback to this revision, are you sure?" +msgstr "" + +#: pysvnmanager/templates/logs/view.mako:16 msgid "Rollback to this revision" msgstr "" Modified: trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po =================================================================== --- trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po 2008-07-31 09:48:57 UTC (rev 38) @@ -8,18 +8,17 @@ # Jiang Xin <wor...@gm...>, 2008. msgid "" msgstr "" -"Project-Id-Version: pysvnmanager\n" +"Project-Id-Version: pysvnmanager\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-07-03 22:14+0800\n" -"PO-Revision-Date: 2008-07-31 01:20+0800\n" +"PO-Revision-Date: 2008-07-31 09:21+0800\n" "Last-Translator: Jiang Xin <wor...@gm...>\n" -"Language-Team: <zh...@li...>\n" +"Language-Team: <zh...@li...>\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.2\n" -"X-Generator: KBabel 1.11.4\n" #: pysvnmanager/controllers/authz.py:29 #: pysvnmanager/templates/authz/index.mako:159 @@ -119,19 +118,24 @@ msgid "Compare" msgstr "比较" -#: pysvnmanager/controllers/logs.py:94 +#: pysvnmanager/controllers/logs.py:97 msgid "Page: " msgstr "页面: " -#: pysvnmanager/controllers/logs.py:130 +#: pysvnmanager/controllers/logs.py:133 msgid "Compares between" msgstr "版本间比较" -#: pysvnmanager/controllers/logs.py:145 +#: pysvnmanager/controllers/logs.py:148 #, python-format -msgid "Rollback to revision: %s" -msgstr "回滚至版本: %s" +msgid "Rollback successfully to revision: %s" +msgstr "成功回滚至版本: %s" +#: pysvnmanager/controllers/logs.py:157 +#, python-format +msgid "Rollback failed: %s" +msgstr "回滚失败: %s" + #: pysvnmanager/controllers/role.py:103 #, python-format msgid "User %(user)s changed group: %(grp)s. (rev:%(rev)s)" @@ -285,29 +289,29 @@ "%(deny)s\n" "%(sep)s\n" -#: pysvnmanager/templates/base.mako:84 +#: pysvnmanager/templates/base.mako:11 msgid "Loading, please wait..." msgstr "数据加载中,请稍后..." -#: pysvnmanager/templates/base.mako:88 +#: pysvnmanager/templates/base.mako:27 msgid "Check permissions" msgstr "权限检查" -#: pysvnmanager/templates/base.mako:89 +#: pysvnmanager/templates/base.mako:28 msgid "Role management" msgstr "角色管理" -#: pysvnmanager/templates/base.mako:90 +#: pysvnmanager/templates/base.mako:29 #: pysvnmanager/templates/authz/index.mako:5 #: pysvnmanager/templates/authz/index.mako:603 msgid "ACL management" msgstr "权限控制" -#: pysvnmanager/templates/base.mako:91 +#: pysvnmanager/templates/base.mako:30 msgid "Logs" msgstr "日志" -#: pysvnmanager/templates/base.mako:93 +#: pysvnmanager/templates/base.mako:32 msgid "Logout" msgstr "登出" @@ -497,7 +501,8 @@ #: pysvnmanager/templates/logs/index.mako:5 #: pysvnmanager/templates/logs/index.mako:60 -#: pysvnmanager/templates/logs/view.mako:5 +#: pysvnmanager/templates/logs/rollback.mako:4 +#: pysvnmanager/templates/logs/view.mako:4 msgid "Administration logs" msgstr "修改记录" @@ -505,11 +510,24 @@ msgid "Compare revisions" msgstr "版本比较" -#: pysvnmanager/templates/logs/view.mako:16 +#: pysvnmanager/templates/logs/rollback.mako:9 +msgid "Rollback" +msgstr "数据回滚" + +#: pysvnmanager/templates/logs/rollback.mako:14 +#: pysvnmanager/templates/logs/view.mako:18 +msgid "Close" +msgstr "关闭" + +#: pysvnmanager/templates/logs/view.mako:9 msgid "View history, revision" msgstr "查看历史, 版本" -#: pysvnmanager/templates/logs/view.mako:23 +#: pysvnmanager/templates/logs/view.mako:15 +msgid "Rollback to this revision, are you sure?" +msgstr "你确认回滚文件至此版本么?" + +#: pysvnmanager/templates/logs/view.mako:16 msgid "Rollback to this revision" msgstr "回滚至此版本" Modified: trunk/pysvnmanager/model/rcsbackup.py =================================================================== --- trunk/pysvnmanager/model/rcsbackup.py 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/model/rcsbackup.py 2008-07-31 09:48:57 UTC (rev 38) @@ -94,7 +94,7 @@ cmd = '%(cmd)s %(opts)s -q -f "%(file)s" 2>&1' % {'cmd':CMD_CO, "opts":opts, "file":wcfile } buff = os.popen(cmd).read().strip() if buff: - raise Exception, "Command: %s\nError Message: %s\n" % (cmd, buff) + raise Exception, "Command: %s\nError Message: %s\n" % (get_unicode(cmd), get_unicode(buff)) def cat(wcfile, revision=""): @@ -107,7 +107,7 @@ cmd = '%(cmd)s %(opts)s -q "%(file)s"' % {'cmd':CMD_CO, "opts":opts, "file":wcfile } buff = os.popen(cmd).read().strip() - return buff + return get_unicode(buff) def differ(filename, rev1="", rev2=""): filename=get_utf8(filename) @@ -120,7 +120,7 @@ cmd = '%(cmd)s %(opts)s -u -q "%(file)s"' % {'cmd':CMD_RCSDIFF, 'opts':opts, 'file':filename} log.debug('Command: '+cmd) buff = os.popen(cmd).read() - return buff + return get_unicode(buff) class RcsLog(object): @@ -140,7 +140,7 @@ def __get_page_count(self): if self.__total == 0: count = 0 - elif self.__total == 1: + elif self.__total <= self.__log_per_page: count = 1 else: # show last record on every page. @@ -178,9 +178,8 @@ log_per_page = property(__get_log_per_page, __set_log_per_page) def reload(self): - cmd = '%(cmd)s -L -h -N "%(file)s"' % {'cmd':CMD_RLOG, 'file':self.__file} + cmd = '%(cmd)s -h -N "%(file)s"' % {'cmd':CMD_RLOG, 'file':self.__file} buff = os.popen(cmd).read().strip() - # RCS file: 1,v m = self.p['rcs'].search(buff) if m: @@ -246,7 +245,7 @@ if rev3: opts="%s,%s" % (opts, rev3) - cmd = '%(cmd)s %(opts)s -L -N "%(file)s"' % {'cmd':CMD_RLOG, 'opts':opts, 'file':self.__file} + cmd = '%(cmd)s %(opts)s -N "%(file)s"' % {'cmd':CMD_RLOG, 'opts':opts, 'file':self.__file} log.debug('Command: '+cmd) buff = os.popen(cmd).read().strip().rstrip('=').rstrip() Modified: trunk/pysvnmanager/templates/base.mako =================================================================== --- trunk/pysvnmanager/templates/base.mako 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/templates/base.mako 2008-07-31 09:48:57 UTC (rev 38) @@ -2,8 +2,41 @@ <html> <head> ${self.head_tags()} - ${h.javascript_include_tag(builtins=True)} + ${self.ajax_script()} + </head> + <body ${self.body_params()}> + <div id="popup_shadow" style="z-index:100;visibility:hidden;display:none;position:absolute;top:0px;width:100%;height:100%;background:#000000;opacity:0.0;filter:alpha(opacity=0);"></div> + <div id="popup_notices" style="z-index:101;border:1px solid gray;position:absolute;top:0;left:250px;visibility:hidden;display:none;background:#eeee20;"> + ${_("Loading, please wait...")} + </div> + + ${self.nav_bar()} + + ${next.body()} + </body> +</html> + +<%def name="head_tags()"> + <title>Override Me!</title> +</%def> + +<%def name="nav_bar()"> + <table> + <tr> + <td>${h.link_to(_("Check permissions"), h.url_for(controller="check", id=None))}</td> + <td>${h.link_to(_("Role management"), h.url(controller="role", id=None))}</td> + <td>${h.link_to(_("ACL management"), h.url(controller="authz", id=None))}</td> + <td>${h.link_to(_("Logs"), h.url(controller="logs", id=None))}</td> + <td>welcome ${session.get('user')}</td> + <td>${h.link_to(_("Logout"), h.url(controller="logout", id=None))}</td> + </tr> + </table> +</%def> + +<%def name="ajax_script()"> +${h.javascript_include_tag(builtins=True)} + <!-- IE layout bugfix --> <!--[if lt IE 7]><style> .gainlayout { height: 0; } @@ -74,32 +107,7 @@ document.getElementById('popup_notices').style.visibility = 'hidden'; document.getElementById('popup_notices').style.display = 'none'; } - </script> - </head> - <body ${self.body_params()}> - - <div id="popup_shadow" style="z-index:100;visibility:hidden;display:none;position:absolute;top:0px;width:100%;height:100%;background:#000000;opacity:0.0;filter:alpha(opacity=0);"></div> - <div id="popup_notices" style="z-index:101;border:1px solid gray;position:absolute;top:0;left:250px;visibility:hidden;display:none;background:#eeee20;"> - ${_("Loading, please wait...")} - </div> - <table> - <tr> - <td>${h.link_to(_("Check permissions"), h.url(controller="check"))}</td> - <td>${h.link_to(_("Role management"), h.url(controller="role"))}</td> - <td>${h.link_to(_("ACL management"), h.url(controller="authz"))}</td> - <td>${h.link_to(_("Logs"), h.url(controller="logs"))}</td> - <td>welcome ${session.get('user')}</td> - <td>${h.link_to(_("Logout"), h.url(controller="logout"))}</td> - </tr> - </table> - - ${next.body()} - </body> -</html> - -<%def name="head_tags()"> - <title>Override Me!</title> </%def> <%def name="body_params()"></%def> Added: trunk/pysvnmanager/templates/logs/rollback.mako =================================================================== --- trunk/pysvnmanager/templates/logs/rollback.mako (rev 0) +++ trunk/pysvnmanager/templates/logs/rollback.mako 2008-07-31 09:48:57 UTC (rev 38) @@ -0,0 +1,15 @@ +## -*- coding: utf-8 -*- +<%inherit file="/base.mako" /> +<%def name="head_tags()"> + <title>${_("Administration logs")}</title> +</%def> +<%def name="nav_bar()"></%def> +<%def name="ajax_script()"></%def> + +<h2>${_("Rollback")}</h2> + +${c.msg} + +<p> +<input type="button" value="${_('Close')}" onclick="window.close();"> + Modified: trunk/pysvnmanager/templates/logs/view.mako =================================================================== --- trunk/pysvnmanager/templates/logs/view.mako 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/templates/logs/view.mako 2008-07-31 09:48:57 UTC (rev 38) @@ -1,24 +1,19 @@ ## -*- coding: utf-8 -*- <%inherit file="/base.mako" /> - <%def name="head_tags()"> <title>${_("Administration logs")}</title> </%def> +<%def name="nav_bar()"></%def> +<%def name="ajax_script()"></%def> -<SCRIPT LANGUAGE="JavaScript"> -function rollback() -{ - -} - -</SCRIPT> - <h2>${_("View history, revision")} ${c.log.get('revision')}</h2> <textarea cols="80" rows="24"> ${c.contents} </textarea> -<form name="main_form" action="${h.url_for(action='rollback')}"> -<input type="submit" name="submit" value='${_("Rollback to this revision")}'> +<form name="main_form" action="${h.url_for(action='rollback')}" onsubmit="return confirm('${_("Rollback to this revision, are you sure?")}');"> + <input type="submit" name="submit" value='${_("Rollback to this revision")}'> + + <input type="button" name="close" value='${_("Close")}' onclick="window.close();"> </form> \ No newline at end of file Modified: trunk/pysvnmanager/tests/test_rcs_backup.py =================================================================== --- trunk/pysvnmanager/tests/test_rcs_backup.py 2008-07-30 17:44:47 UTC (rev 37) +++ trunk/pysvnmanager/tests/test_rcs_backup.py 2008-07-31 09:48:57 UTC (rev 38) @@ -121,12 +121,17 @@ pass def testLogs(self): - for i in range(1,11): + rcslog = rcs.RcsLog(self.wcfile) + rcslog.log_per_page = 10 + for i in range(1,rcslog.log_per_page+1): # new file, backup to r1.1 self.writefile(i) rcs.backup(self.wcfile, comment="Test no. %d" % i, user="User1") + rcslog.reload() + assert rcslog.total == i, rcslog.total + assert rcslog.total_page == 1, rcslog.total_page - rcslog = rcs.RcsLog(self.wcfile) + rcslog.reload() assert "rcstest.txt,v" in rcslog.rcsfile, rcslog.rcsfile assert rcslog.head=='1.10', rcslog.head assert rcslog.total==10, rcslog.total This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ji...@us...> - 2008-07-30 17:44:40
|
Revision: 37 http://pysvnmanager.svn.sourceforge.net/pysvnmanager/?rev=37&view=rev Author: jiangx Date: 2008-07-30 17:44:47 +0000 (Wed, 30 Jul 2008) Log Message: ----------- upgrade to 0.1.3: backup using rcs; logs support; Modified Paths: -------------- trunk/pySvnManager.egg-info/SOURCES.txt trunk/setup.py Modified: trunk/pySvnManager.egg-info/SOURCES.txt =================================================================== --- trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-30 17:41:30 UTC (rev 36) +++ trunk/pySvnManager.egg-info/SOURCES.txt 2008-07-30 17:44:47 UTC (rev 37) @@ -35,6 +35,7 @@ pysvnmanager/controllers/authz.py pysvnmanager/controllers/check.py pysvnmanager/controllers/error.py +pysvnmanager/controllers/logs.py pysvnmanager/controllers/role.py pysvnmanager/controllers/security.py pysvnmanager/controllers/template.py @@ -49,6 +50,7 @@ pysvnmanager/lib/helpers.py pysvnmanager/model/__init__.py pysvnmanager/model/configobj.py +pysvnmanager/model/rcsbackup.py pysvnmanager/model/svnauthz.py pysvnmanager/model/auth/__init__.py pysvnmanager/model/auth/http.py @@ -60,11 +62,15 @@ pysvnmanager/templates/login/loggedin.mako pysvnmanager/templates/login/login.mako pysvnmanager/templates/login/logout.mako +pysvnmanager/templates/logs/index.mako +pysvnmanager/templates/logs/view.mako pysvnmanager/templates/role/index.mako pysvnmanager/tests/__init__.py pysvnmanager/tests/test_models.py +pysvnmanager/tests/test_rcs_backup.py pysvnmanager/tests/functional/__init__.py pysvnmanager/tests/functional/test_authz.py pysvnmanager/tests/functional/test_check.py pysvnmanager/tests/functional/test_login.py +pysvnmanager/tests/functional/test_logs.py pysvnmanager/tests/functional/test_role.py \ No newline at end of file Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2008-07-30 17:41:30 UTC (rev 36) +++ trunk/setup.py 2008-07-30 17:44:47 UTC (rev 37) @@ -7,7 +7,7 @@ setup( name='pySvnManager', - version="0.1.2", + version="0.1.3", description='SVN authz web management tools.', author='Jiang Xin', author_email='jia...@os...', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |