将文件与上一个 Mercurial 变更集进行比较,它应该有所不同吗?
我在 Mercurial 存储库中看到了一些意想不到的东西。默认情况下会显示分支中所做的更改。日志、合并或其他方式中没有更改集,说明更改从分支移至默认值。
我检查了基础知识:我在默认情况下执行了“hg pull”、“hg update -C”、“hg purge”和“hg st”,结果干净了。
如果我在本地查看该文件,则不存在我期望的更改。如果我执行“hg diff -r”,那么它会告诉我我的本地文件缺少我期望看到的更改。该文件没有显示为“hg st”中的修改,并且其上的简单“hg diff”没有显示任何差异。
我希望每当使用未修改的文件明确地针对我使用“-r”所在的任何分支中的最后一个变更集进行比较时,它应该没有任何差异地返回。我错了吗?我是否误解了这个基本概念?
谢谢, 斯科特
I'm seeing something I don't expect in my Mercurial repo. A change that has been made in a branch is showing up in default. There is no changeset in the log, merge or otherwise, accounting for the change moving into default from the branch.
I checked the basics: I'm in default, did an 'hg pull', 'hg update -C', 'hg purge', and an 'hg st' which came back clean.
If I look at the file locally the change I am expecting is not there. If I do an 'hg diff -r ' then it tells me that my local file is missing the change I expect to see. The file does not show as modified in 'hg st' and a simple 'hg diff' on it shows no differences.
I would expect that whenever doing a diff with an unmodified file explicity against the last changeset in whatever branch I'm in with '-r' it should come back with no differences. Am I wrong? Am I misunderstanding this basic concept?
Thanks,
Scott
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 hg 有一个内部缓存,其中存储了它认为被修改的文件,但不知何故,它已经不同步了。我以前也遇到过这种情况,但我不记得是先删除了文件还是只是使用了 hg revert。
I think hg has an internal cache of which files it thinks are modified, and somehow this has got out of sync. This happened to me before, but I can't remember whether I deleted the file first or just used hg revert.