ITeye博客

从SVN迁移到TortoiseHg Linux

yuankai · 2011-04-06 18:15 · Linux · 操作系统 · Markdown

Linux 下从svn项目迁移到TortoiseHg,下面是我在操作过程中的步骤!

  1. 默认安装的hg没有convert命令,需要将下面注释掉的内容打开。 我本地Path -> /usr/share/mercurial/hgext.rc hgext.convert =

  2. 重启服务(7000为hg服务器端口号) killall hg //野蛮操作 hg serve -d -p 7000 --webdir-conf webdirconf

3.为文件或目录改名或将文件由一个目录移入另一个目录中(这里卡了很久,linux很菜) mv hgrc .hgrc

3.安装依赖包 python-subversion (这里以为python-subversion 与 subversion没区别,结果杯具) sudo apt-get install python-subversion

4.使用hg convert命令 执行转换 hg convert -s svn -d hg svn_path path

e.g (/tmp/test 是svn项目文件包 /opt/hg/test 会生成一个.hg的文件夹) hg convert -s svn -d hg /tmp/test /opt/hg/test

//项目分支名如果不是标准的svn分支名 需要使用下面的配置 --config convert.svn.branches=branches (directory name) specify the directory containing branches

--config convert.svn.tags=tags (directory name) specify the directory containing tags

--config convert.svn.trunk=trunk (directory name) specify the name of the trunk branch

  1. cd /opt/hg/test

更新 6. hg update

  1. ls -la 可以看到已经将svn项目 完全转换为hg项目

参考:http://www.douhua.im/tag/mercurial/

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。