cvs-cvs
[Top][All Lists]
Advanced

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

[Cvs-cvs] Changes to ccvs/src/sanity.sh


From: Derek Robert Price
Subject: [Cvs-cvs] Changes to ccvs/src/sanity.sh
Date: Tue, 13 Sep 2005 14:12:26 -0400

Index: ccvs/src/sanity.sh
diff -u ccvs/src/sanity.sh:1.1085 ccvs/src/sanity.sh:1.1086
--- ccvs/src/sanity.sh:1.1085   Tue Sep 13 02:46:31 2005
+++ ccvs/src/sanity.sh  Tue Sep 13 18:12:22 2005
@@ -452,11 +452,7 @@
 SPROG=`basename ${servercvs} |sed 's/\.exe$//'`
 
 
-# Regexp to match an author name.  I'm not really sure what characters
-# should be here.  a-zA-Z obviously.  People complained when 0-9 were
-# not allowed in usernames.  Other than that I'm not sure.
-username="[-a-zA-Z0-9][-a-zA-Z0-9]*"
-author="[-a-zA-Z0-9][-a-zA-Z0-9]*"
+# Match the hostname
 hostname="[-_.a-zA-Z0-9]*"
 
 # Regexp to match a commitid
@@ -1015,11 +1011,21 @@
   exit 1
 fi
 
-# Only 8 characters of $username appear in output.
+# Only 8 characters of $username appear in some output.
 if test `echo $username |wc -c` -gt 8; then
-  username=`echo $username |sed 's/^\(........\).*/\1/'`
+  username8=`echo $username |sed 's/^\(........\).*/\1/'`
+else
+  username8=$username
 fi
 
+# Rarely, we need to match any username, not just the name of the user
+# running this test.
+#
+# I'm not really sure what characters should be here.  a-zA-Z obviously.
+# People complained when 0-9 were not allowed in usernames.  Other than that
+# I'm not sure.
+anyusername="[-a-zA-Z0-9][-a-zA-Z0-9]*"
+
 # now make sure that tr works on NULs
 tr_tooltest1 ()
 {
@@ -3004,8 +3010,8 @@
 '
 Annotations for sdir/ssdir/ssfile
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile
-1\.2          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2'
+1\.1          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile
+1\.2          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2'
 
          # Test resurrecting with strange revision numbers
          cd sdir/ssdir
@@ -21696,47 +21702,47 @@
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.3          (${username} *[0-9a-zA-Z-]*): trunk file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line"
          dotest ann-11 "${testcvs} ann -r br" \
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.1          (${username} *[0-9a-zA-Z-]*): file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
          # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?
          dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""
          dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.1          (${username} *[0-9a-zA-Z-]*): file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
          dotest_fail ann-14 "$testcvs ann -r bill-clintons-chastity file1" \
 "$SPROG \[annotate aborted\]: no such tag \`bill-clintons-chastity'"
 
@@ -21748,46 +21754,46 @@
 "
 Annotations for first-dir/file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.3          (${username} *[0-9a-zA-Z-]*): trunk file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line"
          dotest ann-r11 "${testcvs} rann -r br first-dir" \
 "
 Annotations for first-dir/file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.1          (${username} *[0-9a-zA-Z-]*): file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
          dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
          dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
 "
 Annotations for first-dir/file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1          (${username} *[0-9a-zA-Z-]*): this
-1\.1          (${username} *[0-9a-zA-Z-]*): is
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.1          (${username} *[0-9a-zA-Z-]*): file
-1\.2          (${username} *[0-9a-zA-Z-]*): 
-1\.2          (${username} *[0-9a-zA-Z-]*): with
-1\.2          (${username} *[0-9a-zA-Z-]*): a
-1\.2          (${username} *[0-9a-zA-Z-]*): blank
-1\.2          (${username} *[0-9a-zA-Z-]*): line
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some
-1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
          dotest_fail ann-r14 "$testcvs rann -r bill-clintons-chastity 
first-dir/file1" \
 "$SPROG \[rannotate aborted\]: no such tag \`bill-clintons-chastity'"
 
@@ -21827,8 +21833,8 @@
 "
 Annotations for $file
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1.2          ($username *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* 
$username Exp "'\$'"
-1.2          ($username *[0-9a-zA-Z-]*): line2"
+1.2          ($username8 *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* 
[0-9:]* $username Exp "'\$'"
+1.2          ($username8 *[0-9a-zA-Z-]*): line2"
 
          dokeep
          cd ../..
@@ -24749,24 +24755,24 @@
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.3          (${username} *[0-9a-zA-Z-]*): initial
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
${username}
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx First log line
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx Second log line
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx
-1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): br-change"
+1\.3          ($username8 *[0-9a-zA-Z-]*): initial
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
$username
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx First log line
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Second log line
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): br-change"
          dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.3          (${username} *[0-9a-zA-Z-]*): initial
-1\.5          (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
-1\.5          (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
${username}
-1\.5          (${username} *[0-9a-zA-Z-]*): xx First log line
-1\.5          (${username} *[0-9a-zA-Z-]*): xx Second log line
-1\.5          (${username} *[0-9a-zA-Z-]*): xx
-1\.5          (${username} *[0-9a-zA-Z-]*): change"
+1\.3          ($username8 *[0-9a-zA-Z-]*): initial
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
$username
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx First log line
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx Second log line
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx
+1\.5          ($username8 *[0-9a-zA-Z-]*): change"
          cd ../..
 
          #
@@ -25410,13 +25416,13 @@
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1\.4\.1      (${username} *[0-9a-zA-Z-]*): br2-1"
+1\.1\.4\.1      ($username8 *[0-9a-zA-Z-]*): br2-1"
 
          dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \
 "
 Annotations for file1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-1\.1\.4\.2      (${username} *[0-9a-zA-Z-]*): br2-2"
+1\.1\.4\.2      ($username8 *[0-9a-zA-Z-]*): br2-2"
 
          # Now check to see what happens when we add files to br2 and trunk
          echo br2-1 > file3
@@ -27062,13 +27068,13 @@
 
          cat >${TESTDIR}/lockme <<EOF
 #!${TESTSHELL}
-line=\`grep <\$1/\$2,v 'locks ${author}:1\.[0-9];'\`
+line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
 if test -z "\$line"; then
   # It isn't locked
   exit 0
 else
-  user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\`
-  version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\`
+  user=\`echo \$line | sed -e 's/locks \\($anyusername\\):[0-9.]*;.*/\\1/'\`
+  version=\`echo \$line | sed -e 's/locks $anyusername:\\([0-9.]*\\);.*/\\1/'\`
   echo "\$user has file a-lock locked for version  \$version" >&2
   exit 1
 fi




reply via email to

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