[PATCH] tests: use ls instead of find, all files are in the same directory

Simon Heimberg simohe at besonet.ch
Mon Feb 3 13:16:24 CST 2014


# HG changeset patch
# User Simon Heimberg <simohe at 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.

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"


More information about the Mercurial-devel mailing list