当前位置: 首页 > 工具软件 > Mercurial > 使用案例 >

Mercurial使用笔记(2)

林和畅
2023-12-01

记录使用Mercurial中遇到的问题和疑惑(2)

命令:

hg status 简写: hg st

查看working copy与local repository之间的的所有更改引用:http://anotherwayaround.blog.163.com/blog/static/1900662202012326104313552/

Status is a command to check Status is a command to check what the pre-commit status. It tells you whether files are tells you whether files are (A)dded, (R)emoved, (M)odified among other things. manifest command too. So the status command gives some nice information before commit. (在每次提交前,我们都应改执行下这个命令,看下改动了那些内容。)

hg diff

查看working copy与local repository之间的的所有更改的详细内容.
hg diff [File] # What’s the difference between the repo. and the working copy.
hg diff -r xx [File] # How is the working copy different form revision 5. (从版本xx之后,file文件改动内容)
hg diff -r 0:1 [File] 两个版本之间的改动
(对于diff命令,我感觉还是通过SourceTree等UI工具看起来会比较好)

hg cat

首先, 一条简单的 hg cat 命令可以用来显示一个文件的任何历史版本.
hg cat -r xx FILE # Print (cat) file as it were in revision xx.

help

hg cat –help 查看命令帮助
hg help init 同样可以查看命令帮助

hg in [摘自][1]

// 查看remote repository 上可更新的changeset

hg out [摘自][1]

// 查看local repository上 可push的changeset

参考:

[1]: http://bucunzai.net/hginit/groundup/#hg-cat
[2]: http://anotherwayaround.blog.163.com/blog/static/1900662202012326104313552/
[3]: http://www.jemander.se/MercurialByExample.pdf

 类似资料: