CentOS安装hg版本控制
安装,这个版本比较旧,一些新特性没法使用,可以去官网找到地址yum install,地址在http://mercurial.selenic.com/release/centos6/RPMS/x86_64/
wget https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-3.7-0.9_rc.x86_64.rpm
yum install mercurial-3.7-0.9_rc.x86_64.rpm
创建目录
mkdir -p /opt/hg
初始化
cd /opt/hg
hg init repos
添加用户
hg config --edit
测试
cd /opt/hg/repos
echo abc > a.file
hg add
hg ci
启动服务
hg serve -p 8002 &
浏览器可以访问http://172.16.1.138:8002
hg clone http://172.16.1.138:8002 work
注意:hg pull 后面的地址可以是http的也可以是目录地址的,例如hg pull ../work
配置提交参数,在版本库目录(/opt/hg/repos)创建.hg/hgrc文件,内容:
[paths]
default = http://172.16.1.138:8002
[ui]
username=hguser
password=hguser1234
[extensions]
color =
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
评论已关闭