comparison tests/test-bookmarks.t @ 34938:aa05b95949fe stable

tests: adjust hooks for Windows I'm not sure why these weren't working on Windows. The failures were generally in the style of: - remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b: 1 -> 0 + remote: "phase-move: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE" and - abort: pretxnclose-bookmark.force-forward hook exited with status 1 - [255] + abort: pretxnclose-bookmark.force-public hook exited with status 255 + [255] These failures originated in ee5f0d047b41::f6d17075608f.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 20 Oct 2017 23:01:56 -0400
parents c212947273a7
children 4441705b7111
comparison
equal deleted inserted replaced
34937:af924308110a 34938:aa05b95949fe
1 1
2 $ hg init repo 2 $ hg init repo
3 $ cd repo 3 $ cd repo
4 4
5 $ TESTHOOK='hooks.txnclose-bookmark.test=echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE"' 5 $ cat > $TESTTMP/hook.sh <<'EOF'
6 > echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE"
7 > EOF
8 $ TESTHOOK="hooks.txnclose-bookmark.test=sh $TESTTMP/hook.sh"
6 9
7 no bookmarks 10 no bookmarks
8 11
9 $ hg bookmarks 12 $ hg bookmarks
10 no bookmarks set 13 no bookmarks set
1072 * to prevent NEW bookmark on a non-public changeset 1075 * to prevent NEW bookmark on a non-public changeset
1073 * to prevent non-forward move of NEW bookmark 1076 * to prevent non-forward move of NEW bookmark
1074 1077
1075 $ cat << EOF >> .hg/hgrc 1078 $ cat << EOF >> .hg/hgrc
1076 > [hooks] 1079 > [hooks]
1077 > pretxnclose-bookmark.force-public = (echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z "\$HG_NODE" ] || (hg log -r "\$HG_NODE" -T '{phase}' | grep public > /dev/null) 1080 > pretxnclose-bookmark.force-public = sh -c "(echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z \"\$HG_NODE\" ] || (hg log -r \"\$HG_NODE\" -T '{phase}' | grep public > /dev/null)"
1078 > pretxnclose-bookmark.force-forward = (echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z "\$HG_NODE" ] || (hg log -r "max(\$HG_OLDNODE::\$HG_NODE)" -T 'MATCH' | grep MATCH > /dev/null) 1081 > pretxnclose-bookmark.force-forward = sh -c "(echo \$HG_BOOKMARK| grep -v NEW > /dev/null) || [ -z \"\$HG_NODE\" ] || (hg log -r \"max(\$HG_OLDNODE::\$HG_NODE)\" -T 'MATCH' | grep MATCH > /dev/null)"
1079 > EOF 1082 > EOF
1080 1083
1081 $ hg log -G -T phases 1084 $ hg log -G -T phases
1082 @ changeset: 6:81dcce76aa0b 1085 @ changeset: 6:81dcce76aa0b
1083 | tag: tip 1086 | tag: tip