summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTérence Clastres2020-03-15 17:53:32 +0100
committerTérence Clastres2020-03-15 17:53:32 +0100
commitc5c6e05b137b4b37d69271936a7f55102a4d03e7 (patch)
treebf82b679f2e8a17a2a1b2bbc82fb2e8883616374
parente932566fa66b75c6bc837474a623ccb7067a2c33 (diff)
downloadaur-c5c6e05b137b4b37d69271936a7f55102a4d03e7.tar.gz
Cleanup and refactoring of commit fetching
-rw-r--r--PKGBUILD112
1 files changed, 47 insertions, 65 deletions
diff --git a/PKGBUILD b/PKGBUILD
index eddc606c96de..72ee3bffe2a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,6 +3,15 @@
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Flamelab <panosfilip@gmail.com
+
+### MERGE REQUESTS SELECTION
+
+# available MR: ('536' '786' '923')
+_merge_requests_to_use=() # safe pick
+
+### IMPORTANT: Do no edit below this line unless you know what you're doing
+
+
pkgname=gnome-shell-performance
_pkgname=gnome-shell
pkgver=3.36.0
@@ -34,35 +43,42 @@ pkgver() {
git describe --tags | sed 's/-/+/g'
}
-hash_of() {
- git log --oneline --all | grep "$1" | tail -n 1 | awk '{print $1}'
-}
-
-git_cp_by_msg() {
- # Comment: Saren found a way to fetch hash based on commit name. It's controversial but might be interesting to create a function to call for each MR to not have to update the hash at each>
- h_first=$(hash_of "$2")
- if [[ -n "$3" ]]; then
- h_last=$(hash_of "$3")
- echo "Found $h_first^$h_last for $1"
- git cherry-pick -n -Xtheirs $h_first^..$h_last
- else
- echo "Found $h_first for $1"
- git cherry-pick -n -Xtheirs $h_first
- fi
+pick_mr() {
+ for mr in "${_merge_requests_to_use[@]}"; do
+ if [ "$1" = "$mr" ]; then
+ if [ "$2" = "merge" ] || [ -z "$2" ]; then
+ echo "Downloading then Merging $1..."
+ curl -O "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/$mr.diff"
+ git apply "$mr.diff"
+ elif [ "$3" = "revert" ]; then
+ echo "Reverting $1..."
+ git revert "$2" --no-commit
+ elif [ "$2" = "patch" ]; then
+ echo "Patching $1..."
+ patch -Np1 -i "$2"
+ else
+ echo "ERROR: wrong argument given: $2"
+ fi
+ break
+ fi
+ done
}
prepare() {
cd $_pkgname
### Adding and fetching remotes providing the selected merge-requests
+ ### Only needed when there is no MR opened
+ git reset --hard
git cherry-pick --abort || true
+
# git remote add verde https://gitlab.gnome.org/verdre/gnome-shell.git || true
# git fetch verde
- git remote add 3v1n0 https://gitlab.gnome.org/3v1n0/gnome-shell || true
- git fetch 3v1n0
- git remote add vanvugt https://gitlab.gnome.org/vanvugt/gnome-shell.git || true
- git fetch vanvugt
+ #git remote add 3v1n0 https://gitlab.gnome.org/3v1n0/gnome-shell || true
+ #git fetch 3v1n0
+ #git remote add vanvugt https://gitlab.gnome.org/vanvugt/gnome-shell.git || true
+ #git fetch vanvugt
### Merge Requests
@@ -74,6 +90,12 @@ prepare() {
# Comment:
# git cherry-pick -n first_commit^..last_commit
#
+ # Possible Type:
+ # 1. Improvement: Makes an already existing feature behave better, more efficiently/reliably.
+ # 2. Feature: Adds a new functionality.
+ # 3. Fix: Regression/bug fix only available in master (not backported).
+ # 4. Cleanup: Code styling improvement, function deprecation, rearrangement...
+ #
# Possible Status:
# 1. Needs rebase: Conflicts with master branch.
# 2. Needs review: Mutter maintainers needs to review the new/updated MR and provide feedback.
@@ -81,69 +103,29 @@ prepare() {
# 4. Merged: MR approved and it changes commited to master.
#
# Generally, a MR status oscillate between 2 and 3 and then becomes 4.
- #
- # Possible Type:
- # 1. Improvement: Makes an already existing feature behave better, more efficiently/reliably.
- # 2. Feature: Adds a new functionality.
- # 3. Fix: Regression/bug fix only available in master (not backported).
- # 4. Cleanup: Code styling improvement, function deprecation, rearrangement...
+
# Title: St theme: use css instance data
# URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/536
# Type: 2
- # Status: 3
+ # Status: 1
# Comment: Crash fix for st_theme_get_custom_stylesheets
- git_cp_by_msg '!536' 'st-theme: Use CRStyleSheet app_data instead of hash map' 'st-theme: Use glib auto free/ptr features'
+ pick_mr '536'
# Title: Some fixes for setting key focus of the closeDialog
# URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/786
# Type: 3
- # Status: 2
+ # Status: 1
# Comment:
- git cherry-pick -n 184ce007^..c328f4f3
+ pick_mr '786'
# Title: js/ui: Keep refcounts to WallClock objects above 1. [performance]
# URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/923
# Type: 1
# Status: 2
# Comment: Unlock freezes, it hits me too.
- # git_cp_by_msg '!923' 'js/ui: Keep refcounts to WallClock objects above 1.'
-
- # Title: js/ui: Subscribe touchpad gesture handlers to only touchpad events [performance]
- # URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/925
- # Type: 1
- # Status: 1
- # Comment:
- # git_cp_by_msg '!925' 'js/ui: Subscribe touchpad gesture handlers to only touchpad events'
- # git cherry-pick -n 30a25112
-
- # Title: iconGrid.js: Animate icon spring using translation [performance]
- # URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/926
- # Type: 1
- # Status: 3
- # Comment:
- git_cp_by_msg '!926' 'iconGrid.js: Animate icon spring using translation'
+ pick_mr '923'
- # Title: workspace: Animate window clones using translation properties
- # URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/936
- # Type: 1
- # Status: 2
- # Comment:
- git_cp_by_msg '!936' 'dnd: Make DND translation-property-aware' 'workspace: Animate window clones using translation properties'
-
- # Title: workspace: Animate window clones using translation properties
- # URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/936
- # Type: 1
- # Status: 2
- # Comment:
- git_cp_by_msg '!936' 'dnd: Make DND translation-property-aware' 'workspace: Animate window clones using translation properties'
-
- # Title: overviewControls: Use ClutterActor's translation-x
- # URL: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/948
- # Type: 1
- # Status: 4
- # Comment:
- git_cp_by_msg '!948' "overviewControls: Use ClutterActor's translation-x"
git submodule init
git submodule set-url subprojects/gvc "$srcdir/libgnome-volume-control"