touch: allow divergence with -A even if allowdivergence=no
This is a phase-divergent update to 731b5a89a784.
1f92a6aa40d6 (evolve: add pre-check logic for content-divergence in
rewriteutil.precheck(), 2019-11-04) taught `rewriteutil.precheck()` to
check for divergence. It also set allowdivergence=yes in test-touch.t
to silence the error. However, if one does *not* have that set, it is
no longer possible to allow divergence with `hg touch -A`. This patch
fixes that.
#!/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