简体   繁体   English

Mercurial总是说更改分支时文件已更新

[英]Mercurial always says file was updated when changing branch

I am using Mercurial 3.1.2 on Linux. 我在Linux上使用Mercurial 3.1.2 I have 2 brances: default and stable . 我有2 brances: defaultstable

Always when I change branch I see notice saying that file was updated altough as far as I know the branches should be in the same state. 总是在我更改分支时,我会看到通知说,据我所知分支应该处于相同状态,文件已全部更新。 (I just merged and committed them before running hg up .) (在运行hg up之前,我只是合并并提交了它们。)

hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

I cannot see any difference by using hg diff . 我无法通过使用hg diff看到任何区别。

hg diff -r default:stable
(empty result)

This is completely local project, I don't push or pull anywhere. 这完全是本地项目,我不会在任何地方推或拉。

How can I find out what file is changing when I switch branch and what is the difference? 切换分支时,如何找出正在更改的文件,有什么区别? Shouldn't merging branches have eliminated any difference between them? 合并分支机构是否应该消除它们之间的任何区别?

Update: I took checksums of all files belonging to the project in both stable and default and there was no difference between branches. 更新:我以stabledefault获取了属于该项目的所有文件的校验和,分支之间没有差异。

Then I run command ls -l in both branches and took diff of results: 然后我在两个分支中运行命令ls -l并比较了结果:

- -rw-r--r--  1 user group  16K Sep  2 12:04 Program.py
+ -rw-r--r--  1 user group  16K Sep  2 12:05 Program.py

One file of project has different modification time between branches. 一个项目的文件在分支之间具有不同的修改时间。

I was able to get rid of this message by merging from stable to default. 通过从稳定合并到默认,我能够摆脱此消息。 (Normally I merge from default to stable only.) (通常我会从默认合并到稳定。)

Diff of this merge is empty but now Mercurial only reports files changed if there are real changes. 合并的差异为空,但是现在Mercurial仅在发生实际更改时报告文件更改。

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

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