cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/src ChangeLog sanity.sh


From: Mark D. Baushke
Subject: [Cvs-cvs] ccvs/src ChangeLog sanity.sh
Date: Thu, 15 Jun 2006 15:46:34 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Mark D. Baushke <mdb>   06/06/15 15:46:33

Modified files:
        src            : ChangeLog sanity.sh 

Log message:
        * sanity.sh (conflicts4): Use $SECONDARY_CVSROOT_DIRNAME where
        needed for $proxy testing.
        
        * sanity.sh: Determine if the expr to be used will be confused
        by 'expr "-rw-rw-r--" : "-rw-rw-r--"' and if so, try the POSIX
        mechanism of a '--' argument to terminate argument processing
        by using 'expr -- "-rw-rw-r--" : "-rw-rw-r--"' as a workaround.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3448&r2=1.3449
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1153&r2=1.1154

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3448
retrieving revision 1.3449
diff -u -b -r1.3448 -r1.3449
--- ChangeLog   13 Jun 2006 19:26:43 -0000      1.3448
+++ ChangeLog   15 Jun 2006 15:46:33 -0000      1.3449
@@ -1,3 +1,13 @@
+2006-06-15  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (conflicts4): Use $SECONDARY_CVSROOT_DIRNAME where
+       needed for $proxy testing.
+
+       * sanity.sh: Determine if the expr to be used will be confused
+       by 'expr "-rw-rw-r--" : "-rw-rw-r--"' and if so, try the POSIX
+       mechanism of a '--' argument to terminate argument processing
+       by using 'expr -- "-rw-rw-r--" : "-rw-rw-r--"' as a workaround.
+
 2006-06-13  Derek Price  <address@hidden>
 
        * admin.c (wescape): Suppress compiler warning.

Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1153
retrieving revision 1.1154
diff -u -b -r1.1153 -r1.1154
--- sanity.sh   11 Jun 2006 14:35:16 -0000      1.1153
+++ sanity.sh   15 Jun 2006 15:46:33 -0000      1.1154
@@ -1143,6 +1143,32 @@
 fi
 }
 
+# FreeBSD 5.2 and 6.1 support 'expr [-e] expression' 
+# They get confused unless '--' is used before the expressions
+# when those expressions begin with a '-' character, such as the
+# output of an ls -l command. The EXPR_COMPAT environment variable may
+# be used to go back to the non-POSIX behavior as an alternative.
+# (GNU expr appears to accept the '--' argument and work correctly or
+# not have it and still get the results we want.)
+exprDASHDASH='false'
+expr_set_DASHDASH ()
+{
+expr=$1
+exprDASHDASH='false'
+if $expr $exprDASHDASH "-rw-rw-r--" : "-rw-rw-r--" >/dev/null 2>&1; then
+  # good, it works
+  return 0
+else
+  if $expr -- "-rw-rw-r--" : "-rw-rw-r--" >/dev/null 2>&1; then
+    exprDASHDASH=':'
+    return 0
+  else
+    return 77
+  fi
+fi
+}
+
+
 EXPR=`find_tool expr ${EXPR}:gexpr \
   version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \
 expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`
@@ -1151,6 +1177,10 @@
 expr_set_ENDANCHOR ${EXPR} >/dev/null
 expr_tooltest_DOTSTAR ${EXPR} >/dev/null
 
+# Set the exprDASHDASH for the chosen expr version
+expr_set_DASHDASH ${EXPR}
+[ $exprDASHDASH ] && EXPR="$EXPR --"
+
 echo "Using EXPR=$EXPR" >>$LOGFILE
 echo "Using ENDANCHOR=$ENDANCHOR" >>$LOGFILE
 echo "Using DOTSTAR=$DOTSTAR" >>$LOGFILE
@@ -12403,6 +12433,40 @@
            save_CVS_SERVER=$CVS_SERVER
            CVS_SERVER=$TESTDIR/conflicts4/serveme; export CVS_SERVER
            dotest_fail conflicts4-10r "$testcvs -q up" "C file1"
+           if $proxy; then
+            dotest conflicts4-11p "cat $TESTDIR/conflicts4/client.out" \
+"$DOTSTAR
+Argument --
+Directory .
+$SECONDARY_CVSROOT_DIRNAME/first-dir
+Entry /file1/1.2/$PLUS=//
+Modified file1
+u=.*,g=.*,o=.*
+59
+baseline
+""<<<<<<< file1
+wibble1
+""=======
+wibble2
+"">>>>>>> 1.2
+update"
+
+           cat >$TESTDIR/conflicts4/serveme <<EOF
+#!$TESTSHELL
+# This is admittedly a bit cheezy, in the sense that we make lots
+# of assumptions about what the client is going to send us.
+# We don't mention Repository, because current clients don't require it.
+# Sending these at our own pace, rather than waiting for the client to
+# make the requests, is bogus, but hopefully we can get away with it.
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update Global_option 
Empty-conflicts"
+echo "ok"
+echo "MT text C "
+echo "MT fname file1"
+echo "MT newline"
+echo "error  "
+cat >$TESTDIR/conflicts4/client.out
+EOF
+           else
            dotest conflicts4-11r "cat $TESTDIR/conflicts4/client.out" \
 "$DOTSTAR
 Argument --
@@ -12435,8 +12499,19 @@
 echo "error  "
 cat >$TESTDIR/conflicts4/client.out
 EOF
+           fi
 
            dotest_fail conflicts4-12r "$testcvs -q up" "C file1"
+           if $proxy; then
+             dotest conflicts4-13p "cat $TESTDIR/conflicts4/client.out" \
+"$DOTSTAR
+Argument --
+Directory .
+$SECONDARY_CVSROOT_DIRNAME/first-dir
+Entry /file1/1.2/$PLUS=//
+Unchanged file1
+update"
+           else
            dotest conflicts4-13r "cat $TESTDIR/conflicts4/client.out" \
 "$DOTSTAR
 Argument --
@@ -12445,6 +12520,7 @@
 Entry /file1/1.2/$PLUS=//
 Unchanged file1
 update"
+           fi
 
            CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER
          fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]