contrib/merge-test-compat.sh
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 13 Mar 2018 18:17:50 +0530
changeset 3529 d90e0faaec80
parent 3133 13a4c35f7a0b
child 5080 6db9e2350948
permissions -rwxr-xr-x
evolve: fix stabilization of orphan merge changesets in case of conflicts As demonstrated by tests added in previous patch, if one of the parent of a merge changeset has a new version and merge changeset gets, running `hg evolve` to stabilize that if results in conflicts will lead to lose of other parent of that merge changeset when we resolve conflicts and do `hg evolve --continue`. This patch fixes the behavior, by checking whether we are continuing evolving a merge changeset and if yes, setting the dirstate parents according to that.

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