Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.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

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
Linux 如何列出Mercurial中属于不同分支的所有文件?_Linux_Mercurial_Branch_Tortoisehg_Redhat - Fatal编程技术网

Linux 如何列出Mercurial中属于不同分支的所有文件?

Linux 如何列出Mercurial中属于不同分支的所有文件?,linux,mercurial,branch,tortoisehg,redhat,Linux,Mercurial,Branch,Tortoisehg,Redhat,我是mercurial的新手,所以很抱歉问这个新手问题。 我在/home/Cassie/localRepo中创建了一个名为“localRepo”的本地存储库。我有两个分支,default和src1分支。对于默认分支,它有file1、file3;对于src1分支,它有file1、file2和file4。每当我试图列出该存储库中的所有文件时,它只显示属于当前分支的文件 例如,如果当前分支是src1分支,那么如果我键入 ls -l 它只显示了 file1 file2 file4 是否有任何方法可以

我是mercurial的新手,所以很抱歉问这个新手问题。
我在/home/Cassie/localRepo中创建了一个名为“localRepo”的本地存储库。我有两个分支,default和src1分支。对于默认分支,它有file1、file3;对于src1分支,它有file1、file2和file4。每当我试图列出该存储库中的所有文件时,它只显示属于当前分支的文件

例如,如果当前分支是src1分支,那么如果我键入

ls -l
它只显示了

file1 file2 file4
是否有任何方法可以查看属于同一存储库的所有文件,例如

file1 file2 file3 file4
我试过了

hg status --all
它仍然只显示file1 file2和file4

我的机器是redhat linux workstation 6,带有mercurial 1.7和tortoisehg


非常感谢,

我知道没有标准的方法,但您可以使用您提到的方法

hg branches ------ tells you all the branch
branch1
branch2
.....

hg update -C branch1    ----- switches you to a branch1
hg status --all         ----- provides all files for branch1

hg update -C branch2    ----- switches you to branch2
hg status --all         ----- provides all the files for branch2
您可以合并所有分支的输出并删除冗余文件名。 您可以编写一个脚本来实现这一点

而且
-C
是危险的,因为它在更改为分支时会丢弃文件。因此,只有在工作目录中没有要提交的更改时才应该使用

警告:这种想法通常不是查看两个不同分支中的文件的好方法

您可以在branch1中添加一个文件c.txt,然后在branch2中再次添加另一个具有不同内容的c.txt

在本例中,语义上是两个同名的不同文件。

hg manifest--all
列出了所有版本中的所有文件,包括已删除和重命名的文件

鉴于:

o  5: Removed file1, Renamed file3->file6
|
| @  4: Added file5
| |
| o  3: Added file4
| |
o |  2: Added file3
| |
o |  1: Added file2
|/
o  0: Added file1
hg清单的结果——全部

file1
file2
file3
file4
file5
file6

感谢您的回复。但是,可能是因为我的mercurial版本的缘故,我无法执行命令
hg meanifest--all
。我的系统中不存在这样的命令。还有别的想法吗?谢谢,升级?:^)看起来像是
——所有的
都是在1.9中添加的。