#!/bin/bashset-euoxpipefailunsetGREP_OPTIONScompatbranches=$(hgbranches--quiet|grep'mercurial-'|grep-v':'|sort-n--reverse)prev='stable'forbranchin$compatbranches;dohgup"$branch"hgmerge"$prev"hgcommit-m"test-compat: merge $prev into $branch"prev=$branchdone