contrib/merge-test-compat.sh
author Anton Shestakov <av6@dwimlabs.net>
Sat, 22 Jun 2019 18:37:21 +0800
branchstable
changeset 4698 b89495215c6e
parent 3133 13a4c35f7a0b
child 5080 6db9e2350948
permissions -rwxr-xr-x
tests: demonstrate prune --pair not moving bookmark correctly After `mkcommit n2` line the bookmark is on the correct changeset, but when we prune --pair the two newly created changesets (revs 13 and 14), the bookmark gets moved to their ancestor (rev 0). Instead, it should've moved to the last of their successors (rev 12).

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