Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何检查您在mercurial的哪个分支机构_Mercurial_Branch - Fatal编程技术网

如何检查您在mercurial的哪个分支机构

如何检查您在mercurial的哪个分支机构,mercurial,branch,Mercurial,Branch,检查我在mercurial的哪个分支机构的最佳方法是什么 hg log -l 5 这似乎向我展示了回购协议中的最新提交,而不是git的工作状态,所以我想我在寻找类似于git status的东西,它会告诉我我在哪个分支上hg status没有显示任何内容。您可以使用hg identify命令和-bfor branch选项: C:\Some\Repository> hg identify -b default hg分行。我建议至少阅读一次hg-help:^)您可能还希望明确指定当前签出的版

检查我在mercurial的哪个分支机构的最佳方法是什么

hg log -l 5

这似乎向我展示了回购协议中的最新提交,而不是git的工作状态,所以我想我在寻找类似于
git status
的东西,它会告诉我我在哪个分支上
hg status
没有显示任何内容。

您可以使用
hg identify
命令和
-b
for branch选项:

C:\Some\Repository> hg identify -b
default

hg分行
。我建议至少阅读一次
hg-help:^)

您可能还希望明确指定当前签出的版本。然后,
hg log
的输出将返回您要查找的内容:

hg log -r.

您可以使用
hg sum

例如,假设您有两个分支,A和B

[root@B6LEB1 ATS]# hg update A
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[root@B6LEB1 ATS]# hg sum 
parent: 1787:3f06e1a0260a 
 made A
branch: A
commit: (clean)
update: (current)
[root@B6LEB1 ATS]# hg update B
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[root@B6LEB1 ATS]# hg sum
parent: 1788:7ff3c507efd9 tip
 made B
branch: B
commit: (clean)
update: (current)
您可以始终使用带有关键字的grep进行搜索。 在这种情况下,

$ hg help | grep branch`
给你:

branch        set or show the current branch name  
branches      list repository named branches  
graft         copy changes from other branches onto the current branch  
heads         show branch heads  
branch        set or show the current branch name  
branches      list repository named branches  
graft         copy changes from other branches onto the current branch  
heads         show branch heads