2
假設我有一個可以用-p0應用的補丁,是否有一個工具可以將此補丁自動轉換爲-p1補丁。例如,轉化轉換補丁條級別
Index: stdio-common/_i18n_number.h
===================================================================
--- stdio-common/_i18n_number.h (revision 8348)
+++ stdio-common/_i18n_number.h (working copy)
@@ -116,7 +116,7 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T
#else
static CHAR_T *
-_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr)
+_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
{
return w;
}
到相同的補丁,但有不同的目錄名(注意A,B)在路徑的前面
Index: stdio-common/_i18n_number.h
===================================================================
--- a/stdio-common/_i18n_number.h (revision 8348)
+++ b/stdio-common/_i18n_number.h (working copy)
@@ -116,7 +116,7 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T
#else
static CHAR_T *
-_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr)
+_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
{
return w;
}
很簡單,也許當你知道sed是如何工作的;) – shodanex 2009-06-17 14:31:48