如何使 mercurial “diff”命令产生与 unix 或 unxutilpatch
命令兼容的输出?
我需要创建一个可以发送给没有安装 Mercurial 的同事的补丁文件。
我已经尝试使用,但在应用它时hg diff -r 3:5 > patch1.diff
我从命令中得到一个错误。patch
(稍等,我会尽快发布错误消息......)
好的,这是我上传到 bitbucket 的一个测试用例:
hg clone https://bitbucket.org/jason_s/test-patch-apply P2base
hg update -r 2 -R P2base
hg diff -r 2:4 -R P2base > p2base.patch
rm -r P2base/.hg
cd P2base
patch < ../p2base.patch
我在我的 Windows PC 上得到了这个:
C:\tmp\hg\P2base>补丁 < ../p2base.patch
patching file bar.txt
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.