Patchwork tests: use ls instead of find, all files are in the same directory

login
register
mail settings
Submitter Simon Heimberg
Date Feb. 3, 2014, 7:16 p.m.
Message ID <f066d02882a6b484d4bc.1391454984@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/3436/
State Accepted
Commit 3fedc29a98bb2fa46669b2cf1ba4e209da6685ed
Headers show

Comments

Simon Heimberg - Feb. 3, 2014, 7:16 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1391454538 -3600
# Branch stable
# Node ID f066d02882a6b484d4bcfe7b18dd08a846bbcc79
# Parent  e62d9e2240555cb02d90f58db841676d10e217b5
tests: use ls instead of find, all files are in the same directory

In this case find has no advantage compared to ls. Descending into directories
is unnecessary, because there are none.
Matt Mackall - Feb. 7, 2014, 1 a.m.
On Mon, 2014-02-03 at 20:16 +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1391454538 -3600
> # Branch stable
> # Node ID f066d02882a6b484d4bcfe7b18dd08a846bbcc79
> # Parent  e62d9e2240555cb02d90f58db841676d10e217b5
> tests: use ls instead of find, all files are in the same directory

Queued for default, thanks.

Patch

diff -r e62d9e224055 -r f066d02882a6 tests/test-gendoc.t
--- a/tests/test-gendoc.t	Son Nov 17 20:30:31 2013 +0100
+++ b/tests/test-gendoc.t	Mon Feb 03 20:08:58 2014 +0100
@@ -3,7 +3,7 @@ 
   $ "$TESTDIR/hghave" docutils || exit 80
   $ HGENCODING=UTF-8
   $ export HGENCODING
-  $ { echo C; find "$TESTDIR/../i18n" -name "*.po" | sort; } | while read PO; do
+  $ { echo C; ls "$TESTDIR/../i18n"/*.po | sort; } | while read PO; do
   >     LOCALE=`basename "$PO" .po`
   >     echo
   >     echo "% extracting documentation from $LOCALE"