Changeset 47

Show
Ignore:
Timestamp:
2008年08月28日 19时15分39秒 (4 years ago)
Author:
jiangx
Message:

Fix #9: add more hooks plugins; add hook scripts; refactor hook-plugin;

Location:
trunk
Files:
71 added
1 removed
15 modified

Legend:

Unmodified
Added
Removed
  • trunk/pySvnManager.egg-info/SOURCES.txt

    r40 r47  
    2121pysvnmanager/websetup.py 
    2222pysvnmanager/config/DefaultConfig.py 
     23pysvnmanager/config/DefaultConfig.pyc 
    2324pysvnmanager/config/__init__.py 
     25pysvnmanager/config/__init__.pyc 
    2426pysvnmanager/config/environment.py 
     27pysvnmanager/config/environment.pyc 
    2528pysvnmanager/config/localconfig.py.in 
    2629pysvnmanager/config/middleware.py 
     30pysvnmanager/config/middleware.pyc 
    2731pysvnmanager/config/routing.py 
     32pysvnmanager/config/routing.pyc 
    2833pysvnmanager/config/svn.access.in 
    2934pysvnmanager/config/svn.passwd.in 
     
    3338pysvnmanager/controllers/error.py 
    3439pysvnmanager/controllers/logs.py 
     40pysvnmanager/controllers/repos.py 
    3541pysvnmanager/controllers/role.py 
    3642pysvnmanager/controllers/security.py 
    3743pysvnmanager/controllers/template.py 
     44pysvnmanager/hooks/__init__.py 
     45pysvnmanager/hooks/init/__init__.py 
     46pysvnmanager/hooks/init/hook1.4/parse_ini.sh 
     47pysvnmanager/hooks/init/hook1.4/post-commit 
     48pysvnmanager/hooks/init/hook1.4/post-lock.tmpl 
     49pysvnmanager/hooks/init/hook1.4/post-revprop-change 
     50pysvnmanager/hooks/init/hook1.4/post-unlock.tmpl 
     51pysvnmanager/hooks/init/hook1.4/pre-commit 
     52pysvnmanager/hooks/init/hook1.4/pre-lock.tmpl 
     53pysvnmanager/hooks/init/hook1.4/pre-revprop-change 
     54pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl 
     55pysvnmanager/hooks/init/hook1.4/start-commit 
     56pysvnmanager/hooks/init/hook1.5/parse_ini.sh 
     57pysvnmanager/hooks/init/hook1.5/post-commit 
     58pysvnmanager/hooks/init/hook1.5/post-lock.tmpl 
     59pysvnmanager/hooks/init/hook1.5/post-revprop-change 
     60pysvnmanager/hooks/init/hook1.5/post-unlock.tmpl 
     61pysvnmanager/hooks/init/hook1.5/pre-commit 
     62pysvnmanager/hooks/init/hook1.5/pre-lock.tmpl 
     63pysvnmanager/hooks/init/hook1.5/pre-revprop-change 
     64pysvnmanager/hooks/init/hook1.5/pre-unlock.tmpl 
     65pysvnmanager/hooks/init/hook1.5/start-commit 
     66pysvnmanager/hooks/plugins/AllowRevpropChange.py 
     67pysvnmanager/hooks/plugins/BugtrackMantis.py 
     68pysvnmanager/hooks/plugins/CapCheckMergeInfo.py 
     69pysvnmanager/hooks/plugins/CaseInsensitive.py 
     70pysvnmanager/hooks/plugins/CommitLogCheck.py 
     71pysvnmanager/hooks/plugins/EmailNotify.py 
     72pysvnmanager/hooks/plugins/EolStyleCheck.py 
     73pysvnmanager/hooks/plugins/ReadonlySvnMirror.py 
     74pysvnmanager/hooks/plugins/__init__.py 
    3875pysvnmanager/i18n/pysvnmanager.pot 
    3976pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.mo 
     
    4784pysvnmanager/model/__init__.py 
    4885pysvnmanager/model/configobj.py 
     86pysvnmanager/model/hooks.py 
    4987pysvnmanager/model/rcsbackup.py 
     88pysvnmanager/model/repos.py 
     89pysvnmanager/model/rest.py 
    5090pysvnmanager/model/svnauthz.py 
    5191pysvnmanager/model/auth/__init__.py 
    5292pysvnmanager/model/auth/http.py 
    5393pysvnmanager/model/auth/ldap_login.py 
     94pysvnmanager/public/css/common.css 
     95pysvnmanager/public/img/alert.png 
     96pysvnmanager/public/img/attention.png 
     97pysvnmanager/public/img/icon-error.png 
     98pysvnmanager/public/img/icon-info.png 
    5499pysvnmanager/templates/auth_failed.mako 
    55100pysvnmanager/templates/base.mako 
     
    62107pysvnmanager/templates/logs/rollback.mako 
    63108pysvnmanager/templates/logs/view.mako 
     109pysvnmanager/templates/repos/create.mako 
     110pysvnmanager/templates/repos/hooks.mako 
     111pysvnmanager/templates/repos/remove.mako 
    64112pysvnmanager/templates/role/index.mako 
    65113pysvnmanager/tests/__init__.py 
    66114pysvnmanager/tests/test_models.py 
    67115pysvnmanager/tests/test_rcs_backup.py 
     116pysvnmanager/tests/test_repos.py 
     117pysvnmanager/tests/data/svnroot.tar.bz2 
    68118pysvnmanager/tests/functional/__init__.py 
    69119pysvnmanager/tests/functional/test_authz.py 
     
    71121pysvnmanager/tests/functional/test_login.py 
    72122pysvnmanager/tests/functional/test_logs.py 
     123pysvnmanager/tests/functional/test_repos.py 
    73124pysvnmanager/tests/functional/test_role.py 
  • trunk/pysvnmanager/controllers/repos.py

    r46 r47  
    5959        msg += 'name[0]="%s";\n' % _("Please choose...") 
    6060        total += 1; 
    61         for name in h.unapplied_plugins.keys(): 
     61        for name in h.unapplied_plugins: 
    6262            msg += 'id[%d]="%s";' % (total, name) 
    63             msg += 'name[%d]="%s";\n' % (total, h.plugins[name].name) 
     63            msg += 'name[%d]="%s";\n' % (total, name + ': ' + h.plugins[name].name) 
    6464            total += 1; 
    6565        msg += 'total=%d;\n' % total 
     
    8282                    "<th align='left'>" + _("Type") + "</th>" + \ 
    8383                    "</tr>\n" 
    84             for name in h.applied_plugins.keys(): 
     84            for name in h.applied_plugins: 
    8585                msg += "<tr><td width='1' rolspan='2'>" 
    8686                msg += '<input type="checkbox" name="pluginid_%(num)d" value="%(plugin)s">' % { 
     
    118118        except Exception, e: 
    119119            result = "<div class='error'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { 
    120                         "plugin": pluginname, "repos":reposname, "msg": e.message} + "</div>" 
     120                        "plugin": pluginname, "repos":reposname, "msg": e} + "</div>" 
    121121        else: 
    122122            result = "<div class='info'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' success.") % { 
  • trunk/pysvnmanager/hooks/plugins/BugtrackMantis.py

    r46 r47  
    77class MantisIntegration(PluginBase): 
    88 
    9     # Plugin id 
    10     id = __name__.rsplit('.',1)[-1] 
    11      
    129    # Brief name for this plugin. 
    1310    name = _("Mantis bugtracking integration") 
     
    3128    key = "mantis_integration" 
    3229    value = "yes" 
     30     
     31    section = 'post_commit' 
    3332     
    3433    def enabled(self): 
  • trunk/pysvnmanager/hooks/plugins/CaseInsensitive.py

    r46 r47  
    55from pysvnmanager.hooks.plugins import _ 
    66 
    7 class CaseInsensitive(PluginBase): 
     7class DetectCaseInsensitiveClash(PluginBase): 
    88 
    9     # Plugin id 
    10     id = __name__.rsplit('.',1)[-1] 
    11      
    129    # Brief name for this plugin. 
    13     name = _("check case insensitive") 
     10    name = _("Detect case-insensitive filename clashes") 
    1411     
    1512    # Both description and detail are reStructuredText format.  
     
    2017     
    2118    # Long description for this plugin. 
    22     detail = "" 
     19    detail = _("""Subversion services may host on a filename case-sensitive OS, 
     20while client **may not** (Windows is case-insensitive). This may cause 'clash'. 
     21 
     22- Detects new paths that 'clash' with existing, or other new, paths. 
     23- Ignores existings paths that already 'clash' 
     24- Exits with an error code, and a diagnostic on stderr, if 'clashes' 
     25  are detected. 
     26""") 
    2327     
    2428    # Hooks-plugin type: T_START_COMMIT, ..., T_POST_UNLOCK 
     
    2630     
    2731    # Plugin config option/value in config ini file. 
    28     key = "case_insensitive" 
     32    key = "detect_case_insensitive_clash" 
    2933    value = "yes" 
     34     
     35    section = 'pre_commit' 
    3036     
    3137    def enabled(self): 
     
    7985    @return: Plugin object 
    8086    """ 
    81     return CaseInsensitive(repospath) 
     87    return DetectCaseInsensitiveClash(repospath) 
  • trunk/pysvnmanager/hooks/plugins/CommitLogCheck.py

    r46 r47  
    44from pysvnmanager.hooks.plugins import * 
    55from pysvnmanager.hooks.plugins import _ 
     6import webhelpers 
    67 
    78class CommitLogCheck(PluginBase): 
    89 
    9     # Plugin id 
    10     id = __name__.rsplit('.',1)[-1] 
    11      
    1210    # Brief name for this plugin. 
    1311    name = _("Check commit log message") 
     
    2624     
    2725    # Plugin config option/value in config ini file. 
    28     key = "commit_log_check" 
    29     value = "yes" 
     26    key_switch   = "commit_log_check_enable" 
     27    key_size     = "commit_log_check_size" 
     28    key_permit   = "commit_log_check_permit" 
     29    key_prohibit = "commit_log_check_prohibit" 
     30     
     31    section = 'pre_commit' 
    3032     
    3133    def enabled(self): 
     
    3436        Simply call 'has_config()'. 
    3537        """ 
    36         return self.has_config() 
     38        return self.has_config(self.key_switch) and self.has_config(self.key_size) 
    3739     
    3840    def install_info(self): 
     
    4345        reST reference: http://docutils.sourceforge.net/docs/user/rst/quickref.html 
    4446        """ 
    45         return self.description 
     47        result = self.description 
     48        if self.enabled(): 
     49            result += "\n\n" 
     50            result += "**" + _("Current configuration") + "**\n\n" 
     51            if self.get_config(self.key_switch) == "yes": 
     52                result += "- " + _("Commit log check is enabled.") 
     53            else: 
     54                result += "- " + _("Commit log check is disabled.") 
     55            result += "\n" 
     56            result += "- " + _("Minimal size of commit log: ") + self.get_config(self.key_size) 
     57            result += "\n" 
     58            permit   = self.get_config(self.key_permit) 
     59            prohibit = self.get_config(self.key_prohibit) 
     60            if permit: 
     61                result += "- " + _("Pattern which commit log must match against: ") + permit 
     62                result += "\n" 
     63            if prohibit: 
     64                result += "- " + _("Pattern which commit log must **NOT** match against: ") + prohibit 
     65                result += "\n" 
     66             
     67        return result 
    4668     
    4769    def install_config_form(self): 
     
    5173        Any html and javascript are welcome. 
    5274        """ 
    53         return "" 
     75        if self.get_config(self.key_switch)=="no": 
     76            enable_checked  = "" 
     77            disable_checked = "checked" 
     78        else: 
     79            enable_checked  = "checked" 
     80            disable_checked = "" 
     81 
     82        result = "" 
     83        result += "<p><strong>%s</strong></p>" % _("Fill this form") 
     84        result += "<blockquote>" 
     85        result += "<table class=hidden>" 
     86        result += "\n<tr><td>" 
     87        result += _("Enable commit log check: ") 
     88        result += "\n</td><td>" 
     89        result += "<input type='radio' name='switch' value='yes' " + \ 
     90                enable_checked  + ">" + _("Enable") + "&nbsp;" 
     91        result += "<input type='radio' name='switch' value='no' " + \ 
     92                disable_checked + ">" + _("Disable") 
     93        result += "\n</td></tr>" 
     94        result += "\n<tr><td>" 
     95        result += _("Minimal size of commit log: ") 
     96        result += "\n</td><td>" 
     97        result += "<input type='text' name='size' size='5' value=\"%s\">" % \ 
     98                webhelpers.util.html_escape(self.get_config(self.key_size)) 
     99        result += "\n</td></tr>" 
     100        result += "\n<tr><td>" 
     101        result += _("Pattern which commit log must match against: ") 
     102        result += "\n</td><td>" 
     103        result += "<input type='text' name='permit' size='64' value=\"%s\">" % \ 
     104                webhelpers.util.html_escape(self.get_config(self.key_permit)) 
     105        result += "\n</td></tr>" 
     106        result += "\n<tr><td>" 
     107        result += _("Pattern which commit log must <b>NOT</b> match against: ") 
     108        result += "\n</td><td>" 
     109        result += "<input type='text' name='prohibit' size='64' value=\"%s\">" % \ 
     110                webhelpers.util.html_escape(self.get_config(self.key_prohibit)) 
     111        result += "\n</td></tr>" 
     112        result += "\n</table>" 
     113        result += "</blockquote>" 
     114        return result 
    54115         
    55116    def uninstall(self): 
     
    58119        Simply call 'unset_config()' and 'save()'. 
    59120        """ 
    60         self.unset_config() 
     121        self.unset_config(self.key_switch) 
     122        self.unset_config(self.key_size) 
     123        self.unset_config(self.key_permit) 
     124        self.unset_config(self.key_prohibit) 
    61125        self.save() 
    62126     
     
    68132        Form fields in setup_config() will pass as params. 
    69133        """ 
    70         self.set_config() 
     134        switch = params.get('switch', 'yes') 
     135        if switch != 'yes': 
     136            switch = 'no' 
     137        size = params.get('size') 
     138        log.debug("size: %s" % size) 
     139        if int(size)<1: 
     140            raise Exception, _("Commit log size must > 0.") 
     141        permit   = params.get('permit') 
     142        prohibit = params.get('prohibit') 
     143        self.set_config(self.key_switch, switch) 
     144        self.set_config(self.key_size, size) 
     145        if permit: 
     146            self.set_config(self.key_permit, permit) 
     147        if prohibit: 
     148            self.set_config(self.key_prohibit, prohibit) 
    71149        self.save() 
    72150         
  • trunk/pysvnmanager/hooks/plugins/EmailNotify.py

    r46 r47  
    44from pysvnmanager.hooks.plugins import * 
    55from pysvnmanager.hooks.plugins import _ 
     6import webhelpers 
    67 
    78class EmailNotify(PluginBase): 
    89 
    9     # Plugin id 
    10     id = __name__.rsplit('.',1)[-1] 
    11      
    1210    # Brief name for this plugin. 
    1311    name = _("Send email notify for commit event") 
     
    5452    key_config = "email_notify_config" 
    5553     
     54    section = 'email' 
     55     
    5656    def enabled(self): 
    5757        """ 
     
    7171        if self.enabled(): 
    7272            result += "\n\n" 
    73             result += "**Current configuration**\n\n" 
     73            result += "**" + _("Current configuration") + "**\n\n" 
    7474            if self.get_config(self.key_switch) == "yes": 
    75                 result += _("- Email notify enabled.") 
     75                result += "- " + _("Email notify enabled.") 
    7676            else: 
    77                 result += _("- Email notify disabled.") 
     77                result += "- " + _("Email notify disabled.") 
    7878            result += "\n" 
    79             result += _("- Parameters: ``") + self.get_config(self.key_config) + '``' 
    80                  
     79            result += "- " + _("Parameters: ") + "``" + self.get_config(self.key_config) + "``\n" 
     80 
    8181        return result 
    8282     
     
    8787        Any html and javascript are welcome. 
    8888        """ 
    89         if self.get_config(self.key_switch)=="yes": 
     89        if self.get_config(self.key_switch)=="no": 
     90            enable_checked  = "" 
     91            disable_checked = "checked" 
     92        else: 
    9093            enable_checked  = "checked" 
    9194            disable_checked = "" 
    92         else: 
    93             enable_checked  = "" 
    94             disable_checked = "checked" 
    9595 
    9696        result = "" 
    9797        result += "<p><strong>%s</strong></p>" % _("Fill this form") 
    9898        result += "<blockquote>" 
     99        result += "<table class=hidden>" 
     100        result += "\n<tr><td>" 
    99101        result += _("Enable email notify.") 
     102        result += "\n</td><td>" 
    100103        result += "<input type='radio' name='switch' value='yes' " + \ 
    101104                enable_checked  + ">" + _("Enable") + "&nbsp;" 
    102105        result += "<input type='radio' name='switch' value='no' " + \ 
    103106                disable_checked + ">" + _("Disable") + "<br>" 
    104         result += _("Input email notify configurations: ") + \ 
    105                 "<input type='text' name='config' size='64' value='%s'>" % \ 
    106                 self.get_config(self.key_config) 
     107        result += "\n</td></tr>" 
     108        result += "\n<tr><td>" 
     109        result += _("Input email notify configurations: ") 
     110        result += "\n</td><td>" 
     111        result += "<input type='text' name='config' size='64' value=\"%s\">" % \ 
     112                webhelpers.util.html_escape(self.get_config(self.key_config)) 
     113        result += "\n</td></tr>" 
     114        result += "\n</table>" 
    107115        result += "</blockquote>" 
    108116        return result 
  • trunk/pysvnmanager/hooks/plugins/EolStyleCheck.py

    r46 r47  
    77class EolStyleCheck(PluginBase): 
    88 
    9     # Plugin id 
    10     id = __name__.rsplit('.',1)[-1] 
    11      
    129    # Brief name for this plugin. 
    1310    name = _("mime-type and eol-style check") 
     
    2623     
    2724    # Plugin config option/value in config ini file. 
    28     key = "check_eol_style" 
     25    key = "eol_style_check" 
    2926    value = "yes" 
     27     
     28    section = 'pre_commit' 
    3029     
    3130    def enabled(self): 
  • trunk/pysvnmanager/hooks/plugins/__init__.py

    r46 r47  
    6767    """ Base class for hook plugins 
    6868    """ 
    69     # Plugin id (must be override!) 
    70     id = __name__.rsplit('.',1)[-1] 
     69    # Plugin id (will be set automatically after instance initialized) 
     70    id = None # __name__.rsplit('.',1)[-1] 
    7171 
    7272    # Both description and detail are reStructuredText format.  
     
    160160        self.revision = os.path.getmtime(self.__configfile) 
    161161 
    162     def get_config(self, key, default="", section='main'): 
     162    def get_config(self, key, default="", section=''): 
    163163        """ 
    164164        Get config from the default config file. 
    165165        """ 
     166        if not section: 
     167            section = self.section 
    166168        if not self.cp.has_section(section): 
    167169            self.cp.add_section(section) 
     
    301303 
    302304- %(t_name)s: %(name)s 
    303 - %(t_name)s: %(type)s 
     305- %(t_type)s: %(type)s 
    304306 
    305307**%(t_desc)s** 
  • trunk/pysvnmanager/i18n/en/LC_MESSAGES/pysvnmanager.po

    r46 r47  
    1010"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 
    1111"POT-Creation-Date: 2008-07-03 22:14+0800\n" 
    12 "PO-Revision-Date: 2008-08-27 21:52+0800\n" 
     12"PO-Revision-Date: 2008-08-28 19:02+0800\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
    1414"Language-Team: en <LL@li.org>\n" 
     
    149149 
    150150#: pysvnmanager/controllers/repos.py:82 
    151 #: pysvnmanager/hooks/plugins/__init__.py:312 
     151#: pysvnmanager/hooks/plugins/__init__.py:314 
    152152msgid "Type" 
    153153msgstr "" 
     
    245245msgstr "" 
    246246 
    247 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 
     247#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 
     248msgid "Allow revprop change" 
     249msgstr "" 
     250 
     251#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 
     252msgid "Allow user change commit-log or other rev-properties." 
     253msgstr "" 
     254 
     255#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 
     256msgid "" 
     257"Commit-log is the only rev-prop we allow to change. Because the changes " 
     258"of rev-prop can not be reverted back, administrator must setup email " 
     259"notification to record this irreversible action." 
     260msgstr "" 
     261 
     262#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 
    248263msgid "Mantis bugtracking integration" 
    249264msgstr "" 
    250265 
    251 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 
     266#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 
    252267msgid "" 
    253268"Integration Subversion with Mantis bugtracking. If commit-log has proper " 
     
    256271msgstr "" 
    257272 
    258 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 
    259 msgid "check case insensitive" 
     273#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 
     274msgid "Subversion client version check (>1.5.0)" 
     275msgstr "" 
     276 
     277#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 
     278msgid "Check subversion client version. if version below 1.5.0, checkin denied." 
     279msgstr "" 
     280 
     281#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 
     282msgid "" 
     283"SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " 
     284"automated merge tracking!" 
     285msgstr "" 
     286 
     287#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 
     288msgid "Detect case-insensitive filename clashes" 
     289msgstr "" 
     290 
     291#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 
     292msgid "A pre-commit hook to detect case-insensitive filename clashes." 
    260293msgstr "" 
    261294 
    262295#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 
    263 msgid "A pre-commit hook to detect case-insensitive filename clashes." 
    264 msgstr "" 
    265  
    266 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 
     296msgid "" 
     297"Subversion services may host on a filename case-sensitive OS,\n" 
     298"while client **may not** (Windows is case-insensitive). This may cause " 
     299"'clash'.\n" 
     300"\n" 
     301"- Detects new paths that 'clash' with existing, or other new, paths.\n" 
     302"- Ignores existings paths that already 'clash'\n" 
     303"- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" 
     304"  are detected.\n" 
     305msgstr "" 
     306 
     307#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 
    267308msgid "Check commit log message" 
    268309msgstr "" 
    269310 
    270 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 
     311#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 
    271312msgid "User must provide commit-log message when checkin." 
    272313msgstr "" 
    273314 
    274 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 
     315#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 
     316#: pysvnmanager/hooks/plugins/EmailNotify.py:73 
     317#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 
     318msgid "Current configuration" 
     319msgstr "" 
     320 
     321#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 
     322msgid "Commit log check is enabled." 
     323msgstr "" 
     324 
     325#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 
     326msgid "Commit log check is disabled." 
     327msgstr "" 
     328 
     329#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 
     330#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 
     331msgid "Minimal size of commit log: " 
     332msgstr "" 
     333 
     334#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 
     335#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 
     336msgid "Pattern which commit log must match against: " 
     337msgstr "" 
     338 
     339#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 
     340msgid "Pattern which commit log must **NOT** match against: " 
     341msgstr "" 
     342 
     343#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 
     344#: pysvnmanager/hooks/plugins/EmailNotify.py:97 
     345#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 
     346msgid "Fill this form" 
     347msgstr "" 
     348 
     349#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 
     350msgid "Enable commit log check: " 
     351msgstr "" 
     352 
     353#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 
     354#: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     355#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 
     356msgid "Enable" 
     357msgstr "" 
     358 
     359#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 
     360#: pysvnmanager/hooks/plugins/EmailNotify.py:106 
     361#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 
     362msgid "Disable" 
     363msgstr "" 
     364 
     365#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 
     366msgid "Pattern which commit log must <b>NOT</b> match against: " 
     367msgstr "" 
     368 
     369#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 
     370msgid "Commit log size must > 0." 
     371msgstr "" 
     372 
     373#: pysvnmanager/hooks/plugins/EmailNotify.py:11 
    275374msgid "Send email notify for commit event" 
    276375msgstr "" 
    277376 
    278 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 
     377#: pysvnmanager/hooks/plugins/EmailNotify.py:17 
    279378msgid "" 
    280379"Send a notification email describing either a commit or a revprop-change " 
     
    282381msgstr "" 
    283382 
    284 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 
     383#: pysvnmanager/hooks/plugins/EmailNotify.py:21 
    285384msgid "" 
    286385"\n" 
     
    309408 
    310409#: pysvnmanager/hooks/plugins/EmailNotify.py:75 
    311 msgid "- Email notify enabled." 
     410msgid "Email notify enabled." 
    312411msgstr "" 
    313412 
    314413#: pysvnmanager/hooks/plugins/EmailNotify.py:77 
    315 msgid "- Email notify disabled." 
     414msgid "Email notify disabled." 
    316415msgstr "" 
    317416 
    318417#: pysvnmanager/hooks/plugins/EmailNotify.py:79 
    319 msgid "- Parameters: ``" 
    320 msgstr "" 
    321  
    322 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 
    323 msgid "Fill this form" 
    324 msgstr "" 
    325  
    326 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 
     418msgid "Parameters: " 
     419msgstr "" 
     420 
     421#: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    327422msgid "Enable email notify." 
    328423msgstr "" 
    329424 
    330 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    331 msgid "Enable" 
    332 msgstr "" 
    333  
    334 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 
    335 msgid "Disable" 
    336 msgstr "" 
    337  
    338 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     425#: pysvnmanager/hooks/plugins/EmailNotify.py:109 
    339426msgid "Input email notify configurations: " 
    340427msgstr "" 
    341428 
    342 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 
     429#: pysvnmanager/hooks/plugins/EmailNotify.py:139 
     430#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 
    343431msgid "Wrong configuration." 
    344432msgstr "" 
    345433 
    346 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 
     434#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 
    347435msgid "mime-type and eol-style check" 
    348436msgstr "" 
    349437 
    350 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 
     438#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 
    351439msgid "New file must provide svn:eol-style if not binary file." 
    352440msgstr "" 
    353441 
    354 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 
    355 msgid "Subversion client mergeinfo capability check" 
    356 msgstr "" 
    357  
    358 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 
    359 msgid "Do not allow subversion client (<1.5) to checkin." 
     442#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 
     443msgid "Subversion readonly mirror" 
     444msgstr "" 
     445 
     446#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 
     447msgid "" 
     448"This subversion repository is a svnsync readonly mirror. Nobody can " 
     449"checkin, except the svnsync admin user." 
     450msgstr "" 
     451 
     452#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 
     453msgid "" 
     454"Commit to the remote svn server, this repository is a readonly svn " 
     455"mirror.It is the svnsync admin's duty to synchronize svnsync server and " 
     456"mirror." 
     457msgstr "" 
     458 
     459#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 
     460msgid "Readonly mirror enabled." 
     461msgstr "" 
     462 
     463#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 
     464msgid "Readonly mirror disabled." 
     465msgstr "" 
     466 
     467#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 
     468msgid "Admin user: " 
     469msgstr "" 
     470 
     471#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 
     472msgid "Enable readonly mirror: " 
     473msgstr "" 
     474 
     475#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 
     476msgid "Svnsync administrator: " 
    360477msgstr "" 
    361478 
     
    370487msgstr "" 
    371488 
    372 #: pysvnmanager/hooks/plugins/__init__.py:180 
    373 #: pysvnmanager/hooks/plugins/__init__.py:207 
    374 #: pysvnmanager/hooks/plugins/__init__.py:213 
    375 #: pysvnmanager/hooks/plugins/__init__.py:232 
    376 #: pysvnmanager/hooks/plugins/__init__.py:330 
    377 #: pysvnmanager/hooks/plugins/__init__.py:337 
    378 #: pysvnmanager/hooks/plugins/__init__.py:346 
     489#: pysvnmanager/hooks/plugins/__init__.py:182 
     490#: pysvnmanager/hooks/plugins/__init__.py:209 
     491#: pysvnmanager/hooks/plugins/__init__.py:215 
     492#: pysvnmanager/hooks/plugins/__init__.py:234 
     493#: pysvnmanager/hooks/plugins/__init__.py:332 
     494#: pysvnmanager/hooks/plugins/__init__.py:339 
     495#: pysvnmanager/hooks/plugins/__init__.py:348 
    379496msgid "Plugin not fully implemented." 
    380497msgstr "" 
    381498 
    382 #: pysvnmanager/hooks/plugins/__init__.py:311 
     499#: pysvnmanager/hooks/plugins/__init__.py:313 
    383500msgid "Name" 
    384501msgstr "" 
    385502 
    386 #: pysvnmanager/hooks/plugins/__init__.py:313 
     503#: pysvnmanager/hooks/plugins/__init__.py:315 
    387504msgid "Description" 
    388505msgstr "" 
     
    398515msgstr "" 
    399516 
    400 #: pysvnmanager/model/repos.py:137 
     517#: pysvnmanager/model/repos.py:139 
    401518#, python-format 
    402519msgid "Repos %s is not a blank repository." 
     
    866983 
    867984#~ msgid "" 
    868 #~ "\n" 
    869 #~ "**%(id)s**\n" 
    870 #~ "\n" 
    871 #~ "- %(t_name)s: %(name)s\n" 
    872 #~ "- %(t_name)s: %(type)s\n" 
    873 #~ "\n" 
    874 #~ "**%(t_desc)s**\n" 
    875 #~ "\n" 
    876 #~ "%(desc)s\n" 
    877 #~ "\n" 
    878 #~ "%(detail)s\n" 
     985#~ "Subversion services may host on a filename case-sensitive OS,\n" 
     986#~ "while client **may not** (Windows is " 
     987#~ "case-insensitive). This may cause " 
     988#~ "'clash'.\n" 
     989#~ "    \n" 
     990#~ "- Detects new paths that 'clash' with existing, or other new, paths.\n" 
     991#~ "- Ignores existings paths that already 'clash'\n" 
     992#~ "- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" 
     993#~ "  are detected.\n" 
    879994#~ msgstr "" 
    880995 
  • trunk/pysvnmanager/i18n/pysvnmanager.pot

    r46 r47  
    99"Project-Id-Version: pySvnManager 0.2.0\n" 
    1010"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 
    11 "POT-Creation-Date: 2008-08-27 21:52+0800\n" 
     11"POT-Creation-Date: 2008-08-28 19:02+0800\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    141141msgstr "" 
    142142 
    143 #: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:312 
     143#: pysvnmanager/controllers/repos.py:82 pysvnmanager/hooks/plugins/__init__.py:314 
    144144msgid "Type" 
    145145msgstr "" 
     
    237237msgstr "" 
    238238 
    239 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 
     239#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 
     240msgid "Allow revprop change" 
     241msgstr "" 
     242 
     243#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 
     244msgid "Allow user change commit-log or other rev-properties." 
     245msgstr "" 
     246 
     247#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 
     248msgid "" 
     249"Commit-log is the only rev-prop we allow to change. Because the changes of " 
     250"rev-prop can not be reverted back, administrator must setup email " 
     251"notification to record this irreversible action." 
     252msgstr "" 
     253 
     254#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 
    240255msgid "Mantis bugtracking integration" 
    241256msgstr "" 
    242257 
    243 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 
     258#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 
    244259msgid "" 
    245260"Integration Subversion with Mantis bugtracking. If commit-log has proper " 
     
    248263msgstr "" 
    249264 
    250 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 
    251 msgid "check case insensitive" 
     265#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 
     266msgid "Subversion client version check (>1.5.0)" 
     267msgstr "" 
     268 
     269#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 
     270msgid "Check subversion client version. if version below 1.5.0, checkin denied." 
     271msgstr "" 
     272 
     273#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 
     274msgid "" 
     275"SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " 
     276"automated merge tracking!" 
     277msgstr "" 
     278 
     279#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 
     280msgid "Detect case-insensitive filename clashes" 
     281msgstr "" 
     282 
     283#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 
     284msgid "A pre-commit hook to detect case-insensitive filename clashes." 
    252285msgstr "" 
    253286 
    254287#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 
    255 msgid "A pre-commit hook to detect case-insensitive filename clashes." 
    256 msgstr "" 
    257  
    258 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 
     288msgid "" 
     289"Subversion services may host on a filename case-sensitive OS,\n" 
     290"while client **may not** (Windows is case-insensitive). This may cause " 
     291"'clash'.\n" 
     292"\n" 
     293"- Detects new paths that 'clash' with existing, or other new, paths.\n" 
     294"- Ignores existings paths that already 'clash'\n" 
     295"- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" 
     296"  are detected.\n" 
     297msgstr "" 
     298 
     299#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 
    259300msgid "Check commit log message" 
    260301msgstr "" 
    261302 
    262 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 
     303#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 
    263304msgid "User must provide commit-log message when checkin." 
    264305msgstr "" 
    265306 
    266 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 
     307#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 
     308#: pysvnmanager/hooks/plugins/EmailNotify.py:73 
     309#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 
     310msgid "Current configuration" 
     311msgstr "" 
     312 
     313#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 
     314msgid "Commit log check is enabled." 
     315msgstr "" 
     316 
     317#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 
     318msgid "Commit log check is disabled." 
     319msgstr "" 
     320 
     321#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 
     322#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 
     323msgid "Minimal size of commit log: " 
     324msgstr "" 
     325 
     326#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 
     327#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 
     328msgid "Pattern which commit log must match against: " 
     329msgstr "" 
     330 
     331#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 
     332msgid "Pattern which commit log must **NOT** match against: " 
     333msgstr "" 
     334 
     335#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 
     336#: pysvnmanager/hooks/plugins/EmailNotify.py:97 
     337#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 
     338msgid "Fill this form" 
     339msgstr "" 
     340 
     341#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 
     342msgid "Enable commit log check: " 
     343msgstr "" 
     344 
     345#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 
     346#: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     347#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 
     348msgid "Enable" 
     349msgstr "" 
     350 
     351#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 
     352#: pysvnmanager/hooks/plugins/EmailNotify.py:106 
     353#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 
     354msgid "Disable" 
     355msgstr "" 
     356 
     357#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 
     358msgid "Pattern which commit log must <b>NOT</b> match against: " 
     359msgstr "" 
     360 
     361#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 
     362msgid "Commit log size must > 0." 
     363msgstr "" 
     364 
     365#: pysvnmanager/hooks/plugins/EmailNotify.py:11 
    267366msgid "Send email notify for commit event" 
    268367msgstr "" 
    269368 
    270 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 
     369#: pysvnmanager/hooks/plugins/EmailNotify.py:17 
    271370msgid "" 
    272371"Send a notification email describing either a commit or a revprop-change " 
     
    274373msgstr "" 
    275374 
    276 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 
     375#: pysvnmanager/hooks/plugins/EmailNotify.py:21 
    277376msgid "" 
    278377"\n" 
     
    301400 
    302401#: pysvnmanager/hooks/plugins/EmailNotify.py:75 
    303 msgid "- Email notify enabled." 
     402msgid "Email notify enabled." 
    304403msgstr "" 
    305404 
    306405#: pysvnmanager/hooks/plugins/EmailNotify.py:77 
    307 msgid "- Email notify disabled." 
     406msgid "Email notify disabled." 
    308407msgstr "" 
    309408 
    310409#: pysvnmanager/hooks/plugins/EmailNotify.py:79 
    311 msgid "- Parameters: ``" 
    312 msgstr "" 
    313  
    314 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 
    315 msgid "Fill this form" 
    316 msgstr "" 
    317  
    318 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 
     410msgid "Parameters: " 
     411msgstr "" 
     412 
     413#: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    319414msgid "Enable email notify." 
    320415msgstr "" 
    321416 
    322 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    323 msgid "Enable" 
    324 msgstr "" 
    325  
    326 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 
    327 msgid "Disable" 
    328 msgstr "" 
    329  
    330 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     417#: pysvnmanager/hooks/plugins/EmailNotify.py:109 
    331418msgid "Input email notify configurations: " 
    332419msgstr "" 
    333420 
    334 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 
     421#: pysvnmanager/hooks/plugins/EmailNotify.py:139 
     422#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 
    335423msgid "Wrong configuration." 
    336424msgstr "" 
    337425 
    338 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 
     426#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 
    339427msgid "mime-type and eol-style check" 
    340428msgstr "" 
    341429 
    342 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 
     430#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 
    343431msgid "New file must provide svn:eol-style if not binary file." 
    344432msgstr "" 
    345433 
    346 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 
    347 msgid "Subversion client mergeinfo capability check" 
    348 msgstr "" 
    349  
    350 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 
    351 msgid "Do not allow subversion client (<1.5) to checkin." 
     434#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 
     435msgid "Subversion readonly mirror" 
     436msgstr "" 
     437 
     438#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 
     439msgid "" 
     440"This subversion repository is a svnsync readonly mirror. Nobody can checkin, " 
     441"except the svnsync admin user." 
     442msgstr "" 
     443 
     444#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 
     445msgid "" 
     446"Commit to the remote svn server, this repository is a readonly svn mirror.It " 
     447"is the svnsync admin's duty to synchronize svnsync server and mirror." 
     448msgstr "" 
     449 
     450#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 
     451msgid "Readonly mirror enabled." 
     452msgstr "" 
     453 
     454#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 
     455msgid "Readonly mirror disabled." 
     456msgstr "" 
     457 
     458#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 
     459msgid "Admin user: " 
     460msgstr "" 
     461 
     462#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 
     463msgid "Enable readonly mirror: " 
     464msgstr "" 
     465 
     466#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 
     467msgid "Svnsync administrator: " 
    352468msgstr "" 
    353469 
     
    362478msgstr "" 
    363479 
    364 #: pysvnmanager/hooks/plugins/__init__.py:180 
    365 #: pysvnmanager/hooks/plugins/__init__.py:207 
    366 #: pysvnmanager/hooks/plugins/__init__.py:213 
    367 #: pysvnmanager/hooks/plugins/__init__.py:232 
    368 #: pysvnmanager/hooks/plugins/__init__.py:330 
    369 #: pysvnmanager/hooks/plugins/__init__.py:337 
    370 #: pysvnmanager/hooks/plugins/__init__.py:346 
     480#: pysvnmanager/hooks/plugins/__init__.py:182 
     481#: pysvnmanager/hooks/plugins/__init__.py:209 
     482#: pysvnmanager/hooks/plugins/__init__.py:215 
     483#: pysvnmanager/hooks/plugins/__init__.py:234 
     484#: pysvnmanager/hooks/plugins/__init__.py:332 
     485#: pysvnmanager/hooks/plugins/__init__.py:339 
     486#: pysvnmanager/hooks/plugins/__init__.py:348 
    371487msgid "Plugin not fully implemented." 
    372488msgstr "" 
    373489 
    374 #: pysvnmanager/hooks/plugins/__init__.py:311 
     490#: pysvnmanager/hooks/plugins/__init__.py:313 
    375491msgid "Name" 
    376492msgstr "" 
    377493 
    378 #: pysvnmanager/hooks/plugins/__init__.py:313 
     494#: pysvnmanager/hooks/plugins/__init__.py:315 
    379495msgid "Description" 
    380496msgstr "" 
     
    390506msgstr "" 
    391507 
    392 #: pysvnmanager/model/repos.py:137 
     508#: pysvnmanager/model/repos.py:139 
    393509#, python-format 
    394510msgid "Repos %s is not a blank repository." 
  • trunk/pysvnmanager/i18n/zh/LC_MESSAGES/pysvnmanager.po

    r46 r47  
    99msgid "" 
    1010msgstr "" 
    11 "Project-Id-Version:  pysvnmanager\n" 
     11"Project-Id-Version: pysvnmanager\n" 
    1212"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 
    1313"POT-Creation-Date: 2008-07-03 22:14+0800\n" 
    14 "PO-Revision-Date: 2008-08-27 21:52+0800\n" 
     14"PO-Revision-Date: 2008-08-28 19:04+0800\n" 
    1515"Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n" 
    16 "Language-Team: <zh@li.org>\n" 
     16"Language-Team:  <zh@li.org>\n" 
    1717"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" 
    1818"MIME-Version: 1.0\n" 
    19 "Content-Type: text/plain; charset=utf-8\n" 
     19"Content-Type: text/plain; charset=UTF-8\n" 
    2020"Content-Transfer-Encoding: 8bit\n" 
    2121"Generated-By: Babel 0.9.2\n" 
     22"X-Generator: KBabel 1.11.4\n" 
    2223 
    2324#: pysvnmanager/controllers/authz.py:43 
     
    151152 
    152153#: pysvnmanager/controllers/repos.py:82 
    153 #: pysvnmanager/hooks/plugins/__init__.py:312 
     154#: pysvnmanager/hooks/plugins/__init__.py:314 
    154155msgid "Type" 
    155156msgstr "类型" 
     
    255256msgstr "用户 %s 登出" 
    256257 
    257 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:13 
     258#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:10 
     259msgid "Allow revprop change" 
     260msgstr "允许修改版本属性" 
     261 
     262#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:16 
     263msgid "Allow user change commit-log or other rev-properties." 
     264msgstr "允许用户修改提交说明等版本属性" 
     265 
     266#: pysvnmanager/hooks/plugins/AllowRevpropChange.py:19 
     267msgid "" 
     268"Commit-log is the only rev-prop we allow to change. Because the changes " 
     269"of rev-prop can not be reverted back, administrator must setup email " 
     270"notification to record this irreversible action." 
     271msgstr "提交说明是我们唯一允许修改的版本属性。因为版本属性本身未被版本控制,修改版本属性是不可恢复的操作,所以管理员在启用本功能前,应该考虑设置变更通知以记录修改事件。" 
     272 
     273#: pysvnmanager/hooks/plugins/BugtrackMantis.py:10 
    258274msgid "Mantis bugtracking integration" 
    259275msgstr "整合 Mantis 缺陷跟踪系统" 
    260276 
    261 #: pysvnmanager/hooks/plugins/BugtrackMantis.py:19 
     277#: pysvnmanager/hooks/plugins/BugtrackMantis.py:16 
    262278msgid "" 
    263279"Integration Subversion with Mantis bugtracking. If commit-log has proper " 
     
    268284"的状态修改为已修改,并将commit-log 以及代码变更添加到说明中。" 
    269285 
    270 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:13 
    271 msgid "check case insensitive" 
    272 msgstr "大小写不敏感" 
    273  
    274 #: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 
     286#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:10 
     287msgid "Subversion client version check (>1.5.0)" 
     288msgstr "Subversion 客户端版本检查 (>1.5.0)" 
     289 
     290#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:16 
     291msgid "Check subversion client version. if version below 1.5.0, checkin denied." 
     292msgstr "检查 subversion 客户端版本。如果版本号小于 1.5.0,禁止客户端提交。" 
     293 
     294#: pysvnmanager/hooks/plugins/CapCheckMergeInfo.py:19 
     295msgid "" 
     296"SVN below 1.5.0 can not handle mergeinfo properly.It can mess up our " 
     297"automated merge tracking!" 
     298msgstr "小于 1.5.0 版本的 SVN 客户端不能正确处理 mergeinfo。会破坏自动的合并追踪功能!" 
     299 
     300#: pysvnmanager/hooks/plugins/CaseInsensitive.py:10 
     301msgid "Detect case-insensitive filename clashes" 
     302msgstr "检查大小写引起的文件名冲突" 
     303 
     304#: pysvnmanager/hooks/plugins/CaseInsensitive.py:16 
    275305msgid "A pre-commit hook to detect case-insensitive filename clashes." 
    276306msgstr "在 pre-commit 钩子中执行,检查文件名大小写引起的文件名冲突。" 
    277307 
    278 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:13 
     308#: pysvnmanager/hooks/plugins/CaseInsensitive.py:19 
     309msgid "" 
     310"Subversion services may host on a filename case-sensitive OS,\n" 
     311"while client **may not** (Windows is case-insensitive). This may cause " 
     312"'clash'.\n" 
     313"\n" 
     314"- Detects new paths that 'clash' with existing, or other new, paths.\n" 
     315"- Ignores existings paths that already 'clash'\n" 
     316"- Exits with an error code, and a diagnostic on stderr, if 'clashes'\n" 
     317"  are detected.\n" 
     318msgstr "" 
     319"Subversion 服务可能安装在一个文件名大小写敏感的操作系统(如 Linux),\n" 
     320"而客户端则可能 **不是** (Windows 文件名大小写不敏感)。这将造成冲突。\n" 
     321"\n" 
     322"- 检查新提交的文件的路径是否和已经存在的路径或者其他新增文件相冲突。\n" 
     323"- 忽略已经存在的“冲突”的路径\n" 
     324"- 如果发现冲突,拒绝提交,并报错。\n" 
     325 
     326#: pysvnmanager/hooks/plugins/CommitLogCheck.py:11 
    279327msgid "Check commit log message" 
    280328msgstr "检查提交说明" 
    281329 
    282 #: pysvnmanager/hooks/plugins/CommitLogCheck.py:19 
     330#: pysvnmanager/hooks/plugins/CommitLogCheck.py:17 
    283331msgid "User must provide commit-log message when checkin." 
    284332msgstr "用户在代码提交时,必须提供提交说明。" 
    285333 
    286 #: pysvnmanager/hooks/plugins/EmailNotify.py:13 
     334#: pysvnmanager/hooks/plugins/CommitLogCheck.py:50 
     335#: pysvnmanager/hooks/plugins/EmailNotify.py:73 
     336#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:49 
     337msgid "Current configuration" 
     338msgstr "当前设置" 
     339 
     340#: pysvnmanager/hooks/plugins/CommitLogCheck.py:52 
     341msgid "Commit log check is enabled." 
     342msgstr "提交说明检查已经启用。" 
     343 
     344#: pysvnmanager/hooks/plugins/CommitLogCheck.py:54 
     345msgid "Commit log check is disabled." 
     346msgstr "提交说明检查已经禁用。" 
     347 
     348#: pysvnmanager/hooks/plugins/CommitLogCheck.py:56 
     349#: pysvnmanager/hooks/plugins/CommitLogCheck.py:95 
     350msgid "Minimal size of commit log: " 
     351msgstr "提交说明长度检查,最少:" 
     352 
     353#: pysvnmanager/hooks/plugins/CommitLogCheck.py:61 
     354#: pysvnmanager/hooks/plugins/CommitLogCheck.py:101 
     355msgid "Pattern which commit log must match against: " 
     356msgstr "提交说明必须与该模板匹配:" 
     357 
     358#: pysvnmanager/hooks/plugins/CommitLogCheck.py:64 
     359msgid "Pattern which commit log must **NOT** match against: " 
     360msgstr "提交说明 **不能** 出现类似内容:" 
     361 
     362#: pysvnmanager/hooks/plugins/CommitLogCheck.py:83 
     363#: pysvnmanager/hooks/plugins/EmailNotify.py:97 
     364#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:73 
     365msgid "Fill this form" 
     366msgstr "填写表单" 
     367 
     368#: pysvnmanager/hooks/plugins/CommitLogCheck.py:87 
     369msgid "Enable commit log check: " 
     370msgstr "启用提交说明检查:" 
     371 
     372#: pysvnmanager/hooks/plugins/CommitLogCheck.py:90 
     373#: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     374#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:80 
     375msgid "Enable" 
     376msgstr "启用" 
     377 
     378#: pysvnmanager/hooks/plugins/CommitLogCheck.py:92 
     379#: pysvnmanager/hooks/plugins/EmailNotify.py:106 
     380#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:82 
     381msgid "Disable" 
     382msgstr "关闭" 
     383 
     384#: pysvnmanager/hooks/plugins/CommitLogCheck.py:107 
     385msgid "Pattern which commit log must <b>NOT</b> match against: " 
     386msgstr "提交说明<b>不能</b>出现类似内容:" 
     387 
     388#: pysvnmanager/hooks/plugins/CommitLogCheck.py:140 
     389msgid "Commit log size must > 0." 
     390msgstr "提交说明最小长度阈值必须大于零。" 
     391 
     392#: pysvnmanager/hooks/plugins/EmailNotify.py:11 
    287393msgid "Send email notify for commit event" 
    288394msgstr "针对代码变更发出邮件通知" 
    289395 
    290 #: pysvnmanager/hooks/plugins/EmailNotify.py:19 
     396#: pysvnmanager/hooks/plugins/EmailNotify.py:17 
    291397msgid "" 
    292398"Send a notification email describing either a commit or a revprop-change " 
     
    294400msgstr "当对 Subversion 代码库中的代码修改或者修改状态,发出邮件通知。" 
    295401 
    296 #: pysvnmanager/hooks/plugins/EmailNotify.py:23 
     402#: pysvnmanager/hooks/plugins/EmailNotify.py:21 
    297403msgid "" 
    298404"\n" 
     
    341447 
    342448#: pysvnmanager/hooks/plugins/EmailNotify.py:75 
    343 msgid "- Email notify enabled." 
    344 msgstr "- 邮件通知启用。" 
     449msgid "Email notify enabled." 
     450msgstr "邮件通知启用。" 
    345451 
    346452#: pysvnmanager/hooks/plugins/EmailNotify.py:77 
    347 msgid "- Email notify disabled." 
    348 msgstr "- 邮件通知关闭。" 
     453msgid "Email notify disabled." 
     454msgstr "邮件通知关闭。" 
    349455 
    350456#: pysvnmanager/hooks/plugins/EmailNotify.py:79 
    351 msgid "- Parameters: ``" 
    352 msgstr "- 参数: ``" 
    353  
    354 #: pysvnmanager/hooks/plugins/EmailNotify.py:97 
    355 msgid "Fill this form" 
    356 msgstr "填写表单" 
    357  
    358 #: pysvnmanager/hooks/plugins/EmailNotify.py:99 
     457msgid "Parameters: " 
     458msgstr "参数: " 
     459 
     460#: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    359461msgid "Enable email notify." 
    360462msgstr "启用邮件通知。" 
    361463 
    362 #: pysvnmanager/hooks/plugins/EmailNotify.py:101 
    363 msgid "Enable" 
    364 msgstr "启用" 
    365  
    366 #: pysvnmanager/hooks/plugins/EmailNotify.py:103 
    367 msgid "Disable" 
    368 msgstr "关闭" 
    369  
    370 #: pysvnmanager/hooks/plugins/EmailNotify.py:104 
     464#: pysvnmanager/hooks/plugins/EmailNotify.py:109 
    371465msgid "Input email notify configurations: " 
    372466msgstr "输入邮件通知配置参数: " 
    373467 
    374 #: pysvnmanager/hooks/plugins/EmailNotify.py:131 
     468#: pysvnmanager/hooks/plugins/EmailNotify.py:139 
     469#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:115 
    375470msgid "Wrong configuration." 
    376471msgstr "错误的配置" 
    377472 
    378 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:13 
     473#: pysvnmanager/hooks/plugins/EolStyleCheck.py:10 
    379474msgid "mime-type and eol-style check" 
    380475msgstr "文件类型和换行符设置检查" 
    381476 
    382 #: pysvnmanager/hooks/plugins/EolStyleCheck.py:19 
     477#: pysvnmanager/hooks/plugins/EolStyleCheck.py:16 
    383478msgid "New file must provide svn:eol-style if not binary file." 
    384479msgstr "新增的文本文件,必须设置换行符。" 
    385480 
    386 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:13 
    387 msgid "Subversion client mergeinfo capability check" 
    388 msgstr "Subversion 客户端版本检查(mergeinfo 功能)" 
    389  
    390 #: pysvnmanager/hooks/plugins/MergeinfoClient.py:19 
    391 msgid "Do not allow subversion client (<1.5) to checkin." 
    392 msgstr "不允许小于 1.5 的 subversion 客户端进行提交。" 
     481#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:10 
     482msgid "Subversion readonly mirror" 
     483msgstr "SVN 只读镜像" 
     484 
     485#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:16 
     486msgid "" 
     487"This subversion repository is a svnsync readonly mirror. Nobody can " 
     488"checkin, except the svnsync admin user." 
     489msgstr "本 SVN 版本库是一个 svnsync 的只读镜像。除了 svnsync 管理员,任何人都不能提交。" 
     490 
     491#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:20 
     492msgid "" 
     493"Commit to the remote svn server, this repository is a readonly svn " 
     494"mirror.It is the svnsync admin's duty to synchronize svnsync server and " 
     495"mirror." 
     496msgstr "提交到远程的 SVN 服务器,本地服务器是一个只读的 SVN 镜像。同步远程与本地的 SVN 服务器,是管理员的职责。" 
     497 
     498#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:51 
     499msgid "Readonly mirror enabled." 
     500msgstr "只读镜像启用。" 
     501 
     502#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:53 
     503msgid "Readonly mirror disabled." 
     504msgstr "只读镜像关闭。" 
     505 
     506#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:55 
     507msgid "Admin user: " 
     508msgstr "管理员: " 
     509 
     510#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:77 
     511msgid "Enable readonly mirror: " 
     512msgstr "启用只读镜像:" 
     513 
     514#: pysvnmanager/hooks/plugins/ReadonlySvnMirror.py:85 
     515msgid "Svnsync administrator: " 
     516msgstr "Svnsync 管理员:" 
    393517 
    394518#: pysvnmanager/hooks/plugins/__init__.py:95 
     
    402526msgstr "冲突:插件'%s'被其他人修改了。" 
    403527 
    404 #: pysvnmanager/hooks/plugins/__init__.py:180 
    405 #: pysvnmanager/hooks/plugins/__init__.py:207 
    406 #: pysvnmanager/hooks/plugins/__init__.py:213 
    407 #: pysvnmanager/hooks/plugins/__init__.py:232 
    408 #: pysvnmanager/hooks/plugins/__init__.py:330 
    409 #: pysvnmanager/hooks/plugins/__init__.py:337 
    410 #: pysvnmanager/hooks/plugins/__init__.py:346 
     528#: pysvnmanager/hooks/plugins/__init__.py:182 
     529#: pysvnmanager/hooks/plugins/__init__.py:209 
     530#: pysvnmanager/hooks/plugins/__init__.py:215 
     531#: pysvnmanager/hooks/plugins/__init__.py:234 
     532#: pysvnmanager/hooks/plugins/__init__.py:332 
     533#: pysvnmanager/hooks/plugins/__init__.py:339 
     534#: pysvnmanager/hooks/plugins/__init__.py:348 
    411535msgid "Plugin not fully implemented." 
    412536msgstr "插件未完全实现。" 
    413537 
    414 #: pysvnmanager/hooks/plugins/__init__.py:311 
     538#: pysvnmanager/hooks/plugins/__init__.py:313 
    415539msgid "Name" 
    416540msgstr "名称" 
    417541 
    418 #: pysvnmanager/hooks/plugins/__init__.py:313 
     542#: pysvnmanager/hooks/plugins/__init__.py:315 
    419543msgid "Description" 
    420544msgstr "说明" 
     
    430554msgstr "版本库 %s 已经存在。" 
    431555 
    432 #: pysvnmanager/model/repos.py:137 
     556#: pysvnmanager/model/repos.py:139 
    433557#, python-format 
    434558msgid "Repos %s is not a blank repository." 
     
    501625#, python-format 
    502626msgid "User %(username)s can *NOT* access to module %(repos)s:%(path)s" 
    503 msgstr "用户 %(username)s 对模组 %(repos)s:%(path)s 没有访问权限 (XX)" 
     627msgstr "用户 %(username)s 对模组 %(repos)s:%(path)s *没有* 访问权限 (XX)" 
    504628 
    505629#: pysvnmanager/model/svnauthz.py:1813 
     
    9171041msgstr "用户名:" 
    9181042 
    919 #~ msgid "" 
    920 #~ "\n" 
    921 #~ "**%(id)s**\n" 
    922 #~ "\n" 
    923 #~ "- %(t_name)s: %(name)s\n" 
    924 #~ "- %(t_name)s: %(type)s\n" 
    925 #~ "\n" 
    926 #~ "**%(t_desc)s**\n" 
    927 #~ "\n" 
    928 #~ "%(desc)s\n" 
    929 #~ "\n" 
    930 #~ "%(detail)s\n" 
    931 #~ msgstr "" 
    932  
  • trunk/pysvnmanager/model/hooks.py

    r45 r47  
    4444         
    4545        self.plugins = {} 
    46         self.pluginnames = plugins.modules 
    47         for m in self.pluginnames: 
     46        for m in plugins.modules: 
    4847            self.plugins[m] = plugins.getHandler(m)(self.__repos_path) 
     48            self.plugins[m].id = m 
     49        self.pluginnames = [ m.id for m in sorted(self.plugins.values()) ] 
    4950     
    5051    def __get_applied_plugins(self): 
    51         result={} 
    52         for k,v in self.plugins.iteritems(): 
    53             if v.enabled(): 
    54                 result[k]=v 
    55         return result 
     52        return [ m for m in self.pluginnames if self.plugins[m].enabled()] 
    5653     
    5754    applied_plugins = property(__get_applied_plugins) 
    5855 
    5956    def __get_unapplied_plugins(self): 
    60         result={} 
    61         for k,v in self.plugins.iteritems(): 
    62             if not v.enabled(): 
    63                 result[k]=v 
    64         return result 
     57        return [ m for m in self.pluginnames if not self.plugins[m].enabled()] 
    6558     
    6659    unapplied_plugins = property(__get_unapplied_plugins) 
  • trunk/pysvnmanager/model/repos.py

    r45 r47  
    6868            raise Exception, _("Repos %s already exists.") % repos_name 
    6969        from svn import repos as _repos 
     70        if isinstance(repos_path, unicode): 
     71            repos_path = repos_path.encode('utf-8') 
    7072        _repos.create(repos_path, "", "", None, { "fs-type": "fsfs" }) 
    7173        self.hooks_init(repos_name) 
  • trunk/pysvnmanager/tests/test_repos.py

    r46 r47  
    7676        self.assertRaises(Exception,  plugins.getHandler("CaseInsensitive"), "") 
    7777        module_ci = plugins.getHandler("CaseInsensitive")(self.repos_root + '/project1') 
    78         self.assert_(module_ci.name=="check case insensitive", module_ci.name) 
     78        self.assert_(module_ci.name=="Detect case-insensitive filename clashes", module_ci.name) 
    7979        self.assert_(module_ci.description!="", module_ci.description) 
    8080       
     
    9595        self.assert_('EolStyleCheck' in myhooks.pluginnames, myhooks.pluginnames) 
    9696         
    97         self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
    98         self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
     97        self.assert_('CaseInsensitive' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
     98        self.assert_('EolStyleCheck' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
    9999         
    100100        m = myhooks.plugins['CaseInsensitive'] 
    101         self.assert_(m.name=="check case insensitive", m.name) 
     101        self.assert_(m.name=="Detect case-insensitive filename clashes", m.name) 
    102102        self.assert_(m.description!="", m.description) 
    103103     
     
    107107        m = myhooks.plugins['CaseInsensitive'] 
    108108        self.assert_(m.enabled()==False) 
    109         self.assert_('CaseInsensitive' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    110         self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    111         self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
    112         self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
     109        self.assert_('CaseInsensitive' not in myhooks.applied_plugins, myhooks.applied_plugins) 
     110        self.assert_('EolStyleCheck' not in myhooks.applied_plugins, myhooks.applied_plugins) 
     111        self.assert_('CaseInsensitive' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
     112        self.assert_('EolStyleCheck' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
    113113 
    114114        m.install() 
    115115        self.assert_(m.enabled()==True) 
    116         self.assert_('CaseInsensitive' in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    117         self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    118         self.assert_('CaseInsensitive' not in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
    119         self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
     116        self.assert_('CaseInsensitive' in myhooks.applied_plugins, myhooks.applied_plugins) 
     117        self.assert_('EolStyleCheck' not in myhooks.applied_plugins, myhooks.applied_plugins) 
     118        self.assert_('CaseInsensitive' not in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
     119        self.assert_('EolStyleCheck' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
    120120 
    121121        m.uninstall() 
    122122        self.assert_(m.enabled()==False) 
    123         self.assert_('CaseInsensitive' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    124         self.assert_('EolStyleCheck' not in myhooks.applied_plugins.keys(), myhooks.applied_plugins.keys()) 
    125         self.assert_('CaseInsensitive' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
    126         self.assert_('EolStyleCheck' in myhooks.unapplied_plugins.keys(), myhooks.unapplied_plugins.keys()) 
     123        self.assert_('CaseInsensitive' not in myhooks.applied_plugins, myhooks.applied_plugins) 
     124        self.assert_('EolStyleCheck' not in myhooks.applied_plugins, myhooks.applied_plugins) 
     125        self.assert_('CaseInsensitive' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
     126        self.assert_('EolStyleCheck' in myhooks.unapplied_plugins, myhooks.unapplied_plugins) 
    127127 
    128128 
  • trunk/setup.py

    r44 r47  
    1818    include_package_data=True, 
    1919    test_suite='nose.collector', 
    20     package_data={'pysvnmanager': ['i18n/*/LC_MESSAGES/*.mo', 'config/*.in']}, 
     20    package_data={'pysvnmanager': ['i18n/*/LC_MESSAGES/*.mo', 'config/*.in', ]}, 
    2121    message_extractors = {'pysvnmanager': [ 
    2222            ('**.py', 'python', None),