changeset 13519:43b3b761d9d1

tests: don't overwrite HGRCPATH Overwriting instead of appending to the file removes the [defaults] section put into the file by run-tests.py. It also defeats the --inotify option to run-tests.py. (Nothing was broken yet, but the lack of -d "0 0" cause changeset hashes to change unexpectedly in a test case I was editing.)
author Martin Geisler <mg@aragost.com>
date Tue, 01 Mar 2011 17:01:17 +0100
parents c39e9cead0ae
children c1629963158a
files contrib/check-code.py tests/test-convert-hg-startrev.t tests/test-convert-svn-branches.t tests/test-convert-svn-encoding.t tests/test-convert-svn-move.t tests/test-convert-svn-sink.t tests/test-convert-svn-source.t tests/test-convert-svn-startrev.t tests/test-convert-svn-tags.t tests/test-eol-add.t tests/test-eol-clone.t tests/test-eol-hook.t tests/test-eol-patch.t tests/test-eol-tag.t tests/test-eol-update.t tests/test-eol.t
diffstat 16 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Wed Mar 02 13:24:48 2011 +0100
+++ b/contrib/check-code.py	Tue Mar 01 17:01:17 2011 +0100
@@ -66,6 +66,7 @@
     (r'^source\b', "don't use 'source', use '.'"),
     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
     (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"),
+    (r'cat > \$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"),
 ]
 
 testfilters = [
--- a/tests/test-convert-hg-startrev.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-hg-startrev.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,5 +1,5 @@
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > graphlog =
   > convert =
--- a/tests/test-convert-svn-branches.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-branches.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,7 +1,7 @@
 
   $ "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-encoding.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-encoding.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,7 +1,7 @@
 
   $ "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-move.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-move.t	Tue Mar 01 17:01:17 2011 +0100
@@ -5,7 +5,7 @@
   > {
   >     tr '\\' /
   > }
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-sink.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-sink.t	Tue Mar 01 17:01:17 2011 +0100
@@ -22,7 +22,7 @@
   >     )
   > }
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-source.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-source.t	Tue Mar 01 17:01:17 2011 +0100
@@ -5,7 +5,7 @@
   > {
   >     tr '\\' /
   > }
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-startrev.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-startrev.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,7 +1,7 @@
 
   $ "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-convert-svn-tags.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-convert-svn-tags.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,7 +1,7 @@
 
   $ "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > convert = 
   > graphlog =
--- a/tests/test-eol-add.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-add.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Test adding .hgeol
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = 1
   > EOF
--- a/tests/test-eol-clone.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-clone.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Testing cloning with the EOL extension
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = True
   > 
--- a/tests/test-eol-hook.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-hook.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Test the EOL hook
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = True
   > EOF
--- a/tests/test-eol-patch.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-patch.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Test EOL patching
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = 1
   > EOF
--- a/tests/test-eol-tag.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-tag.t	Tue Mar 01 17:01:17 2011 +0100
@@ -2,7 +2,7 @@
 
 Testing tagging with the EOL extension
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = True
   > 
--- a/tests/test-eol-update.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol-update.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Test EOL update
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = 1
   > EOF
--- a/tests/test-eol.t	Wed Mar 02 13:24:48 2011 +0100
+++ b/tests/test-eol.t	Tue Mar 01 17:01:17 2011 +0100
@@ -1,6 +1,6 @@
 Test EOL extension
 
-  $ cat > $HGRCPATH <<EOF
+  $ cat >> $HGRCPATH <<EOF
   > [diff]
   > git = True
   > EOF