comparison tests/test-rebase-interruptions.t @ 38484:e9e61fbac787

hooks: allow Unix style environment variables on external Windows hooks This will help making common hooks between Windows and non-Windows platforms. Having to build the shellenviron dict here and in procutil.system() is a bit unfortunate, but the only other option is to fix up the command inside procutil.system(). It seems more important that the note about the hook being run reflects what is actually run. The patch from last summer added the hooks on the command line, but it looks like HG_ARGS has since learned about --config args, and the output was just confusing. Therefore, it's now loaded from a file in the histedit test for clarity.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 02 Jul 2017 00:32:09 -0400
parents 9457c395fcbb
children 2009d84f245a
comparison
equal deleted inserted replaced
38483:3efadf2317c7 38484:e9e61fbac787
331 331
332 (pretxncommit version) 332 (pretxncommit version)
333 333
334 $ cp -R a3 hook-pretxncommit 334 $ cp -R a3 hook-pretxncommit
335 $ cd hook-pretxncommit 335 $ cd hook-pretxncommit
336 #if windows 336 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary: C"'
337 $ NODE="%HG_NODE%"
338 #else
339 $ NODE="\$HG_NODE"
340 #endif
341 $ hg rebase --source 2 --dest 5 --tool internal:other --config "hooks.pretxncommit=hg log -r $NODE | grep \"summary: C\""
342 rebasing 2:965c486023db "C" 337 rebasing 2:965c486023db "C"
343 summary: C 338 summary: C
344 rebasing 6:a0b2430ebfb8 "F" (tip) 339 rebasing 6:a0b2430ebfb8 "F" (tip)
345 transaction abort! 340 transaction abort!
346 rollback completed 341 rollback completed