生成在 hg 版本之间更改的文件列表 [英] Generating a list of which files changed between hg versions
问题描述
我想在 Mercurial 中的给定目录中生成一个在两个修订版之间更改的文件的列表.
I want to generate a list of which files changed between two revisions in a given directory in Mercurial.
特别是,我对什么改变不感兴趣,但对那个目录中哪些文件改变不感兴趣.
In particular, I am not interested in what changed, but which files changed in that directory.
例如,假设在 then
和 otherthen
之间,只有 2 个文件发生了变化:
E.g., supposing that between then
and otherthen
, only 2 files changed:
>hg hypothetical-command -r then:otherthen
foo.baz
bar.baz
>
假设的命令是什么?我试过 diff 和 log,但我不知道如何说服他们这样做:要么我得到补丁(diff),要么得到整个 repo(log).
What's the hypothetical command? I've tried diff and log, but I can't see how to convince them to do it: either I get the patch(diff), or I get the whole repo(log).
推荐答案
hg status --rev x:y
其中 x
和 y
是所需的修订号(或标签或分支名称).
where x
and y
are desired revision numbers (or tag or branch names).
如果您在 windows 中使用终端,请添加 hg status --rev x:y
>your-file.txt
将列表保存到文件中.
If you are using the terminal in windows add hg status --rev x:y
> your-file.txt
to save the list to a file.
这篇关于生成在 hg 版本之间更改的文件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!