@matheusbsbs / matheus-bagliano / commits / 161261b12b
Fork 0

Use CVS's -f option if available (ignore user's ~/.cvsrc file)

A user's ~/.cvsrc file can change the basic behavior of CVS commands. Therefore we should ignore it in order to ensure consistent results from the test suite. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Feb 23, 2009 at 06:08 UTC 161261b12b3777bc78ef3fbe84ccf595dd195704
2 files changed +11 -8
t/lib-cvs.sh
+3
@@ -14,6 +14,9 @@ then
14 exit
15 fi
16
17 +CVS="cvs -f"
18 +export CVS
19 +
20 cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
21 case "$cvsps_version" in
22 2.1 | 2.2*)
t/t9600-cvsimport.sh
+8 -8
@@ -6,12 +6,12 @@ test_description='git cvsimport basic tests'
6 CVSROOT=$(pwd)/cvsroot
7 export CVSROOT
8
9 -test_expect_success 'setup cvsroot' 'cvs init'
9 +test_expect_success 'setup cvsroot' '$CVS init'
10
11 test_expect_success 'setup a cvs module' '
12
13 mkdir "$CVSROOT/module" &&
14 - cvs co -d module-cvs module &&
14 + $CVS co -d module-cvs module &&
15 cd module-cvs &&
16 cat <<EOF >o_fortuna &&
17 O Fortuna
@@ -30,13 +30,13 @@ egestatem,
30 potestatem
31 dissolvit ut glaciem.
32 EOF
33 - cvs add o_fortuna &&
33 + $CVS add o_fortuna &&
34 cat <<EOF >message &&
35 add "O Fortuna" lyrics
36
37 These public domain lyrics make an excellent sample text.
38 EOF
39 - cvs commit -F message &&
39 + $CVS commit -F message &&
40 cd ..
41 '
42
@@ -74,7 +74,7 @@ translate to English
74
75 My Latin is terrible.
76 EOF
77 - cvs commit -F message &&
77 + $CVS commit -F message &&
78 cd ..
79 '
80
@@ -92,8 +92,8 @@ test_expect_success 'update cvs module' '
92
93 cd module-cvs &&
94 echo 1 >tick &&
95 - cvs add tick &&
96 - cvs commit -m 1
95 + $CVS add tick &&
96 + $CVS commit -m 1
97 cd ..
98
99 '
@@ -111,7 +111,7 @@ test_expect_success 'cvsimport.module config works' '
111
112 test_expect_success 'import from a CVS working tree' '
113
114 - cvs co -d import-from-wt module &&
114 + $CVS co -d import-from-wt module &&
115 cd import-from-wt &&
116 git cvsimport -a -z0 &&
117 echo 1 >expect &&