Switch from 'patch' to 'git apply' because CentOS 6's 'patch' doesn't support renaming files.

PiperOrigin-RevId: 253951856
This commit is contained in:
A. Unique TensorFlower 2019-06-19 01:30:29 -07:00 committed by TensorFlower Gardener
parent 1aef10221d
commit 8ec9355084
2 changed files with 6 additions and 9 deletions
third_party

View File

@ -1,5 +1,5 @@
--- /icu4c/source/common/unicode/uconfig.h 2018-06-19 22:34:56.000000000 -0700
+++ /ice4c/source/common/unicode/uconfig.h.new 2019-03-12 10:12:35.896095657 -0700
--- a/icu4c/source/common/unicode/uconfig.h
+++ b/icu4c/source/common/unicode/uconfig.h
@@ -55,6 +55,11 @@
#include "uconfig_local.h"
#endif
@ -13,8 +13,8 @@
* \def U_DEBUG
* Determines whether to include debugging code.
--- /icu4c/source/common/udata.cpp.old 2018-06-19 22:34:56.000000000 -0700
+++ /icu4c/source/common/udata.cpp 2018-10-19 14:26:09.778950855 -0700
--- a/icu4c/source/common/udata.cpp
+++ b/icu4c/source/common/udata.cpp
@@ -18,15 +18,15 @@
#include "unicode/utypes.h" /* U_PLATFORM etc. */

View File

@ -61,14 +61,11 @@ def _repos_are_siblings():
return Label("@foo//bar").workspace_root.startswith("../")
# Apply a patch_file to the repository root directory
# Runs 'patch -p1'
# Runs 'git apply'
def _apply_patch(ctx, patch_file):
# Don't check patch on Windows, because patch is only available under bash.
if not _is_windows(ctx) and not ctx.which("patch"):
fail("patch command is not found, please install it")
cmd = _wrap_bash_cmd(
ctx,
["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)],
["git", "apply", "-v", ctx.path(patch_file)],
)
_execute_and_check_ret_code(ctx, cmd)