19159 |
# Now test verifymsg |
# Now test verifymsg |
19160 |
cat >${TESTDIR}/vscript <<EOF |
cat >${TESTDIR}/vscript <<EOF |
19161 |
#!${TESTSHELL} |
#!${TESTSHELL} |
19162 |
|
echo vscript "\$@" |
19163 |
if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then |
if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then |
19164 |
exit 0 |
exit 0 |
19165 |
elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then |
elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then |
19173 |
EOF |
EOF |
19174 |
cat >${TESTDIR}/vscript2 <<EOF |
cat >${TESTDIR}/vscript2 <<EOF |
19175 |
#!${TESTSHELL} |
#!${TESTSHELL} |
19176 |
|
echo vscript2 "\$@" |
19177 |
if test -f CVS/Repository; then |
if test -f CVS/Repository; then |
19178 |
repo=\`cat CVS/Repository\` |
repo=\`cat CVS/Repository\` |
19179 |
else |
else |
19192 |
else |
else |
19193 |
chmod +x ${TESTDIR}/vscript* |
chmod +x ${TESTDIR}/vscript* |
19194 |
fi |
fi |
19195 |
echo "^first-dir/yet-another\\(/\\|\$\\) ${TESTDIR}/vscript2 %l" >verifymsg |
echo "^first-dir/yet-another\\(/\\|\$\\) ${TESTDIR}/vscript2 %l %{sV}" >verifymsg |
19196 |
echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript %l" >>verifymsg |
echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript %l %{sV}" >>verifymsg |
19197 |
echo "^missing-script\$ ${TESTDIR}/bogus %l" >>verifymsg |
echo "^missing-script\$ ${TESTDIR}/bogus %l" >>verifymsg |
19198 |
echo "^missing-var\$ ${TESTDIR}/vscript %l \${=Bogus}" >>verifymsg |
echo "^missing-var\$ ${TESTDIR}/vscript %l \${=Bogus}" >>verifymsg |
19199 |
# first test the directory independant verifymsg |
# first test the directory independant verifymsg |
19205 |
cd ../first-dir |
cd ../first-dir |
19206 |
echo line2 >>file1 |
echo line2 >>file1 |
19207 |
dotest_fail info-v2 "${testcvs} -q ci -m bogus" \ |
dotest_fail info-v2 "${testcvs} -q ci -m bogus" \ |
19208 |
"No BugId found\. |
"vscript $TMPDIR/[a-zA-Z0-9]* file1 1\.3 |
19209 |
|
No BugId found\. |
19210 |
${SPROG} \[commit aborted\]: Message verification failed" |
${SPROG} \[commit aborted\]: Message verification failed" |
19211 |
|
|
19212 |
cat >${TESTDIR}/comment.tmp <<EOF |
cat >${TESTDIR}/comment.tmp <<EOF |
19214 |
and many more lines after it |
and many more lines after it |
19215 |
EOF |
EOF |
19216 |
dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
19217 |
"$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
"vscript $TMPDIR/[a-zA-Z0-9]* file1 1\.3 |
19218 |
|
$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
19219 |
new revision: 1\.4; previous revision: 1\.3" |
new revision: 1\.4; previous revision: 1\.3" |
19220 |
rm ${TESTDIR}/comment.tmp |
rm ${TESTDIR}/comment.tmp |
19221 |
|
|
19225 |
touch file2 |
touch file2 |
19226 |
dotest_fail info-v4 \ |
dotest_fail info-v4 \ |
19227 |
"${testcvs} import -m bogus first-dir/another x y" \ |
"${testcvs} import -m bogus first-dir/another x y" \ |
19228 |
"No BugId found\. |
"vscript $TMPDIR/[a-zA-Z0-9]* - Imported sources NONE |
19229 |
|
No BugId found\. |
19230 |
${SPROG} \[import aborted\]: Message verification failed" |
${SPROG} \[import aborted\]: Message verification failed" |
19231 |
|
|
19232 |
# now verify that directory dependent verifymsgs work |
# now verify that directory dependent verifymsgs work |
19233 |
dotest info-v5 \ |
dotest info-v5 \ |
19234 |
"${testcvs} import -m bogus first-dir/yet-another x y" \ |
"${testcvs} import -m bogus first-dir/yet-another x y" \ |
19235 |
"${TESTDIR}/wnt/another-dir |
"vscript2 $TMPDIR/[a-zA-Z0-9]* - Imported sources NONE |
19236 |
|
$TESTDIR/wnt/another-dir |
19237 |
N first-dir/yet-another/file2 |
N first-dir/yet-another/file2 |
19238 |
|
|
19239 |
No conflicts created by this import" \ |
No conflicts created by this import" \ |
19240 |
"${CVSROOT_DIRNAME}/first-dir/yet-another |
"vscript2 $TMPDIR/[a-zA-Z0-9]* - Imported sources NONE |
19241 |
|
$CVSROOT_DIRNAME/first-dir/yet-another |
19242 |
N first-dir/yet-another/file2 |
N first-dir/yet-another/file2 |
19243 |
|
|
19244 |
No conflicts created by this import" |
No conflicts created by this import" |
19256 |
if $remote; then |
if $remote; then |
19257 |
dotest_fail info-v6r \ |
dotest_fail info-v6r \ |
19258 |
"${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ |
"${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ |
19259 |
"${CVSROOT_DIRNAME}/first-dir/yet-another/and-another |
"vscript2 $TMPDIR/[a-zA-Z0-9]* - Imported sources NONE |
19260 |
${SPROG} \[import aborted\]: Message verification failed" |
$CVSROOT_DIRNAME/first-dir/yet-another/and-another |
19261 |
|
$SPROG \[import aborted\]: Message verification failed" |
19262 |
else |
else |
19263 |
dotest info-v6 \ |
dotest info-v6 \ |
19264 |
"${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ |
"${testcvs} import -m bogus first-dir/yet-another/and-another x y" \ |
19265 |
"${TESTDIR}/wnt/another-dir |
"vscript2 $TMPDIR/[a-zA-Z0-9]* - Imported sources NONE |
19266 |
|
$TESTDIR/wnt/another-dir |
19267 |
N first-dir/yet-another/and-another/file2 |
N first-dir/yet-another/and-another/file2 |
19268 |
|
|
19269 |
No conflicts created by this import" |
No conflicts created by this import" |
19300 |
See what happens next. |
See what happens next. |
19301 |
EOF |
EOF |
19302 |
dotest info-reread-2 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
dotest info-reread-2 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
19303 |
"$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
"vscript $TMPDIR/[a-zA-Z0-9]* file1 1\.4 |
19304 |
|
$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
19305 |
new revision: 1\.5; previous revision: 1\.4" |
new revision: 1\.5; previous revision: 1\.4" |
19306 |
dotest info-reread-3 "${testcvs} -q log -N -r1.5 file1" " |
dotest info-reread-3 "${testcvs} -q log -N -r1.5 file1" " |
19307 |
.* |
.* |
19326 |
See what happens next with stat. |
See what happens next with stat. |
19327 |
EOF |
EOF |
19328 |
dotest info-reread-5 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
dotest info-reread-5 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
19329 |
"$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
"vscript $TMPDIR/[a-zA-Z0-9]* file1 1\.5 |
19330 |
|
$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
19331 |
new revision: 1\.6; previous revision: 1\.5" |
new revision: 1\.6; previous revision: 1\.5" |
19332 |
dotest info-reread-6 "${testcvs} -q log -N -r1.6 file1" " |
dotest info-reread-6 "${testcvs} -q log -N -r1.6 file1" " |
19333 |
.* |
.* |
19352 |
See what happens next. |
See what happens next. |
19353 |
EOF |
EOF |
19354 |
dotest info-reread-8 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
dotest info-reread-8 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \ |
19355 |
"$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
"vscript $TMPDIR/[a-zA-Z0-9]* file1 1\.6 |
19356 |
|
$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 |
19357 |
new revision: 1\.7; previous revision: 1\.6" |
new revision: 1\.7; previous revision: 1\.6" |
19358 |
dotest info-reread-6 "${testcvs} -q log -N -r1.7 file1" " |
dotest info-reread-6 "${testcvs} -q log -N -r1.7 file1" " |
19359 |
.* |
.* |