Mercurial - 为什么 diff 不起作用?
我刚刚开始使用 Mercurial(适用于 Windows)。根据教程 http://hginit.com/01.html 我制作了存储库等。但是 diff命令不显示我在文件中所做的任何更改。您知道哪里出了问题吗? 提前致谢!
I have just started to use mercurial (for windows). According to the tutorial http://hginit.com/01.html I made repository, etc. But diff command doesn't show any changes that I made in files. Do you have any ideas what is wrong?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,如果命令
hg diff
将显示工作目录与其父目录之间的差异。正如 nye17 所建议的,如果您在运行 hg diff 之前提交了一些更改,那么工作目录将与其父目录相同,并且不显示任何输出。在这些情况下,您可以通过运行hg diff -c -1
来查看所做的更改。这将对之前的 (-1
) 变更集运行 hg diff 命令。By default, if the command
hg diff
will show differences between the working directory, and its parent. As nye17 suggested, if you have committed some changes just prior to runninghg diff
then the working directory will be the same as its parent, and show no output. In these instances, you can see what changes were made in by runninghg diff -c -1
. This will run the hg diff command on the previous (-1
) changeset.基本步骤如下:
Basic steps are as follows: