Changeset 49

Show
Ignore:
Timestamp:
2008年08月29日 10时48分06秒 (4 years ago)
Author:
jiangx
Message:

See #8: (r93) add depends on docutils; chmod 0755 for hooks when repos initialize;

Location:
trunk
Files:
5 modified

Legend:

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

    r6 r49  
    11Pylons>=0.9.6.2 
     2docutils 
  • trunk/pysvnmanager/i18n/en/LC_MESSAGES

    • Property svn:ignore deleted
  • trunk/pysvnmanager/i18n/zh/LC_MESSAGES

    • Property svn:ignore deleted
  • trunk/pysvnmanager/model/repos.py

    r47 r49  
    8989        # copy hook-scripts from matched hooks templates directory. 
    9090        src = hooks.init.svn_hooks_init_base + '/' + hooks.init.svn_hooks_init_dict[matched] 
     91        src = os.path.abspath(src) 
    9192        dest = "%(root)s/%(entry)s/hooks" % { "root": self.repos_root, "entry": repos_name} 
     93        dest = os.path.abspath(dest) 
    9294         
    93         log.debug('Now copy hooks from \n\t%s to \n\t%s' % (src, dest)) 
    9495        import shutil 
    95         shutil.rmtree(dest) 
    96         shutil.copytree(src, dest, symlinks=True) 
    97          
     96        if os.path.exists(dest): 
     97            assert os.path.basename(dest) == 'hooks' 
     98            shutil.rmtree(dest) 
     99        elif not os.path.exists(os.path.basename(dest)): 
     100            raise Exception("Destination repository '%s' not exist!" % os.path.basename(dest)) 
     101        for root, dirs, files in os.walk(src): 
     102            targetdir = root.replace(src, dest, 1) 
     103            os.mkdir(targetdir) 
     104            for name in files: 
     105                shutil.copy(os.path.join(root, name), os.path.join(targetdir, name)) 
     106                os.chmod(os.path.join(targetdir, name), 0755) 
     107            if '.svn' in dirs: 
     108                dirs.remove('.svn')  # don't visit SVN directories 
    98109     
    99110    def svnversion(self): 
  • trunk/setup.py

    r48 r49  
    1313    author_email='jiangxin@ossxp.com', 
    1414    url='https://sourceforge.net/projects/pysvnmanager', 
    15     #install_requires=["Pylons>=0.9.6.2", "python-ldap"], 
    16     install_requires=["Pylons>=0.9.6.2"], 
     15    #install_requires=["Pylons>=0.9.6.2", "docutils", "python-ldap"], 
     16    install_requires=["Pylons>=0.9.6.2", "docutils"], 
    1717    packages=find_packages(exclude=['ez_setup']), 
    1818    include_package_data=True,