Revision: 19371
          http://sourceforge.net/p/edk2/code/19371
Author:   vanjeff
Date:     2015-12-18 06:44:53 +0000 (Fri, 18 Dec 2015)
Log Message:
-----------
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.

(Sync patch r19104 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19104

Modified Paths:
--------------
    branches/UDK2015/BaseTools/Scripts/PatchCheck.py

Modified: branches/UDK2015/BaseTools/Scripts/PatchCheck.py
===================================================================
--- branches/UDK2015/BaseTools/Scripts/PatchCheck.py    2015-12-18 06:44:26 UTC 
(rev 19370)
+++ branches/UDK2015/BaseTools/Scripts/PatchCheck.py    2015-12-18 06:44:53 UTC 
(rev 19371)
@@ -285,6 +285,10 @@
                 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 @@
                     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('+'):


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to