[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog recurse.c root.c sanity.sh u...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog recurse.c root.c sanity.sh u... |
Date: |
Wed, 10 Sep 2008 16:29:21 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/09/10 16:29:21
Modified files:
src : ChangeLog recurse.c root.c sanity.sh update.c
Log message:
* recurse.c (do_recursion): Quote UPDATE_DIR in output. Use new
NULL2DOT macro.
* root.c: Include "quote.h".
(Name_Root): Use dir_append to simplify error messages and improve
readability. Add quoting.
* update.c: Use NULL2DOT in output.
* sanity.sh: Update to compensate.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3568&r2=1.3569
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/recurse.c?cvsroot=cvs&r1=1.130&r2=1.131
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/root.c?cvsroot=cvs&r1=1.134&r2=1.135
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1195&r2=1.1196
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/update.c?cvsroot=cvs&r1=1.280&r2=1.281
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3568
retrieving revision 1.3569
diff -u -b -r1.3568 -r1.3569
--- ChangeLog 9 Sep 2008 21:32:48 -0000 1.3568
+++ ChangeLog 10 Sep 2008 16:29:19 -0000 1.3569
@@ -1,3 +1,13 @@
+2008-09-10 Derek R. Price <address@hidden>
+
+ * recurse.c (do_recursion): Quote UPDATE_DIR in output. Use new
+ NULL2DOT macro.
+ * root.c: Include "quote.h".
+ (Name_Root): Use dir_append to simplify error messages and improve
+ readability. Add quoting.
+ * update.c: Use NULL2DOT in output.
+ * sanity.sh: Update to compensate.
+
2008-09-09 Derek R. Price <address@hidden>
* client.c (call_in_directory): Simplify drastically. Servers always
Index: recurse.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/recurse.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -b -r1.130 -r1.131
--- recurse.c 28 Jan 2008 05:33:00 -0000 1.130
+++ recurse.c 10 Sep 2008 16:29:19 -0000 1.131
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1986-2008 The Free Software Foundation, Inc.
*
- * Portions Copyright (C) 1998-2007 Derek Price,
+ * Portions Copyright (C) 1998-2008 Derek Price,
* Ximbiot LLC <http://ximbiot.com>,
* and others.
*
@@ -22,11 +22,11 @@
/* Verify interface. */
#include "recurse.h"
-/* GNULIB headers. */
+/* GNULIB */
#include "quote.h"
#include "save-cwd.h"
-/* CVS headers. */
+/* CVS */
#include "edit.h"
#include "find-names.h"
#include "fileattr.h"
@@ -788,7 +788,8 @@
frame->aflag, &entries);
if (filelist == NULL)
{
- error (0, 0, "skipping directory %s", update_dir);
+ error (0, 0, "skipping directory %s",
+ quote (NULL2DOT (update_dir)));
/* Note that Find_Directories and the filesdoneproc
in particular would do bad things ("? foo.c" in
the case of some filesdoneproc's). */
Index: root.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/root.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -b -r1.134 -r1.135
--- root.c 9 Sep 2008 17:44:37 -0000 1.134
+++ root.c 10 Sep 2008 16:29:19 -0000 1.135
@@ -22,10 +22,13 @@
/* Verify interface. */
#include "root.h"
-/* ANSI C headers. */
+/* ANSI C */
#include <assert.h>
-/* CVS headers. */
+/* GNULIB */
+#include "quote.h"
+
+/* CVS */
#include "repos.h"
#include "stack.h"
@@ -86,12 +89,11 @@
if ((len = getline (&root, &root_allocated, fpin)) < 0)
{
- int saved_errno = errno;
+ char *admfile = dir_append (update_dir, CVSADM_ROOT);
/* FIXME: should be checking for end of file separately; errno
- is not set in that case. */
- error (0, 0, "in directory %s:", NULL2DOT (update_dir));
- error (0, saved_errno, "cannot read %s", CVSADM_ROOT);
- error (0, 0, "please correct this problem");
+ * is not set in that case. */
+ error (0, errno, "cannot read %s", quote (admfile));
+ free (admfile);
ret = NULL;
goto out;
}
@@ -108,19 +110,20 @@
ret = parse_cvsroot (root);
if (ret == NULL)
{
- error (0, 0, "in directory %s:", NULL2DOT (update_dir));
- error (0, 0,
- "ignoring %s because it does not contain a valid root.",
- CVSADM_ROOT);
+ char *admfile = dir_append (update_dir, CVSADM_ROOT);
+ error (0, 0, "ignoring %s because it does not contain a valid root.",
+ quote (admfile));
+ free (admfile);
goto out;
}
if (!ret->isremote && !isdir (ret->directory))
{
- error (0, 0, "in directory %s:", NULL2DOT (update_dir));
+ char *admfile = dir_append (update_dir, CVSADM_ROOT);
error (0, 0,
"ignoring %s because it specifies a non-existent repository %s",
- CVSADM_ROOT, root);
+ quote_n (0, admfile), quote_n (1, root));
+ free (admfile);
ret = NULL;
goto out;
}
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1195
retrieving revision 1.1196
diff -u -b -r1.1195 -r1.1196
--- sanity.sh 11 Mar 2008 00:33:11 -0000 1.1195
+++ sanity.sh 10 Sep 2008 16:29:20 -0000 1.1196
@@ -7625,24 +7625,24 @@
# behavior.
modify_repo rm -rf $CVSROOT_DIRNAME/dir1/sdir
- dotest dirs-3 "${testcvs} update" \
-"${SPROG} update: Updating dir1
-${SPROG} update: Updating dir1/sdir
-${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such
file or directory
-${SPROG} update: skipping directory dir1/sdir"
- dotest dirs-3a "${testcvs} update -d" \
-"${SPROG} update: Updating dir1
-${SPROG} update: Updating dir1/sdir
-${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such
file or directory
-${SPROG} update: skipping directory dir1/sdir"
+ dotest dirs-3 "$testcvs update" \
+"$SPROG update: Updating dir1
+$SPROG update: Updating dir1/sdir
+$SPROG update: cannot open directory $CVSROOT_DIRNAME/dir1/sdir: No such file
or directory
+$SPROG update: skipping directory \`dir1/sdir'"
+ dotest dirs-3a "$testcvs update -d" \
+"$SPROG update: Updating dir1
+$SPROG update: Updating dir1/sdir
+$SPROG update: cannot open directory $CVSROOT_DIRNAME/dir1/sdir: No such file
or directory
+$SPROG update: skipping directory \`dir1/sdir'"
# If we say "yes", then CVS gives errors about not being able to
# create lock files.
- # The fact that it says "skipping directory " rather than
- # "skipping directory dir1/sdir" is some kind of bug.
+ # The fact that it says "skipping directory `.'" rather than
+ # "skipping directory `dir1/sdir'" is some kind of bug.
dotest dirs-4 "echo no | ${testcvs} release -d dir1/sdir" \
-"${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such
file or directory
-${SPROG} update: skipping directory
+"$SPROG update: cannot open directory $CVSROOT_DIRNAME/dir1/sdir: No such file
or directory
+$SPROG update: skipping directory \`.'
You have \[0\] altered files in this repository\.
Are you sure you want to release (and delete) directory .dir1/sdir': ..
.release' aborted by user choice."
@@ -25827,12 +25827,12 @@
cd $TESTDIR/1
if $cygwin_hack; then :; else
- dotest modes3-5 "${testcvs} update" \
-"${SPROG} update: Updating \.
-${SPROG} update: Updating first-dir
-${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir:
Permission denied
-${SPROG} update: skipping directory first-dir
-${SPROG} update: Updating second-dir"
+ dotest modes3-5 "$testcvs update" \
+"$SPROG update: Updating \.
+$SPROG update: Updating first-dir
+$SPROG update: cannot open directory $CVSROOT_DIRNAME/first-dir: Permission
denied
+$SPROG update: skipping directory \`first-dir'
+$SPROG update: Updating second-dir"
fi
# OK, I can see why one might say the above case could be a
@@ -25845,18 +25845,18 @@
# passing opendir by accepting the alternate string.
rm -r first-dir
dotest modes3-6 "${testcvs} update -dP" \
-"${SPROG} update: Updating .
-${SPROG} update: Updating CVSROOT
-U ${DOTSTAR}
-${SPROG} update: Updating first-dir
-${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir:
Permission denied
-${SPROG} update: skipping directory first-dir
-${SPROG} update: Updating second-dir" \
-"${SPROG} update: Updating .
-${SPROG} update: Updating CVSROOT
-U ${DOTSTAR}
-${SPROG} update: Updating first-dir
-${SPROG} update: Updating second-dir"
+"$SPROG update: Updating .
+$SPROG update: Updating CVSROOT
+U $DOTSTAR
+$SPROG update: Updating first-dir
+$SPROG update: cannot open directory $CVSROOT_DIRNAME/first-dir: Permission
denied
+$SPROG update: skipping directory \`first-dir'
+$SPROG update: Updating second-dir" \
+"$SPROG update: Updating \.
+$SPROG update: Updating CVSROOT
+U $DOTSTAR
+$SPROG update: Updating first-dir
+$SPROG update: Updating second-dir"
dokeep
cd ..
@@ -30763,34 +30763,34 @@
# that there's not some kind of unexpected dependency on the
# choice of which CVSROOT is specified on the command line.
- dotest multiroot-update-1a "${testcvs1} update" \
-"${SPROG} update: Updating \.
-${SPROG} update: Updating mod1-1
-${SPROG} update: Updating mod1-2
-${SPROG} update: Updating mod1-2/mod2-2
-${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such
file or directory
-${SPROG} update: skipping directory mod1-2/mod2-2
-${SPROG} update: Updating mod2-1
-${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-1: No such
file or directory
-${SPROG} update: skipping directory mod2-1
-${SPROG} update: Updating mod2-2
-${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such
file or directory
-${SPROG} update: skipping directory mod2-2"
+ dotest multiroot-update-1a "$testcvs1 update" \
+"$SPROG update: Updating \.
+$SPROG update: Updating mod1-1
+$SPROG update: Updating mod1-2
+$SPROG update: Updating mod1-2/mod2-2
+$SPROG update: cannot open directory $CVSROOT1_DIRNAME/mod2-2: No such file or
directory
+$SPROG update: skipping directory \`mod1-2/mod2-2'
+$SPROG update: Updating mod2-1
+$SPROG update: cannot open directory $CVSROOT1_DIRNAME/mod2-1: No such file or
directory
+$SPROG update: skipping directory mod2-1
+$SPROG update: Updating mod2-2
+$SPROG update: cannot open directory $CVSROOT1_DIRNAME/mod2-2: No such file or
directory
+$SPROG update: skipping directory \`mod2-2'"
# Same deal but with -d ${CVSROOT2}.
- dotest multiroot-update-1b "${testcvs2} update" \
-"${SPROG} update: Updating \.
-${SPROG} update: Updating mod1-1
-${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-1: No such
file or directory
-${SPROG} update: skipping directory mod1-1
-${SPROG} update: Updating mod1-2
-${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such
file or directory
-${SPROG} update: skipping directory mod1-2
-${SPROG} update: Updating mod2-1
-${SPROG} update: Updating mod2-2
-${SPROG} update: Updating mod2-2/mod1-2
-${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such
file or directory
-${SPROG} update: skipping directory mod2-2/mod1-2"
+ dotest multiroot-update-1b "$testcvs2 update" \
+"$SPROG update: Updating \.
+$SPROG update: Updating mod1-1
+$SPROG update: cannot open directory $CVSROOT2_DIRNAME/mod1-1: No such file or
directory
+$SPROG update: skipping directory \`mod1-1'
+$SPROG update: Updating mod1-2
+$SPROG update: cannot open directory $CVSROOT2_DIRNAME/mod1-2: No such file or
directory
+$SPROG update: skipping directory mod1-2
+$SPROG update: Updating mod2-1
+$SPROG update: Updating mod2-2
+$SPROG update: Updating mod2-2/mod1-2
+$SPROG update: cannot open directory $CVSROOT2_DIRNAME/mod1-2: No such file or
directory
+$SPROG update: skipping directory \`mod2-2/mod1-2'"
# modify all files and do a diff
@@ -32148,19 +32148,16 @@
# (Linux 2.4.20-37.9.legacy), and probably AIX 3.4, Solaris 8,
# BSD/OS 4.2, & IRIX 6.5 only call Name_Root() once as a result of
# this test.
- #
- # Bug: "skipping directory " without filename.
if $remote; then
dotest_fail reposmv-2r "${testcvs} update" \
"Cannot access ${TESTDIR}/root1/CVSROOT
No such file or directory"
else
dotest reposmv-2 "$testcvs update" \
-"$DOTSTAR$CPROG update: in directory \.:
-$CPROG update: ignoring CVS/Root because it specifies a non-existent
repository $TESTDIR/root1
+"$DOTSTAR$CPROG update: ignoring \`CVS/Root' because it specifies a
non-existent repository \`$TESTDIR/root1'
$CPROG update: Updating \.
$DOTSTAR$CPROG update: cannot open directory $CVSROOT_DIRNAME/dir1: No such
file or directory
-$CPROG update: skipping directory "
+$CPROG update: skipping directory \`.'"
fi
# CVS/Root overrides $CVSROOT
@@ -32175,8 +32172,7 @@
CVSROOT_save=$CVSROOT
CVSROOT=$TESTDIR/root-moved; export CVSROOT
dotest reposmv-3 "$testcvs update" \
-"$DOTSTAR$CPROG update: in directory \.:
-$CPROG update: ignoring CVS/Root because it specifies a non-existent
repository $TESTDIR/root1
+"$DOTSTAR$CPROG update: ignoring \`CVS/Root' because it specifies a
non-existent repository \`$TESTDIR/root1'
$CPROG update: Updating \.$DOTSTAR"
CVSROOT=$CVSROOT_save; export CVSROOT
fi
@@ -32194,10 +32190,9 @@
# messages.
CVSROOT_save=${CVSROOT}
CVSROOT=${TESTDIR}/root-none; export CVSROOT
- dotest_fail reposmv-4 "${testcvs} update" \
-"${CPROG} update: in directory \.:
-${CPROG} update: ignoring CVS/Root because it specifies a non-existent
repository ${TESTDIR}/root1
-${CPROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or
directory"
+ dotest_fail reposmv-4 "$testcvs update" \
+"$CPROG update: ignoring \`CVS/Root' because it specifies a non-existent
repository \`$TESTDIR/root1'
+$CPROG \[update aborted\]: $TESTDIR/root-none/CVSROOT: No such file or
directory"
CVSROOT=${CVSROOT_save}; export CVSROOT
fi
Index: update.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/update.c,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -b -r1.280 -r1.281
--- update.c 15 Aug 2008 16:55:11 -0000 1.280
+++ update.c 10 Sep 2008 16:29:20 -0000 1.281
@@ -43,7 +43,7 @@
# include <config.h>
#endif
-/* ANSI C headers. */
+/* ANSI C */
#include <assert.h>
/* GNULIB */
@@ -54,7 +54,7 @@
# include "md5.h"
#endif
-/* CVS headers. */
+/* CVS */
#include "base.h"
#include "buffer.h"
#include "classify.h"
@@ -1016,7 +1016,7 @@
/* print the warm fuzzy message */
if (!quiet)
- error (0, 0, "Updating %s", update_dir);
+ error (0, 0, "Updating %s", NULL2DOT (update_dir));
return R_PROCESS;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog recurse.c root.c sanity.sh u...,
Derek Robert Price <=