changeset 38292:6cc5d01a58a6 stable

tests: fix test-patch.t on pickier /bin/sh implementations This is a graft of 0b39edeff033 and f44306940c94 from default because I'm tired of seeing the FreeBSD build be red on stable. See those revisions for details on what's going on here.
author Augie Fackler <augie@google.com>
date Sun, 20 May 2018 23:05:18 -0400
parents 3c84493556db
children d9e87566f879
files tests/test-patch.t
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-patch.t	Wed Jun 06 12:53:26 2018 -0700
+++ b/tests/test-patch.t	Sun May 20 23:05:18 2018 -0400
@@ -92,7 +92,12 @@
 
 Error exit (issue4746)
 
-  $ hg import ../c/p --config ui.patch='sh -c "exit 1"'
+  $ cat >> exit1.py <<EOF
+  > import sys
+  > sys.exit(1)
+  > EOF
+
+  $ hg import ../c/p --config ui.patch="\"$PYTHON\" \"`pwd`/exit1.py\""
   applying ../c/p
   abort: patch command failed: exited with status 1
   [255]