如何讓mercurial「diff」命令產生與unix或unxutil patch
命令兼容的輸出?mercurial diff + unxutil「patch」
我需要創建一個補丁文件,我可以發送給沒有安裝Mercurial的同事。
我使用hg diff -r 3:5 > patch1.diff
嘗試和應用,當我從patch
命令得到一個錯誤。 (挺住,我會盡快,因爲我有機會發布錯誤消息....)
OK,這裏是我已上傳到到位桶測試用例:
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目錄\汞柱\ 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.