Changeset 48

Show
Ignore:
Timestamp:
2008年08月28日 23时58分56秒 (4 years ago)
Author:
jiangx
Message:

upgrade to 0.2.1; format exception message;

Location:
trunk
Files:
8 modified

Legend:

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

    r47 r48  
    2121pysvnmanager/websetup.py 
    2222pysvnmanager/config/DefaultConfig.py 
    23 pysvnmanager/config/DefaultConfig.pyc 
    2423pysvnmanager/config/__init__.py 
    25 pysvnmanager/config/__init__.pyc 
    2624pysvnmanager/config/environment.py 
    27 pysvnmanager/config/environment.pyc 
    2825pysvnmanager/config/localconfig.py.in 
    2926pysvnmanager/config/middleware.py 
    30 pysvnmanager/config/middleware.pyc 
    3127pysvnmanager/config/routing.py 
    32 pysvnmanager/config/routing.pyc 
    3328pysvnmanager/config/svn.access.in 
    3429pysvnmanager/config/svn.passwd.in 
     
    5449pysvnmanager/hooks/init/hook1.4/pre-unlock.tmpl 
    5550pysvnmanager/hooks/init/hook1.4/start-commit 
     51pysvnmanager/hooks/init/hook1.4/scripts/README 
     52pysvnmanager/hooks/init/hook1.4/scripts/check-authz.py 
     53pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.pl 
     54pysvnmanager/hooks/init/hook1.4/scripts/check-case-insensitive.py 
     55pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.pl 
     56pysvnmanager/hooks/init/hook1.4/scripts/check-mime-type.py 
     57pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg 
     58pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.cfg.example 
     59pysvnmanager/hooks/init/hook1.4/scripts/commit-access-control.pl 
     60pysvnmanager/hooks/init/hook1.4/scripts/commit-block-joke.py 
     61pysvnmanager/hooks/init/hook1.4/scripts/commit-email.pl 
     62pysvnmanager/hooks/init/hook1.4/scripts/commit-email.rb 
     63pysvnmanager/hooks/init/hook1.4/scripts/commit_log_check.py 
     64pysvnmanager/hooks/init/hook1.4/scripts/detect-merge-conflicts.sh 
     65pysvnmanager/hooks/init/hook1.4/scripts/log-police.py 
     66pysvnmanager/hooks/init/hook1.4/scripts/pre-commit-check.py 
     67pysvnmanager/hooks/init/hook1.4/scripts/pre-lock-require-needs-lock.py 
     68pysvnmanager/hooks/init/hook1.4/scripts/svn2rss.py 
     69pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf 
     70pysvnmanager/hooks/init/hook1.4/scripts/svnperms.conf.example 
     71pysvnmanager/hooks/init/hook1.4/scripts/svnperms.py 
     72pysvnmanager/hooks/init/hook1.4/scripts/verify-po.py 
    5673pysvnmanager/hooks/init/hook1.5/parse_ini.sh 
    5774pysvnmanager/hooks/init/hook1.5/post-commit 
     
    6481pysvnmanager/hooks/init/hook1.5/pre-unlock.tmpl 
    6582pysvnmanager/hooks/init/hook1.5/start-commit 
     83pysvnmanager/hooks/init/hook1.5/scripts/README 
     84pysvnmanager/hooks/init/hook1.5/scripts/check-authz.py 
     85pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.pl 
     86pysvnmanager/hooks/init/hook1.5/scripts/check-case-insensitive.py 
     87pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.pl 
     88pysvnmanager/hooks/init/hook1.5/scripts/check-mime-type.py 
     89pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg 
     90pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.cfg.example 
     91pysvnmanager/hooks/init/hook1.5/scripts/commit-access-control.pl 
     92pysvnmanager/hooks/init/hook1.5/scripts/commit-block-joke.py 
     93pysvnmanager/hooks/init/hook1.5/scripts/commit-email.pl 
     94pysvnmanager/hooks/init/hook1.5/scripts/commit-email.rb 
     95pysvnmanager/hooks/init/hook1.5/scripts/commit_log_check.py 
     96pysvnmanager/hooks/init/hook1.5/scripts/detect-merge-conflicts.sh 
     97pysvnmanager/hooks/init/hook1.5/scripts/log-police.py 
     98pysvnmanager/hooks/init/hook1.5/scripts/pre-commit-check.py 
     99pysvnmanager/hooks/init/hook1.5/scripts/pre-lock-require-needs-lock.py 
     100pysvnmanager/hooks/init/hook1.5/scripts/svn2rss.py 
     101pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf 
     102pysvnmanager/hooks/init/hook1.5/scripts/svnperms.conf.example 
     103pysvnmanager/hooks/init/hook1.5/scripts/svnperms.py 
     104pysvnmanager/hooks/init/hook1.5/scripts/verify-po.py 
    66105pysvnmanager/hooks/plugins/AllowRevpropChange.py 
    67106pysvnmanager/hooks/plugins/BugtrackMantis.py 
  • trunk/pysvnmanager/controllers/authz.py

    r45 r48  
    193193            self.authz.save(revision, comment=log_message) 
    194194        except Exception, e: 
    195             msg = get_unicode(e.message) 
     195            msg = except_to_unicode(e) 
    196196 
    197197        log.info(log_message) 
     
    216216            self.authz.save(revision, comment=log_message) 
    217217        except Exception, e: 
    218             msg = get_unicode(e.message) 
     218            msg = except_to_unicode(e) 
    219219         
    220220        log.info(log_message) 
  • trunk/pysvnmanager/controllers/repos.py

    r47 r48  
    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} + "</div>" 
     120                        "plugin": pluginname, "repos":reposname, "msg": except_to_unicode(e) } + "</div>" 
    121121        else: 
    122122            result = "<div class='info'>" + _("Apply plugin '%(plugin)s' on '%(repos)s' success.") % { 
     
    142142            except Exception, e: 
    143143                result = "<div class='error'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { 
    144                         "plugin": ", ".join(plugin_list), "repos":reposname, "msg": e.message} + "</div>" 
     144                        "plugin": ", ".join(plugin_list), "repos":reposname, "msg": except_to_unicode(e) } + "</div>" 
    145145            else: 
    146146                result = "<div class='info'>" + _("Delete plugin '%(plugin)s' on '%(repos)s' success.") % { 
     
    157157        except Exception, e: 
    158158            result = "<div class='error'>" + _("Create repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { 
    159                         "repos":reposname, "msg": e.message} + "</div>" 
     159                        "repos":reposname, "msg": except_to_unicode(e) } + "</div>" 
    160160        else: 
    161161            result = "<div class='info'>" + _("Create repository '%(repos)s' success.") % {"repos":reposname} + "</div>" 
     
    173173        except Exception, e: 
    174174            result = "<div class='error'>" + _("Delete repository '%(repos)s' Failed. Error message:<br>\n%(msg)s") % { 
    175                         "repos":reposname, "msg": e.message} + "</div>" 
     175                        "repos":reposname, "msg": except_to_unicode(e) } + "</div>" 
    176176        else: 
    177177            result = "<div class='info'>" + _("Delete blank repository '%(repos)s' success.") % {"repos":reposname} + "</div>" 
  • trunk/pysvnmanager/controllers/role.py

    r45 r48  
    108108            self.authz.save(revision, comment=log_message) 
    109109        except Exception, e: 
    110             msg = get_unicode(e.message) 
     110            msg = except_to_unicode(e) 
    111111 
    112112        log.info(log_message) 
     
    129129                self.authz.save(revision, comment=log_message) 
    130130            except Exception, e: 
    131                 msg = get_unicode(e.message) 
     131                msg = except_to_unicode(e) 
    132132 
    133133        log.info(log_message) 
     
    150150            self.authz.save(revision, comment=log_message) 
    151151        except Exception, e: 
    152             msg = get_unicode(e.message) 
     152            msg = except_to_unicode(e) 
    153153 
    154154        log.info(log_message) 
     
    171171                self.authz.save(revision, comment=log_message) 
    172172            except Exception, e: 
    173                 msg = get_unicode(e.message) 
     173                msg = except_to_unicode(e) 
    174174 
    175175        log.info(log_message) 
  • trunk/pysvnmanager/hooks/plugins/ReadonlySvnMirror.py

    r47 r48  
    113113        admin = params.get('admin') 
    114114        if not admin: 
    115             raise Exception, _("Wrong configuration.") 
     115            raise Exception(_("Wrong configuration.")) 
    116116        self.set_config(self.key_switch, switch) 
    117117        self.set_config(self.key_admin, admin) 
  • trunk/pysvnmanager/lib/base.py

    r26 r48  
    3737    return msg 
    3838 
     39def except_to_unicode(e): 
     40    msg = ', '.join(e.args) 
     41    return get_unicode(msg) 
     42 
     43def except_to_utf8(e): 
     44    msg = ', '.join(e.args) 
     45    return get_utf8(msg) 
     46 
    3947class BaseController(WSGIController): 
    4048    requires_auth = [] 
  • trunk/pysvnmanager/websetup.py

    r27 r48  
    2323    if not os.path.exists(here+'/config/RCS'): 
    2424        os.mkdir(here+'/config/RCS') 
     25    if not os.path.exists(here+'/svnroot'): 
     26        os.mkdir(here+'/svnroot') 
    2527    filelist = ['svn.access', 'svn.passwd', 'localconfig.py'] 
    2628    for f in filelist: 
  • trunk/setup.py

    r47 r48  
    88setup( 
    99    name='pySvnManager', 
    10     version="0.2.0", 
     10    version="0.2.1", 
    1111    description='SVN authz web management tools.', 
    1212    author='Jiang Xin',