简体   繁体   English

将文件与最后的Mercurial变更集进行比较,是否应该有所不同?

[英]Diffing a file against last Mercurial changeset, should it be different?

I'm seeing something I don't expect in my Mercurial repo. 我在Mercurial回购中看到了意料之外的东西。 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. 我检查了基础知识:默认情况下,我做了一次'hg pull','hg update -C','hg purge'和'hg st',它们又变干净了。

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. 如果我执行'hg diff -r',则表明我的本地文件缺少我期望看到的更改。 The file does not show as modified in 'hg st' and a simple 'hg diff' on it shows no differences. 该文件未在'hg st'中显示为已修改,并且其上的简单'hg diff'也没有差异。

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. 我希望每当我使用'-r'进入的任何分支中对最后一个变更集进行显式修改时,都应该无差异地返回。 Am I wrong? 我错了吗? Am I misunderstanding this basic concept? 我会误解这个基本概念吗?

Thanks, Scott 谢谢,斯科特

I think hg has an internal cache of which files it thinks are modified, and somehow this has got out of sync. 我认为hg有一个内部缓存,它认为它被修改了哪些文件,并且某种程度上已经不同步了。 This happened to me before, but I can't remember whether I deleted the file first or just used hg revert. 这在我之前发生过,但是我不记得是先删除文件还是刚使用了hg revert。

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

相关问题 在Mercurial中,有没有办法(除了“Cherry pick”之外)推动变更集而不推动与不同头部相关的变更集? - In Mercurial, is there any way (aside from “Cherry picking”) to push a changeset without also pushing changesets associated with a different head? Mercurial:删除单个非标题变更集 - Mercurial: Removing a single, non-head, changeset 如何在Mercurial中拥有本地唯一变更集? - How to have a local only changeset in Mercurial? 将已提交的变更集转换为Mercurial中未提交的变更 - Converting committed changeset to uncommitted changes in Mercurial 查找自上次使用Mercurial提交以来的文件更改列表 - Find the list of file changes since last commit using mercurial Mercurial Repo:hg 验证问题:“第一个损坏的变更集似乎是 3270” - Mercurial Repo : hg verify issue : “first damaged changeset appears to be 3270” 如何在Mercurial中提取变更集的所有已更改文件? - How can I extract all changed files of a changeset in Mercurial? 我可以将多个连续的变更集合并到Mercurial中的变更集中 - Can I merge multiple consecutive changesets into a changeset in Mercurial Mercurial - 文件历史记录不会在不同的分支上显示相同的更改 - Mercurial - file history doesn't show the same change on different branches 获取给定文件的HEAD版本以进行流处理/差异 - Get the HEAD version of a given file for streaming processing/diffing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM