$ hg pull -r thebranch
$ hg update -r thebranch
update 到指定分支: hg update -r branch_name(指定revision) hg update -C branch_name (不指定revision)
hg purge --all
hg update --clean
清理工作区,并更新到分支的最新revision id
Hg merge --abort
Hg up -Cr 在更新时做深度清理
perl build.pl --prepare
perl build.pl --target=WindowsEditor
jam WinEditor
hg update -r 2019.2/china_unity/staging - -clean
Pull 全球版和中国版
hg update –r revision
run o k
$ hg clone --uncompressed -U https://ono.unity3d.com/unity/trunk unity
Hg log -r sfjlsaj24802
1.hg help (command)
Get help for Mercurial commands, e.g. “hg help update”
2.hg tags
See list of available tags, e.g. “4.5.2f1”, “4.5.3b2”
3.hg pull
Pull latest changes from server to local repository clone
4.hg update
Update local repository to specific revisions/tag, e.g. “hg update -r 4.5.2f1”. This will also download largefiles for this revision
5.hg diff
Show changes locally, or compare to another revision. E.g. “hg diff -r 4.5.2f1 Configuration/BuildConfig.pm” to compare local revision of file with 4.5.2 revision
6.hg status
See if you have any local changes
7.hg purge --all
Delete all local non-tracked files in repository, e.g. builds folder
8.hg id
Shows current revision/tag of local source code
9.hg clone
Clones (“downloads”) repository from server to local machine
10.hg archive
“Copy” files from clone to another folder, without the Mercurial-specific files, useful when e.g. copying files to another version control system. E.g. “hg archive -r 4.5.3f3 D:\OtherRepo”
hg log -b .
当前branch下的所有log
Hg log --follow
工作目录的变更集
Hg log -l 5
看最新的5条
Hg log -l 5 -b .
当前分支下最新的5条
Hg log -r tip
Tip changelog
Hg status -m
只展示改变了的文件
Hg status -r
只展示移除了的文件
Hg status -a
只展示增加的文件
1.hg update -Cr = git reset –hard
2. hg backout 32jljk4j2 = git revert tag/hash
3. hg graft --edit 0000 = git cherry-pick <commit>
4. hg shelve = git stash
hg commit --close-branch -m 'closing this branch'
有时候我们用hg add 没加参数,直接把所以没有纳入版本库的文件都添加进来了。
而有些文件我们不是想添加的,怎么办?
hg forget xxx.java
撤销commit
hg rollback
hg commit -m “this time is all right.”
Up到出错前的revision,重新进行新的操作,并push --force,这样会开启一个新head.
然后up到旧的head, hg commit --close-branch -m “…” ,hg push
$ hg update -r trunk
$ hg branch platform/webgl/bugfixes
$ hg commit -m “Open platform/webgl/bugfixes branch”
$ hg push --new-branch