Skip to content

Commit 1fb79e4

Browse files
committed
rewrite the scritp to mimic merging closely
Since there are no merge conflict at the moment, the script has been rewritten to better mimic the merging process. It assumes the PR's are merged in order, which of course isn't going to happen. At the same time it simulates a rebase before merging, which creates a more linear history, closer to what we're expecting to see in the future (albeit with a different order).
1 parent 1a46c98 commit 1fb79e4

1 file changed

Lines changed: 41 additions & 58 deletions

File tree

supermerge.sh

Lines changed: 41 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@
66
# contemporaneamente dai vari moduli, in pratica sono .pre-commit-config.yaml e
77
# requirements.txt. Una volta risolti i conflitti potete rilanciare lo script.
88

9+
function rebase_n_merge()
10+
{
11+
repo="$1"
12+
rbranch="$2"
13+
lbranch="$3"
14+
git fetch "$repo" "+${rbranch}:${lbranch}"
15+
git rebase 14.0-supermerge "${lbranch}"
16+
git checkout 14.0-supermerge
17+
git merge --no-edit --no-ff "${lbranch}"
18+
}
19+
20+
function rebase_n_merge_pr()
21+
{
22+
pr="$1"
23+
rebase_n_merge https://github.com/OCA/l10n-italy "pull/${pr}/head" "pr-${pr}"
24+
}
25+
926
# clone iniziale
1027
if [ ! -x l10n-italy -a ! -x .git ]; then
1128
git clone --single-branch --branch 14.0 https://github.com/OCA/l10n-italy
@@ -14,61 +31,27 @@ fi
1431
[ -x l10n-italy ] && cd l10n-italy
1532

1633
set -xe
17-
git pull --no-ff --no-edit --quiet https://github.com/odoo-italia/l10n-italy 14.0-premerge
18-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1929/head
19-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1930/head
20-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1931/head
21-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1938/head
22-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1939/head
23-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1942/head
24-
# merged # git pull --no-ff --no-edit --quiet https://github.com/fredzamoabg/l10n-italy pull/5/head
25-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1950/head
26-
# closed, see #2234 # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1959/head
27-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1973/head
28-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1974/head
29-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1975/head
30-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1984/head
31-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1985/head
32-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2154/head
33-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1987/head
34-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1988/head
35-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1989/head
36-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/1990/head
37-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2043/head
38-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2044/head
39-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2079/head
40-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2077/head
41-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2080/head
42-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2128/head
43-
# merged # git pull --no-ff --no-edit --quiet https://github.com/TheMule71/l10n-italy 14.0-mig-l10n_it_reverse_charge
44-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2138/head
45-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2139/head
46-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2140/head
47-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2141/head
48-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2149/head
49-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2151/head
50-
# merged # as #2210 # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2153/head
51-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2156/head
52-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2157/head
53-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2195/head
54-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2198/head
55-
# closed, see #2230 # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2199/head
56-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2202/head
57-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2203/head
58-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2205/head
59-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2212/head
60-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2220/head
61-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2225/head
62-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2228/head
63-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2229/head
64-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2230/head
65-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2234/head
66-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2238/head
67-
# merged # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2246/head
68-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2248/head
69-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2258/head
70-
# closed, see #2258 # git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2166/head
71-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2259/head
72-
git pull --no-ff --no-edit --quiet https://github.com/OCA/l10n-italy pull/2278/head
73-
git pull --no-ff --no-edit --quiet https://github.com/OmniaGit/l10n-italy 14.0-mig-l10n_it_location_nuts
74-
34+
rebase_n_merge https://github.com/odoo-italia/l10n-italy 14.0-premerge 14.0-premerge
35+
rebase_n_merge_pr 2154
36+
rebase_n_merge_pr 1989
37+
rebase_n_merge_pr 1990
38+
rebase_n_merge_pr 2043
39+
rebase_n_merge_pr 2080
40+
rebase_n_merge_pr 2128
41+
rebase_n_merge_pr 2138
42+
rebase_n_merge_pr 2139
43+
rebase_n_merge_pr 2149
44+
rebase_n_merge_pr 2151
45+
rebase_n_merge_pr 2157
46+
rebase_n_merge_pr 2198
47+
rebase_n_merge_pr 2202
48+
rebase_n_merge_pr 2203
49+
rebase_n_merge_pr 2212
50+
rebase_n_merge_pr 2228
51+
rebase_n_merge_pr 2229
52+
rebase_n_merge_pr 2238
53+
rebase_n_merge_pr 2248
54+
rebase_n_merge_pr 2258
55+
rebase_n_merge_pr 2259
56+
rebase_n_merge_pr 2278
57+
rebase_n_merge https://github.com/OmniaGit/l10n-italy 14.0-mig-l10n_it_location_nuts 14.0-mig-l10n_it_location_nuts

0 commit comments

Comments
 (0)