contrib/merge-test-compat.sh
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 23 Jan 2019 12:11:36 -0800
changeset 4377 c2f9de28415a
parent 3133 13a4c35f7a0b
child 5080 6db9e2350948
permissions -rwxr-xr-x
evolve: document the "if not shouldupdate" block I missed the "not" in "if not shouldupdate: ... hg.updaterepo()" and it took a long time for me to realize it's about updating *back* to the original commit (or to its successor). Let's add a comment to maybe help the person not make the same mistake.

#!/bin/bash
set -euox pipefail

unset GREP_OPTIONS
NOTOPIC="--config experimental.topic-mode=ignore"

compatbranches=`hg branches --quiet | grep 'mercurial-' | grep -v ':' | sort -n --reverse`
prev='stable'
for branch in $compatbranches; do
    hg up $branch
    hg merge $prev
    hg commit -m "test-compat: merge $prev into $branch"
    prev=$branch
done