2020-01-23 16:11 阅读 149 views 次 hg已关闭评论


hg pull  anotherDir


这样比 hg update快。



hg diff 


hg revert hello.c 或者用--all选项来恢复所有文件 

list changesets in draft or secret phase:

hg log -r "not public()"

hg serve

hg diff -r 4da991f748ed -r tip

hg status
hg diff
hg commit -m 'gf solve python problem'


Working in a named branch

Create the branch

$ hg branch feature1
(do some changes)
$ hg commit
(write commit message)

Update into the branch and work in it

$ hg update feature1
(do some changes)
$ hg commit
(write commit message)

Now you can commit, pull, push and merge (and anything else) as if you were working in a separate repository. If the history of the named branch is linear and you call "hg merge", Mercurial asks you to specify an explicit revision, since the branch in which you work doesn't have anything to merge.
Merge the named branch

When you finished the feature, you merge the branch back into the default branch.

$ hg update default
$ hg merge feature1
$ hg commit
(write commit message)

To see the active branches with hg branches. To mark a branch as inactive, for example because you finished implementing the feature, you can close it. Closed branches are hidden in hg branches as well as in hg heads.

$ hg update feature1
$ hg commit --close-branch -m "finished feature1"

Add the tag

$ hg tag -r 3 v0.1



转载请注明:hg | 蚂蚁浏览器文档
分类:电脑技术 标签: