HOOKS 钩子应用:
何为钩子? 当我们执行某些特定操作时触发执行预先设定好的任务
eg: 首先进入 hooks 文件夹 复制 post-commit.tmpl 文件 为 post-commit 然后更改权限为可执行 chmod +x post-commit
然后打开 post-commit
svn info svn://ip / 版本库名称 --xml >> /var/www / 项目文件夹
然后重启 svn 服务 killall svnserve svnserve -d -r /path/repos/
版本库的精简与丢弃:
svnadmin dump /path/repos / 版本库名称 -r 版本号 1: 版本号 2 > /path/name
eg:
killall svnserve
svnadmin create /path/repos / 新版本库名称
svnadmin load /path/repos / 新版本库名称 < /path/name
cp -av /path/repos / 旧版本库名称 / conf /* /path/repos / 新版库名称 / conf
svnserve -d -r /path/repos/
版本库迁移与 switch 重定向
killall svnserve
把 / path/repos / 版本库名称 压缩成版本库名称. zip
复制版本库名称. zip 到新服务器并解压
在新服务器上运行新版本库
svn switch --relocate svn://ip/repos / 旧版本库名称 svn://ip/repos / 新版本库名称
来源: http://www.bubuko.com/infodetail-2458176.html