From e8d1e561176ba0b2d53877669aa70d29754ebca8 Mon Sep 17 00:00:00 2001 From: gxzmf <279822581@qq.com> Date: Thu, 23 Nov 2023 07:17:56 +0000 Subject: [PATCH 1/4] =?UTF-8?q?Revert=20"=E7=A7=BB=E9=99=A4=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E8=AF=B4=E6=98=8E"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 399e517ce9ea390a7895af3f7cf5ace9ca425636. --- DEPS | 1 + 1 file changed, 1 insertion(+) diff --git a/DEPS b/DEPS index 454b4c3052..afa9c770f3 100644 --- a/DEPS +++ b/DEPS @@ -840,6 +840,7 @@ recursedeps = [ pre_deps_hooks = [ { + # Generate the ohos compile environment 'name': 'ohos_reverse', 'pattern': 'src/flutter/attachment/scripts/.*\\.py', 'action': ['python3', 'src/flutter/attachment/scripts/ohos_reverse_patch.py'], -- Gitee From f282e0238126da4e02410d98e23c01a1831167ce Mon Sep 17 00:00:00 2001 From: gxzmf <279822581@qq.com> Date: Thu, 23 Nov 2023 07:18:07 +0000 Subject: [PATCH 2/4] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E8=AF=B4?= =?UTF-8?q?=E6=98=8E"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 54590b5fb548282eab1e1f1bee4238c20bcd8616. --- attachment/scripts/ohos_reverse_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachment/scripts/ohos_reverse_patch.py b/attachment/scripts/ohos_reverse_patch.py index 2930711e75..f9a147c7a9 100644 --- a/attachment/scripts/ohos_reverse_patch.py +++ b/attachment/scripts/ohos_reverse_patch.py @@ -20,7 +20,7 @@ from operator import itemgetter 在gclient中pre_deps_hooks中配置执行,用于在sync前回滚patch 职责如下: 1.解析config.json,并按顺序倒序排序 -2.回滚目录下的patch +2.回滚路径的patch """ ROOT = './src/flutter/attachment' -- Gitee From 311d53c426bce3a5d79ebb86c0fb7e96d806abb8 Mon Sep 17 00:00:00 2001 From: gxzmf <279822581@qq.com> Date: Thu, 23 Nov 2023 07:18:25 +0000 Subject: [PATCH 3/4] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1gclinet=20sync=E6=97=B6=EF=BC=8C=E5=BA=94=E7=94=A8patc?= =?UTF-8?q?h=E6=8A=A5=E9=94=99"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4cab815bc52b02b75390c84cb5a2ade37df1d543. Signed-off-by: zmf <279822581@qq.com> --- DEPS | 9 ----- attachment/scripts/ohos_reverse_patch.py | 46 ------------------------ 2 files changed, 55 deletions(-) delete mode 100644 attachment/scripts/ohos_reverse_patch.py diff --git a/DEPS b/DEPS index afa9c770f3..b98a7a467b 100644 --- a/DEPS +++ b/DEPS @@ -838,15 +838,6 @@ recursedeps = [ 'src/third_party/vulkan-deps', ] -pre_deps_hooks = [ - { - # Generate the ohos compile environment - 'name': 'ohos_reverse', - 'pattern': 'src/flutter/attachment/scripts/.*\\.py', - 'action': ['python3', 'src/flutter/attachment/scripts/ohos_reverse_patch.py'], - }, -] - hooks = [ { # Generate the Dart SDK's .dart_tool/package_confg.json file. diff --git a/attachment/scripts/ohos_reverse_patch.py b/attachment/scripts/ohos_reverse_patch.py deleted file mode 100644 index f9a147c7a9..0000000000 --- a/attachment/scripts/ohos_reverse_patch.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#!/usr/bin/python -import json -import excute_util -from operator import itemgetter - -""" -在gclient中pre_deps_hooks中配置执行,用于在sync前回滚patch -职责如下: -1.解析config.json,并按顺序倒序排序 -2.回滚路径的patch -""" -ROOT = './src/flutter/attachment' - -def apply_reverse_patch(task): - file_path = task['file_path'] - target_path = task['target'] - excute_util.excuteArr(['git', 'apply', '-R', file_path], target_path) - pass - -def doTask(task): - if (task['type'] == 'patch'): - apply_reverse_patch(task) - -def parse_config(config_file="{}/scripts/config.json".format(ROOT)): - with open(config_file) as json_file: - data = json.load(json_file) - data = sorted(data, key=itemgetter('name'), reverse=True) - for task in data: - doTask(task) - -if __name__ == "__main__": - parse_config() - \ No newline at end of file -- Gitee From df113e984c4ea818b2c60fd50b503c41b31323a6 Mon Sep 17 00:00:00 2001 From: zmf <279822581@qq.com> Date: Thu, 23 Nov 2023 15:27:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zmf <279822581@qq.com> --- attachment/scripts/ohos_reverse_patch.py | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 attachment/scripts/ohos_reverse_patch.py diff --git a/attachment/scripts/ohos_reverse_patch.py b/attachment/scripts/ohos_reverse_patch.py new file mode 100644 index 0000000000..2930711e75 --- /dev/null +++ b/attachment/scripts/ohos_reverse_patch.py @@ -0,0 +1,46 @@ +# Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/python +import json +import excute_util +from operator import itemgetter + +""" +在gclient中pre_deps_hooks中配置执行,用于在sync前回滚patch +职责如下: +1.解析config.json,并按顺序倒序排序 +2.回滚目录下的patch +""" +ROOT = './src/flutter/attachment' + +def apply_reverse_patch(task): + file_path = task['file_path'] + target_path = task['target'] + excute_util.excuteArr(['git', 'apply', '-R', file_path], target_path) + pass + +def doTask(task): + if (task['type'] == 'patch'): + apply_reverse_patch(task) + +def parse_config(config_file="{}/scripts/config.json".format(ROOT)): + with open(config_file) as json_file: + data = json.load(json_file) + data = sorted(data, key=itemgetter('name'), reverse=True) + for task in data: + doTask(task) + +if __name__ == "__main__": + parse_config() + \ No newline at end of file -- Gitee