tests/testlib/map-hg-rev.sh
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sat, 01 Feb 2020 12:50:10 +0100
changeset 5111 1fe3f7ffb462
parent 4966 4f3c87584a4a
permissions -rwxr-xr-x
branching

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