在 Mercurial 中将一对文件作为一个文件进行管理
我正在 Mercurial 中使用小型二进制文件 发布。
这个二进制文件可以转储为文本以在版本之间进行比较,但问题是这些文件成对出现(例如:Form.scx / Form.sct),并且我找不到一种方法来告诉 Mercurial“制作一个当我执行 hg ediff
时,其他相应文件的快照”(复制到临时位置)。
I'm working with small binary files in Mercurial as posted.
This binary files can be dumped as text to make a diff between versions, but the problem is that the files comes in pairs (eg: Form.scx / Form.sct), and I cannot found a way to tell Mercurial to "make a snapshot" (copy to a temporary location) of the other corresponding file when I do an hg ediff
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需制作一个快速脚本并将其设置为 extdiff 的工具即可。我猜您使用的是 Windows,但无论与此等效的 powershell 是什么:
它都会创建、比较然后删除文本版本。您需要小心不要覆盖,处理多个并发调用等。
然后配置一个新命令来运行您的脚本:
然后您可以执行以下操作:
理想情况下,您的存储库中只有“源”bonary 格式,不是文本格式,因为您不应该将生成的项目保留在存储库中 - 因为如果您更新其中一个而不是另一个,则会出现不一致的状态。根据需要生成可比较的文本文件是更好的方法。
Just make a quick script and set that as the tool for extdiff. I'm guessing you're on Windows, but whatever the powershell equivalent to this is:
That creates, compares, and then deletes the text versions. You'd want to be careful to not overwrite, deal with multiple concurrent invocations, etc.
Then configure a new command to run your script:
Then you can do things like:
Ideally you have only the "source" bonary format in your respository, not the text format, as you shouldn't keep generated items in the repo -- because if you update one but not the other you have an inconsistent state. Generating the comparable text files on demand is a better way to go.
正如 @Ryan 所建议的,我最终在 diff 程序之前得到了一个小批次:
然后在 %UserProfile%\.hgrc 中配置该批次
As suggested by @Ryan, I ended up with a small batch previous to the diff program:
and then config the batch in %UserProfile%\.hgrc