summaryrefslogtreecommitdiffstats
path: root/misc/patch-update-for-r14-1-x
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-11-29 22:26:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-12-02 22:57:45 +0900
commit0636b1ab58e38810c564c3e80cfeace7d85b0428 (patch)
treebf850a34c3055b9285cd81e9e672fdc48bbb974e /misc/patch-update-for-r14-1-x
parent4c78743b4f30fe8de9e7aee609c9fd4811c6037b (diff)
downloadscripts-0636b1ab58e38810c564c3e80cfeace7d85b0428.tar.gz
scripts-0636b1ab58e38810c564c3e80cfeace7d85b0428.zip
Add script to aid backporting commits to r14.1.x
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'misc/patch-update-for-r14-1-x')
-rwxr-xr-xmisc/patch-update-for-r14-1-x39
1 files changed, 39 insertions, 0 deletions
diff --git a/misc/patch-update-for-r14-1-x b/misc/patch-update-for-r14-1-x
new file mode 100755
index 0000000..ad5dea7
--- /dev/null
+++ b/misc/patch-update-for-r14-1-x
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Due to the ongoing API renaming in master, backporting commits from master
+# to r14.1.x could potentially lead to conflicts, and the probability of that
+# happening will keep increasing over time.
+# This script is intented to reduce/eliminate those conflicts by undoing the
+# API changes done in master.
+#
+# Usage:
+# 1. save the changes of the commit to backport to a file
+# git format-patch -1 <commit hash> -o <output_folder>
+# 2. run this script on the saved file
+# ./patch-update-for-r14-1-x <output_folder>/<patch_filename>
+# 3. apply changes to r14.1.x branch
+# git am <output_folder>/<patch_filename>
+# 4. edit commit message to add cherry pick note under signed off clause
+# git commit --amend --no-edit -S
+# and add:
+# (cherry picked from commit hash>)
+
+
+# TDEUniqueApplication --> KUniqueApplication
+sed -i "$1" \
+ -e "s|TDEUniqueApplication|KUniqueApplication|g" \
+ -e "s|\btdeuniqueapp|kuniqueapp|g" \
+ -e "s|\btdeunique_|kunique_|g" \
+ -e "s|TDEUNIQUEAPP|KUNIQUEAPP|g" \
+
+# TDEAppDCOPInterface --> KAppDCOPInterface
+sed -i "$1" \
+ -e "s|TDEAppDCOPInterface|KAppDCOPInterface|g" \
+ -e "s|tdeappdcopinterface|kappdcopiface|g" \
+ -e "s|tdeappdcopiface|kappdcopiface|g" \
+ -e "s|m_TDEAppDCOPInterface|m_KAppDCOPInterface|g" \
+ -e "s|TDEAPPDCOP_INTERFACE_H|KAPPDCOP_INTERFACE_H|g"
+
+# tdeprocess --> kprocess
+sed -i "$1" \
+ -e "s|tdeprocess|kprocess|g"