D3620: tests: fix test-patch.t on picker /bin/sh implementations

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat May 19 15:16:30 EDT 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  FreeBSD sh(1) doesn't accept -d, so we weren't testing what we
  expected there. Let's just use a simple Python script instead.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3620

AFFECTED FILES
  tests/test-patch.t

CHANGE DETAILS

diff --git a/tests/test-patch.t b/tests/test-patch.t
--- a/tests/test-patch.t
+++ b/tests/test-patch.t
@@ -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]



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list