什么触发"遥控器更新"合并期间文件的状态

时间:2014-05-01 12:40:28

标签: mercurial

有没有办法让Mercurial输出为什么它认为文件更新?

我一直在尝试确定在相邻修订版的分支之间合并期间非内容文件更改的原因。虽然在调试合并过程后我没有接近可接受的答案,但它绝对不是与空白相关的。我最好的猜测是与时间戳相关的东西,但无法使用已知命令证明这一点。下面列出的是我遇到的行为的伪代码:

// assumptions: repo. has two branches – development and default.
// related file has been committed to development at rev. x, merged into default
// at x+1 and default is merged back with development at x+2.
// rev. x has multiple files in the changeset, but only one appears with M-status when
// merging default back into development.

> hg branch
development
> hg commit file -m "Committing file..."
> hg update default
> hg merge development
> hg commit -m "Merge with development..."
> hg update development
> hg merge default --debug
 resolving manifests
  branchmerge: True, force: False, partial: False
  ancestor: ..., local: ..., remote: ...
  file: remote is newer -> g
getting src/Models/Query/IQuery.cs
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
> hg status
M file
> hg diff
>

我尝试跟随Mercurial的source code与“remote is newer”相关的消息,但这对我来说并没有太多解释。

1 个答案:

答案 0 :(得分:0)

我只有两个想法,这两个想法都不是直接答案:

  1. 尝试将--debug添加到合并命令。

  2. 仔细检查文件的时间戳。你说"无法使用已知的命令来证明这一点",但是不需要使用特殊的Mercurial命令来打印文件上最后修改的时间戳。