3
A
回答
3
嘗試hg import --no-commit
,Mozilla有Git和水銀之間的rather useful FAQ關於交易的補丁。
根據您的平臺,您也可以使用patch
,例如, patch -p1 < some_patch_from_git.patch
。這實際上可能會更好,因爲你會看到任何模糊,而不必僅僅爲了一個補丁而對作者信任。
編輯
如果你的補丁不進去幹淨,沒有上述方法去上班。您的代碼庫不是修補程序期望的,如果hunk無法應用。看看不合格品,看看修補程序預計你的代碼在任何給定的行中,然後相應地重新綁定。
3
hg import <patchfile(s)>
應該能夠處理git風格的補丁。
如果您不希望它在每個補丁導入後自動提交更改,請使用hg import --no-commit <patchfile(s)>
。
Mozilla的常見問題提到了這一點:https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_diff_and_patch_files.3f
相關問題
- 1. mercurial diff + unxutil「patch」
- 2. mercurial recurring repository corruption
- 3. mercurial repository corruption
- 4. 清理Mercurial Repository
- 5. IDE獨立的mercurial repository
- 6. Ant Task To Copy to Windows Share(SMB)
- 7. Can not copy assembly.Unable to the dll to website
- 8. Postgres COPY TO NULL整數
- 9. 在Mercurial Repository中查找大文件
- 10. Eclipse Mercurial Repository不顯示對象裝飾
- 11. Debian Etch - Eclipse中的Mercurial
- 12. Postgres的COPY TO動態命令
- 13. python「reference to」vs「copy of」字典項目
- 14. SELECT and COPY row to another SHEET in Google Spreadsheets
- 15. COPY TO excel foxpro中的工作表
- 16. 查找可能的基本版本在一個mercurial repository
- 17. 是否可以將mercurial patch應用於單個subdir?
- 18. ant copy copy order
- 19. Mercurial Repository是否有任何Build管理工具?
- 20. 將PuTTY的svn倉庫轉換爲mercurial repository
- 21. 使用maven從mercurial repository創建一個war文件
- 22. 應用程序在mercurial repository中訪問它自己的版本
- 23. Atlassian Bamboo:觸發構建而不拉動mercurial repository
- 24. Mercurial Repository每晚從服務器上的子目錄中提取
- 25. 彙總所有在mercurial repository中被忽略的文件/目錄
- 26. Mercurial僅從Central Repository中同步選擇性文件夾
- 27. 從mercurial repository中刪除所有本地書籤和提交
- 28. 如何修復沒有默認分支的mercurial repository?
- 29. 如何從Mercurial Repository中只檢索一個子目錄?
- 30. Repository Inheritance
不行的Triedit – Abid 2010-04-13 04:50:42
我想'汞import'ing補丁比較好,因爲它會保留原來的提交者的姓名和時間戳。 – 2010-04-13 18:56:16