绿软下载站:请安心下载,绿色无病毒!

最近更新热门排行
您现在的位置:首页编程开发编程辅助→Mercurial For Linux
Mercurial For LinuxV3.5.1免费版
0
0

Mercurial For LinuxV3.5.1免费版

扫描下载到手机
请输入预约的手机号码
3182人已预约此游戏
确定取消
  • 软件介绍
  • 软件截图
  • 相关下载

Tags:分布式控制系统,开源项目

Mercurial For Linux是一种轻量级分布式版本控制系统,采用Python语言实现,易于学习和使用,扩展性强,其是基于GNU General Public License(GPL)授权的开源项目。这个工具在国内很少人使用,所以中文资料匮乏.只有官方的website上有一些少得可怜的中文资料了.不过总体上来说,还是比较好用的。

Linux下Mercurial (hg)配置说明

1.建立用户hgrepo

其它用户将用这个账户用hg服务器push代码。

useradd hgrepo -d /home/hgrepo # add user hgrepo
passwd hgrepo

2.建立hg代码仓库

如果代码仓库名称为project.hg,则可用如下命令。

cd /home/hgrepo
mkdir project.hg
cd project.hg
hg init # 初始化代码仓库
建立一个测试文件

echo "hello, mercurial" > sample.txt
hg add  # add
hg ci     # check in

3. 打开http

打开一个端口,让远程用户可以clone仓库中的代码.
在打开端口前请确定文件权限正确。

更改文件权限
chown hgrepo.hgrepo /home/hgrepo/project.hg -R
chmod og+rw /home/hgrepo/project.hg -R
打开端口

cd  /home/hgrepo/project.hg -R
hg serve -p 8002 &
可将上面两行加入/etc/rc.local这样就可以在开机的时候自动运行了。

4.使用hg

完成步骤3以后,我们就可以使用了。

clone到本地

例如你的服务器的名字为test.

hg clone http://test:8002
然后在本地目录就会出现一个project.hg的一个copy.

修改Client端的配置

更改.hg/hgrc,加上default-push和username

[paths]
default = http://test:8002
default-push = ssh://hgrepo@test//home/hgrepo/project.hg/
[ui]
username=shaohui.zheng
这样你就可用hg push 向服务器提交code了。这时服务器会问你passward,这个password就是用户hgrepo的password.

Good Luck.

Mercurial For LinuxV3.5.1免费版

普通下载地址:
电信下载
移动下载

编程辅助

软件评论 请自觉遵守互联网相关政策法规,评论内容只代表网友观点,与本站立场无关!

 
网友评论