[PATCH] test-subrepo-svn: remove bashism
Matt Mackall
mpm at selenic.com
Mon Jan 18 11:41:28 CST 2010
On Mon, 2010-01-18 at 00:47 +0100, Mads Kiilerich wrote:
> Cedric Duval wrote, On 01/17/2010 08:23 PM:
> > Hi,
> >
> > Mads Kiilerich wrote:
> >
> >> test-subrepo-svn: remove bashism
> >>
> >
> >> -WCROOT="$(pwd)/svn-wc"
> >> +WCROOT="`pwd`/svn-wc"
> >>
> > I am a bit surprised by this, is it an issue on some platforms? I wouldn't
> > have considered this a bashim, rather a standard construct. As far as I can
> > see it is part of the Single Unix Specification, and appeared in XPG4 (1992).
> >
> > http://www.opengroup.org/onlinepubs/7990989775/xcu/chap2.html#tag_001_006_003
> > http://www.unix.org/whitepapers/shdiffs.html
> >
>
> $ uname -a
> SunOS build10x 5.10 Generic_137112-07 i86pc i386 i86pc
> $ echo $(echo x)
> syntax error: `(' unexpected
> $ echo `echo x`
> x
>
> But ok - just because it works with bash and there exists something
> which calls itself sh doesn't prove that it is a bashism. But the fix is
> needed anyway.
>
> http://mercurial.selenic.com/wiki/WritingTests#sh doesn't mention this,
> but generally $() isn't used in the test suite. Do anybody have an
> opinion about whether it should be added to the don't-list?
Yes, let's.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list