view tests/testlib/map-hg-rev.sh @ 5882:1d8148795dc2 stable

next: drop safety net around getting --no-topic flag value It has a default value and every other piece of code that accesses opts doesn't bother with .get().
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 21 Apr 2021 20:05:56 +0800
parents 4f3c87584a4a
children
line wrap: on
line source

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