简体   繁体   English

Hg diff与多个文件

[英]Hg diff with multiple files

I am new to mercurial. 我是新手。 So, please excuse my question if it sounds trivial. 因此,请问我的问题听起来是否琐碎。 I am trying to figure out how to do a diff for multiple files. 我试图弄清楚如何对多个文件进行比较。 Here is my use case : I made changes to four files. 这是我的用例:我对四个文件进行了更改。 However, I am only interested in seeing the changes I made in two of them (fileA and fileB). 但是,我只对看到我对其中两个(fileA和fileB)所做的更改感兴趣。 I thought something like this would work : 我以为这样的事情会起作用:

hg diff fileA fileB

But it does not. 但事实并非如此。

You need either the --include ( -I ) or --exclude ( -X ) options such as: 您需要--include-I )或--exclude-X )选项,例如:

hg diff -I fileA -I fileB
hg diff -X *.csv

Remember you can compare specific revisions too 记住,您也可以比较特定的修订

hg diff -r 1234:tip -I fileA

Use hg help diff in the console to see all the options available or look here 在控制台中使用hg help diff查看所有可用选项或在此处查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM