contrib/merge-test-compat.sh
author Anton Shestakov <av6@dwimlabs.net>
Mon, 20 Jan 2020 22:43:11 +0700
branchstable
changeset 5080 6db9e2350948
parent 3133 13a4c35f7a0b
child 5081 17fac26833da
permissions -rwxr-xr-x
contrib: shellcheck merge-test-compat.sh
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3133
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
#!/bin/bash
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
set -euox pipefail
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
unset GREP_OPTIONS
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
5080
6db9e2350948 contrib: shellcheck merge-test-compat.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 3133
diff changeset
     6
compatbranches=$(hg branches --quiet | grep 'mercurial-' | grep -v ':' | sort -n --reverse)
3133
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
prev='stable'
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
for branch in $compatbranches; do
5080
6db9e2350948 contrib: shellcheck merge-test-compat.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 3133
diff changeset
     9
    hg up "$branch"
6db9e2350948 contrib: shellcheck merge-test-compat.sh
Anton Shestakov <av6@dwimlabs.net>
parents: 3133
diff changeset
    10
    hg merge "$prev"
3133
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
    hg commit -m "test-compat: merge $prev into $branch"
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
    prev=$branch
13a4c35f7a0b util: add a small script to help with the merging of branches
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
done