tests/testlib/map-hg-rev.sh
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 11 Mar 2020 23:56:11 +0100
branchstable
changeset 5272 b20d04641c0f
parent 4966 4f3c87584a4a
permissions -rwxr-xr-x
head-checking: ignore obsolete section when checking for single heads This overwrite the core code that enforce single heads to ignore obsolete section. That way older obsolete version of a branch no longer prevent the new version to be pushed.

#!/bin/sh
set -eu

case $1 in
    default)
        echo default
        ;;
    mercurial-*)
        exp=$(echo "$1" | cut -d- -f2 | sed 's#\.#\\.#g')
        echo 'max(tag("re:^'"$exp"'"))'
        ;;
    *)
        echo stable
        ;;
esac