comparison tests/test-histedit-fold.t @ 38722:2009d84f245a

hook: disable the shell to native command translation by default There are other things I want to add like ~ expansion and translating single to double quotes for cmd.exe. So off by default is safer. I'm having second thoughts about the name, but I don't have any better ideas.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Jul 2018 23:46:09 -0400
parents 38dfd308fe9d
children 02b5b5c1bba8
comparison
equal deleted inserted replaced
38721:dbbe45ae5ad1 38722:2009d84f245a
476 $ hg logt 476 $ hg logt
477 2:a1a953ffb4b0 c 477 2:a1a953ffb4b0 c
478 1:199b6bb90248 b 478 1:199b6bb90248 b
479 0:6c795aa153cb a 479 0:6c795aa153cb a
480 480
481 $ hg histedit 6c795aa153cb --config hooks.commit='echo commit $HG_NODE' --commands - 2>&1 << EOF | fixbundle 481 $ hg histedit 6c795aa153cb --config hooks.commit='echo commit $HG_NODE' --config hooks.tonative.commit=True \
482 > --commands - 2>&1 << EOF | fixbundle
482 > pick 199b6bb90248 b 483 > pick 199b6bb90248 b
483 > fold a1a953ffb4b0 c 484 > fold a1a953ffb4b0 c
484 > pick 6c795aa153cb a 485 > pick 6c795aa153cb a
485 > EOF 486 > EOF
486 commit 9599899f62c05f4377548c32bf1c9f1a39634b0c 487 commit 9599899f62c05f4377548c32bf1c9f1a39634b0c
492 Test unix -> windows style variable substitution in external hooks. 493 Test unix -> windows style variable substitution in external hooks.
493 494
494 $ cat > $TESTTMP/tmp.hgrc <<'EOF' 495 $ cat > $TESTTMP/tmp.hgrc <<'EOF'
495 > [hooks] 496 > [hooks]
496 > pre-add = echo no variables 497 > pre-add = echo no variables
497 > tonative.pre-add = False
498 > post-add = echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT 498 > post-add = echo ran $HG_ARGS, literal \$non-var, 'also $non-var', $HG_RESULT
499 > tonative.post-add = True
499 > EOF 500 > EOF
500 501
501 TODO: Windows should output double quotes around "also $non-var" 502 TODO: Windows should output double quotes around "also $non-var"
502 $ echo "foo" > amended.txt 503 $ echo "foo" > amended.txt
503 $ HGRCPATH=$TESTTMP/tmp.hgrc hg add -v amended.txt 504 $ HGRCPATH=$TESTTMP/tmp.hgrc hg add -v amended.txt