tests/testlib/map-hg-rev.sh
author Anton Shestakov <av6@dwimlabs.net>
Sat, 11 Jan 2020 20:10:06 +0700
changeset 5068 715c85f250e0
parent 4966 4f3c87584a4a
permissions -rwxr-xr-x
obshistory: use effect flags from obsutil They were added there in 51aadc0d0da2::187bc224554a (hg 4.4).

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