将文件与最后的Mercurial变更集进行比较,是否应该有所不同? [英] Diffing a file against last Mercurial changeset, should it be different?

查看:79
本文介绍了将文件与最后的Mercurial变更集进行比较,是否应该有所不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mercurial仓库中看到了一些我不希望看到的东西.默认情况下显示分支中所做的更改.日志中没有变更集,合并或其他任何变更,这说明了更改已从分支变为默认.

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.

我检查了基础知识:默认情况下,我进行了一次'hg pull','hg update -C','hg purge'和'hg st'清理干净.

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.

如果我在本地查看文件,则期望的更改不存在.如果我执行'hg diff -r',则表明我的本地文件缺少我希望看到的更改.该文件未在'hg st'中显示为已修改,并且文件上的简单'hg diff'也没有差异.

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.

我希望每当对我使用'-r'的任何分支中的最后一个变更集进行显式修改时,都应无差异地返回.我错了吗?我误会了这个基本概念吗?

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?

谢谢, 斯科特

推荐答案

我认为hg有一个内部缓存,其中包含它认为已修改的文件,并且某种程度上已经不同步了.这以前发生在我身上,但我不记得是先删除文件还是刚使用了hg还原.

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.

这篇关于将文件与最后的Mercurial变更集进行比较,是否应该有所不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆