转载请注明,谢谢 1. 下载源码 (yum 不到 ) wget http://mercurial.selenic.com/release/mercurial-1.4.1.tar.gz 2. 编译安装 a) # make all b) # make install c) # hg debuginstall( 见3) d) # hg
3. 设置环境变量和安装检查 a) 编写一个脚本 # hg debuginstall 会出现abort: couldn't find mercurial libraries in 。。。 可以在命令行中export ,但范围和时间都很有限,不如找到hg 和mercurial 的位置,进行如下修改: # mv /usr/local/bin/hg /usr/local/bin/hg.py
别忘了 chmod 755 /usr/local/bin/hg b) 添加配置文件 此时再运行 hg debuginstall ,会出现 Checking username... no username supplied (see "hg help config") (specify a username in your .hgrc file) 1 problems detected, please check your install!
这是由于配置文件的原因 通过man hgrc 会看到一些说明。默认是去一些位置找配置文件的。如果没有,就创建。源码中 contrib 文件夹下 提供了一个sample.hgrc ,可以拷贝过来修改 # cp sample.hgrc /root/.hgrc # vim /root/.hgrc
这里改一下: ### show changed files and be a bit more verbose if True
# verbose = True
### username data to appear in comits |