contrib/merge-test-compat.sh
author Sushil khanchi <sushilkhanchi97@gmail.com>
Thu, 12 Dec 2019 17:22:18 +0530
changeset 5012 5b5cfb9b0a0b
parent 3133 13a4c35f7a0b
child 5080 6db9e2350948
permissions -rwxr-xr-x
evolve: remove the unnecessary condition to check empty successors set I annotated the history of this "newer == [()]" condition and found that it was added in the initial stages of evolution project (more than 8 years ago) and there is no test where we get [()] as a successor set. So looks like "if not newer" is enough to check if it is empty. I also looked into obsutil.successorssets() implementation and I don't think it would give us [()] in any case.

#!/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