patch文件中各参数的意义

某些打不上的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行)。






  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值