contrib/merge-test-compat.sh
author Pulkit Goyal <7895pulkit@gmail.com>
Mon, 23 Apr 2018 14:48:53 +0530
changeset 3760 88601e1cd5d8
parent 3133 13a4c35f7a0b
child 5080 6db9e2350948
permissions -rwxr-xr-x
evolve: create new commit while resolving content-divergence Before this patch, we used to amend one of the content-divergent changes with the changes from the merge. Creating a new commit will certain advantages like letting user enter a commit message, showing user the new merge diff before commiting the content-divergent resolution and give us more control in the implementation part. The reason amend was used initially was just because it was easy. There are some tests update due to change.

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