tests/testlib/map-hg-rev.sh
branchstable
changeset 4966 4f3c87584a4a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testlib/map-hg-rev.sh	Thu Nov 21 14:18:35 2019 +0700
@@ -0,0 +1,15 @@
+#!/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