Re: [edk2] [PATCH] BaseTools PatchCheck.py: Support binary diff

2015-12-02 Thread Gao, Liming
Reviewed-by: Liming Gao <liming@intel.com>

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jordan 
Justen
Sent: Wednesday, December 02, 2015 8:24 AM
To: edk2-devel@lists.01.org
Cc: Justen, Jordan L; Gao, Liming
Subject: [edk2] [PATCH] BaseTools PatchCheck.py: Support binary diff

This allows a patch with binary data that is generated with --binary to be 
parsed by the PatchCheck.py script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Yonghong Zhu <yonghong@intel.com>
Cc: Liming Gao <liming@intel.com>
---
 BaseTools/Scripts/PatchCheck.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py 
index 340a997..455c130 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -285,6 +285,10 @@ class GitDiffCheck:
 self.set_filename(line[6:].rstrip())
 if line.startswith('@@ '):
 self.state = PATCH
+self.binary = False
+elif line.startswith('GIT binary patch'):
+self.state = PATCH
+self.binary = True
 else:
 ok = False
 for pfx in self.pre_patch_prefixes:
@@ -294,6 +298,8 @@ class GitDiffCheck:
 self.format_error("didn't find diff hunk marker (@@)")
 self.line_num += 1
 elif self.state == PATCH:
+if self.binary:
+pass
 if line.startswith('-'):
 pass
 elif line.startswith('+'):
--
2.6.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] BaseTools PatchCheck.py: Support binary diff

2015-12-01 Thread Jordan Justen
This allows a patch with binary data that is generated with --binary
to be parsed by the PatchCheck.py script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
Cc: Yonghong Zhu 
Cc: Liming Gao 
---
 BaseTools/Scripts/PatchCheck.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 340a997..455c130 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -285,6 +285,10 @@ class GitDiffCheck:
 self.set_filename(line[6:].rstrip())
 if line.startswith('@@ '):
 self.state = PATCH
+self.binary = False
+elif line.startswith('GIT binary patch'):
+self.state = PATCH
+self.binary = True
 else:
 ok = False
 for pfx in self.pre_patch_prefixes:
@@ -294,6 +298,8 @@ class GitDiffCheck:
 self.format_error("didn't find diff hunk marker (@@)")
 self.line_num += 1
 elif self.state == PATCH:
+if self.binary:
+pass
 if line.startswith('-'):
 pass
 elif line.startswith('+'):
-- 
2.6.2

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel