您的位置:首页 > 其它

patch文件中各参数的意义

2012-11-12 14:49 281 查看
某些打不上的patch,可以通过修改patch文件中的参数进行修改以使其可用。下面是一个完整的patch:

From 0665fa1a8584c22747666a17eaafba8cd848db39 Mon Sep 17 00:00:00 2001

From: caoshanshan <cao_shanshan@odc.hoperun.com>

Date: Thu, 25 Oct 2012 14:21:46 +0800

Subject: [PATCH 13/18] 0012670

Change-Id: I8f91a3ad276b65f08b7b875b840525265765e43b

---

.../email/activity/MessageViewFragmentBase.java | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java

index e489dbe..fede255 100755

--- a/src/com/android/email/activity/MessageViewFragmentBase.java

+++ b/src/com/android/email/activity/MessageViewFragmentBase.java

@@ -399,6 +399,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O

Log.d(Logging.LOG_TAG, this + " onStart");

}

super.onStart();

+ updateAttachmentTab();

}

@Override

@@ -410,7 +411,6 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O

// We might have comes back from other full-screen activities. If so, we need to update

// the attachment tab as system settings may have been updated that affect which

// options are available to the user.

- updateAttachmentTab();

}

@Override

--

1.7.4.1

其中:

From 0665fa1a8584c22747666a17eaafba8cd848db39
该patch的commit id

From: make <make@163.com> 作者及邮箱

Date: Thu, 25 Oct 2012 14:21:46 +0800 commit的提交日期

Subject: [PATCH 13/18] 0012670 13/18指18各patch中的第13个,“ 0012670”是commit信息

Change-Id: I8f91a3ad276b65f08b7b875b840525265765e43b 使用特殊的哈希算法生成的标签,确保其唯一性

---

.../email/activity/MessageViewFragmentBase.java | 2 +- 修改了.../email/activity/MessageViewFragmentBase.java文件,加1行,减1行

1 files changed, 1 insertions(+), 1 deletions(-)
共修改了1个,共加1行,共减1行

diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java

index e489dbe..fede255 100755

--- a/src/com/android/email/activity/MessageViewFragmentBase.java

+++ b/src/com/android/email/activity/MessageViewFragmentBase.java
修改了此文件

@@ -399,6 +399,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O

Log.d(Logging.LOG_TAG, this + " onStart");

}

super.onStart();

+ updateAttachmentTab();

}

@Override

@@是patch标识,代表在此处有修改。

“-399”指在第399行开始,即打上该patch前,Log.d(Logging.LOG_TAG, this + " onStart");在第399行;

“6”指此处截取源文件的6行,即从Log.d(Logging.LOG_TAG, this + " onStart");开始及一下的5行;

“+399”是指打上该patch后,该起始处Log.d(Logging.LOG_TAG, this + " onStart");仍在第399行;

“7”是指打上该patch后,此处截取修改后文件的7行(修改中加了1行)。

@@ -410,7 +411,6 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O

// We might have comes back from other full-screen activities. If so, we need to update

// the attachment tab as system settings may have been updated that affect which

// options are available to the user.

- updateAttachmentTab();

}

@Override

同理

@@是patch标识,代表在此处有修改。

“-410”指在第410行开始,即打上该patch前,// We might have comes back from other full-screen activities. If so, we need to update在第410行;

“7”指此处截取源文件的7行,即从// We might have comes back from other full-screen activities. If so, we need to update开始及一下的7行;

“+411”是指打上该patch后,该起始处// We might have comes back from other full-screen activities. If so, we need to update变成第411行(上处修改加了1行);

“6”是指打上该patch后,此处截取修改后文件的7行(此处修改中减了1行)。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: