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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu May 24 13:14:43 EDT 2018


durin42 added a comment.


  In https://phab.mercurial-scm.org/D3620#57370, @martinvonz wrote:
  
  > In https://phab.mercurial-scm.org/D3620#57369, @durin42 wrote:
  >
  > > In https://phab.mercurial-scm.org/D3620#57367, @martinvonz wrote:
  > >
  > > > > 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.
  > > >
  > > > This confused me for longer than it should. I assume you just mean -c instead of -d.
  > >
  > >
  > > No, I actually mean -d. We *add* `-d $PWD` to the invocation of the patch tool internally before invoking it.
  >
  >
  > Hmm, so we were hoping that whatever `sh` implementation was used would support a -d option and would not fail when it was given $PWD? That's a really odd assumption, so thanks for cleaning that up. Do other shells (than FreeBSD) support a -d option (bash and dash don't seem to)?
  
  
  It looks like bash accepts unknown flags if -c is in use, but BSD sh doesn't. Maybe dash works the same way? I'm too lazy to ssh to a Debian machine right now to find out.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list