tests/testlib/map-hg-rev.sh
author Anton Shestakov <av6@dwimlabs.net>
Wed, 11 Mar 2020 18:03:52 +0700
changeset 5300 372dc6c5692a
parent 4966 4f3c87584a4a
permissions -rwxr-xr-x
obshistory: rename node/ctx-displaying functions Not just for debug, and yes we know it's obshistory-related.

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