- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
找不到工具来 merge MyClass.class : Keep (l)ocal or take (o)ther?-6ren"> 找不到工具来 merge MyClass.class : Keep (l)ocal or take (o)ther?-我通过执行以下操作返回查看了早期版本: hg update -r 10 然后,我想通过执行以下操作返回提示: hg update 但我收到此消息,但不知道如何回复: tool kdiff3 can't-6ren">
我通过执行以下操作返回查看了早期版本:
hg update -r 10
然后,我想通过执行以下操作返回提示:
hg update
但我收到此消息,但不知道如何回复:
tool kdiff3 can't handle binary
tool tortoisemerge can't handle binary
tool winmergeu can't handle binary
tool docdiff can't handle binary
no tool found to merge target/classes/com/mypackage/MyClass.class
keep (l)ocal or take (o)ther?
最佳答案
这里的主要问题是您的存储库中有 .class
文件。
这些是二进制的,并且 Mercurial 认为您已经更改了它,几乎可以肯定是编译您的存储库中的代码的结果。
如果这些文件被视为“来自外部源”(例如您下载的库或其他文件并希望与源代码一起保存),则将二进制文件保留在存储库中是可以的。
但是,在存储库中编译源代码的输出不应该保留在存储库中,因为这会导致像现在这样的问题。
它基本上是告诉您,更新到旧版本后,该特定文件已更改,因此它不再与您在旧版本存储库中的文件相同。
然后它会询问您是否要保留修改后的副本,还是更新到存储库中的新副本。这里的“本地”表示“从旧存储库版本修改的版本”,“其他”表示“存储库中的新版本”。
在这种情况下,我会为其他人回答O
,但我也会尝试从存储库中完全删除这些 .class 文件。
发生这种情况的一个示例可能是您遇到以下场景(请注意,我不是 Java 开发人员,因此我可能会错误地获取 Java 的确切详细信息):
修订 1,您提交:
修订 2,您提交:
然后更新回修订版 1:
然后编译:
然后您尝试更新回修订版 2:
这是一个批处理文件(适用于 Windows),可以重现您的情况:
@echo off
setlocal
rd /s /q test
md test
cd test
hg init .
rem ------------------------------------
rem Add .CS file and compile it
rem Producing main.exe
echo class Program { public static void Main() { } }>main.cs
csc /target:exe main.cs
hg addremove
hg commit -m "1"
rem ------------------------------------
rem Change and recompile and commit
echo class Program2 { public static void Main() { } }>main.cs
csc /target:exe main.cs
hg addremove
hg commit -m "2"
rem ------------------------------------
rem Update back to revision 1
hg update 0
rem ------------------------------------
rem Compile
csc /target:exe main.cs
rem ------------------------------------
rem Try to update up to revision 2
hg update 1
输出:
[C:\Temp] :testMicrosoft (R) Visual C# 2010 Compiler version 4.0.30319.1Copyright (C) Microsoft Corporation. All rights reserved.adding main.csadding main.exeMicrosoft (R) Visual C# 2010 Compiler version 4.0.30319.1Copyright (C) Microsoft Corporation. All rights reserved.2 files updated, 0 files merged, 0 files removed, 0 files unresolvedMicrosoft (R) Visual C# 2010 Compiler version 4.0.30319.1Copyright (C) Microsoft Corporation. All rights reserved.tool beyondcompare3 can't handle binarytool bcomp can't handle binarytool beyondcompare3 can't handle binarytool kdiff3 can't handle binarytool diffmerge can't handle binarytool tortoisemerge can't handle binarytool docdiff can't handle binary no tool found to merge main.exekeep (l)ocal or take (o)ther? interrupted!
关于mercurial - 运行后 "hg update"-> 找不到工具来 merge MyClass.class : Keep (l)ocal or take (o)ther?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3599166/
我通过执行以下操作返回查看了早期版本: hg update -r 10 然后,我想通过执行以下操作返回提示: hg update 但我收到此消息,但不知道如何回复: tool kdiff3 can't
我是一名优秀的程序员,十分优秀!