将 xls 与 TortoiseHg 合并

发布于 2024-11-01 03:15:09 字数 538 浏览 4 评论 0原文

我想在使用 TortoiseHg 更新存储库时合并两个 MS Excel .xls 文件,但出现以下错误:

tool tortoisemerge can't handle binary
tool kdiff3 can't handle binary
tool tortoisemerge can't handle binary
tool docdiff can't handle binary
abort: response expected

当我将这些行添加到 hgrc 文件时:

[merge-patterns]
**.xls = docdiff

我收到另一个错误:

merging test.xls
merging test.xls failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved

我做错了什么?当我从命令行运行 docdiff 时,它运行成功。

I want to merge two MS Excel .xls files while updating the repository with TortoiseHg, and I get the following error:

tool tortoisemerge can't handle binary
tool kdiff3 can't handle binary
tool tortoisemerge can't handle binary
tool docdiff can't handle binary
abort: response expected

When I add these lines to the hgrc file:

[merge-patterns]
**.xls = docdiff

I get another error:

merging test.xls
merging test.xls failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved

What am I doing wrong? When I run docdiff from command line it runs successfully.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

尘曦 2024-11-08 03:15:09

我已经解决了这个问题。看来我已经尝试过自动合并而不是手动合并。不支持二进制文件的自动合并,但我已经弄清楚如何从 TortoiseHG 界面启动 docdiff。

所以,答案是:为了将 .xls 文件与 TortoiseHg 合并,必须使用 docdiff 进行手动合并。 TortoiseHg 在自动合并期间不会启动 docdiff。

I've solved the problem. Looks like I've tried automatic merge instead of manual one. Automatic merge of binaries is not supported, but I've figured out how to launch docdiff from TortoiseHG interface.

So, the answer is: in order to merge .xls files with TortoiseHg one has to use manual merge with docdiff. TortoiseHg doesn't launch docdiff during automatic merge.

谁与争疯 2024-11-08 03:15:09

Hg 工具无法合并二进制文件,只能合并基于文本的文件(大多数源代码文件都是基于文本的)。您可以尝试将 XLS 文件另存为 CSV(逗号分隔)文件。这是一个普通的文本文件(例如,您可以使用记事本打开)。 Hg 工具应该能够合并这种类型的文件。

如果您想了解有关为什么 XLS​​ 文件无法合并的更多信息。尝试用记事本打开一个XLS文件,你会发现它有很多乱码,Hg在不知道XLS文件规范的情况下无法理解这些乱码(它不知道)。

The Hg tools can't merge binary files, only text based files (most source code files are text based). What you could do is try to save your XLS file as a CSV (comma separated) file. This is a normal text file (that you can open with notepad for example). The Hg tools should be able to merge this type of file.

If you'd like to know more on why XLS files can't be merged. Try opening an XLS file with Notepad, you see that it's a lot of gibberish, Hg can't understand this gibberish without knowing the XLS file specification (which it doesn't).

兲鉂ぱ嘚淚 2024-11-08 03:15:09
  1. 在资源管理器中,右键单击存储库并将其克隆到临时克隆文件夹。
  2. 由于 Excel 不支持打开两个同名的工作簿文件,因此请在临时克隆中重命名该工作簿文件,以便可以在 Excel 中打开它。
  3. 在 Excel 中打开电子表格的两个版本,然后手动将更改复制到主存储库中。
  4. 在主存储库中标记已解析的文件。
  5. 提交合并。
  6. 删除临时克隆。
  1. In Explorer, right-click on the repository and clone it to a temporary clone folder.
  2. Because Excel doesn't support opening two workbook files with the same name, rename the one in the temporary clone, so that it can be opened in Excel.
  3. Open both versions of the spreadsheet in Excel, and manually copy the changes over into the main repository.
  4. Mark the file resolved in the main repository.
  5. Commit the merge.
  6. Delete the temporary clone.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文