[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog find-names.h find_names.c re...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog find-names.h find_names.c re... |
Date: |
Sat, 20 Sep 2008 00:03:16 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/09/20 00:03:15
Modified files:
src : ChangeLog find-names.h find_names.c recurse.c
sanity.sh
Log message:
* find_names.c (Find_Names, Find_Directories): Assume entries will be
set by caller.
* find-names.h (Find_Names): Update prototype.
* recurse.c (do_recursion): Always open entries when available.
* sanity.sh (errmsg2-16): Update to compensate.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3606&r2=1.3607
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/find-names.h?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/find_names.c?cvsroot=cvs&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/recurse.c?cvsroot=cvs&r1=1.132&r2=1.133
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1208&r2=1.1209
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3606
retrieving revision 1.3607
diff -u -b -r1.3606 -r1.3607
--- ChangeLog 19 Sep 2008 17:31:44 -0000 1.3606
+++ ChangeLog 20 Sep 2008 00:03:13 -0000 1.3607
@@ -1,5 +1,11 @@
2008-09-19 Derek R. Price <address@hidden>
+ * find_names.c (Find_Names, Find_Directories): Assume entries will be
+ set by caller.
+ * find-names.h (Find_Names): Update prototype.
+ * recurse.c (do_recursion): Always open entries when available.
+ * sanity.sh (errmsg2-16): Update to compensate.
+
* logmsg.c (do_verify): Some cleanup.
* commit.c (commit): Don't set update_dir for client/server calls to
Index: find-names.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/find-names.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- find-names.h 12 Sep 2007 02:47:15 -0000 1.1
+++ find-names.h 20 Sep 2008 00:03:13 -0000 1.2
@@ -25,6 +25,6 @@
List *Find_Directories (const char *repository, const char *update_dir,
int which, List *entries);
List *Find_Names (const char *repository, const char *update_dir,
- int which, int aflag, List **optentries);
+ int which, int aflag, List *entries);
#endif /* !defined FIND_NAMES_H */
Index: find_names.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/find_names.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- find_names.c 18 Sep 2008 17:43:57 -0000 1.53
+++ find_names.c 20 Sep 2008 00:03:14 -0000 1.54
@@ -121,9 +121,8 @@
*/
List *
Find_Names (const char *repository, const char *update_dir,
- int which, int aflag, List **optentries)
+ int which, int aflag, List *entries)
{
- List *entries;
List *files;
TRACE (TRACE_FUNCTION, "Find_Names (%s, %s, %d, %d)",
@@ -134,26 +133,13 @@
/* look at entries (if necessary) */
if (which & W_LOCAL)
- {
- /* parse the entries file (if it exists) */
- entries = Entries_Open (aflag, update_dir);
- if (entries)
- {
/* walk the entries file adding elements to the files list */
walklist (entries, add_entries_proc, files);
- /* if our caller wanted the entries list, return it; else free it */
- if (optentries)
- *optentries = entries;
- else
- Entries_Close (entries, update_dir);
- }
- }
-
- if ((which & W_REPOS) && repository && !isreadable (CVSADM_ENTSTAT))
+ if (which & W_REPOS && repository && !isreadable (CVSADM_ENTSTAT))
{
/* search the repository */
- if (find_rcs (repository, files) != 0)
+ if (find_rcs (repository, files))
{
error (0, errno, "cannot open directory %s",
primary_root_inverse_translate (repository));
@@ -351,27 +337,16 @@
repository, update_dir, which);
/* make a list for the directories */
- dirlist = getlist ();
+ dirlist = getlist();
/* find the local ones */
if (which & W_LOCAL)
{
- List *tmpentries;
-
- /* Look through the Entries file. */
-
- if (entries)
- tmpentries = entries;
- else if (isfile (CVSADM_ENT))
- tmpentries = Entries_Open (0, update_dir);
- else
- tmpentries = NULL;
-
/* If we do have an entries list, then if sdtp is NULL, or if
sdtp->subdirs is nonzero, all subdirectory information is
recorded in the entries list. */
- if (tmpentries && entriesHasAllSubdirs (tmpentries))
- walklist (tmpentries, add_subdir_proc, dirlist);
+ if (entries && entriesHasAllSubdirs (entries))
+ walklist (entries, add_subdir_proc, dirlist);
else
{
/* This is an old working directory, in which subdirectory
@@ -388,26 +363,23 @@
* FIXME: The user should really see a warning about the skipped
* directories, however.
*/
- if (find_dirs (".", dirlist, 1, tmpentries))
+ if (find_dirs (".", dirlist, 1, entries))
error (1, errno, "cannot open %s", quote (update_dir));
- if (tmpentries)
+ if (entries)
{
if (!list_isempty (dirlist))
- walklist (dirlist, register_subdir_proc, tmpentries);
+ walklist (dirlist, register_subdir_proc, entries);
else
- Subdirs_Known (tmpentries);
+ Subdirs_Known (entries);
}
}
-
- if (!entries && tmpentries)
- Entries_Close (tmpentries, update_dir);
}
/* look for sub-dirs in the repository */
if (which & W_REPOS && repository)
{
/* search the repository */
- if (find_dirs (repository, dirlist, 0, entries) != 0)
+ if (find_dirs (repository, dirlist, 0, entries))
error (1, errno, "cannot open directory %s", repository);
/* We don't need to look in the attic because directories
Index: recurse.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/recurse.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -b -r1.132 -r1.133
--- recurse.c 10 Sep 2008 17:14:05 -0000 1.132
+++ recurse.c 20 Sep 2008 00:03:14 -0000 1.133
@@ -752,6 +752,10 @@
if (dirlist != NULL && filelist == NULL)
dodoneproc = 0;
+ /* Pre-process the entries when available. */
+ if (frame->which & W_LOCAL && hasAdmin ("."))
+ entries = Entries_Open (frame->aflag, update_dir);
+
/*
* If filelist or dirlist is already set, we don't look again. Otherwise,
* find the files and directories
@@ -785,7 +789,7 @@
if (process_this_directory)
{
filelist = Find_Names (repository, update_dir, lwhich,
- frame->aflag, &entries);
+ frame->aflag, entries);
if (filelist == NULL)
{
error (0, 0, "skipping directory %s",
@@ -804,16 +808,6 @@
process_this_directory ? repository : NULL,
update_dir, frame->which, entries);
}
- else
- {
- /* something was passed on the command line */
- if (filelist != NULL && frame->fileproc != NULL)
- {
- /* we will process files, so pre-parse entries */
- if (frame->which & W_LOCAL)
- entries = Entries_Open (frame->aflag, update_dir);
- }
- }
/* process the files (if any) */
if (process_this_directory && filelist != NULL && frame->fileproc)
@@ -889,11 +883,7 @@
#endif
dellist (&dirlist);
- if (entries)
- {
Entries_Close (entries, update_dir);
- entries = NULL;
- }
/* free the saved copy of the pointer if necessary */
if (srepository)
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1208
retrieving revision 1.1209
diff -u -b -r1.1208 -r1.1209
--- sanity.sh 19 Sep 2008 17:25:44 -0000 1.1208
+++ sanity.sh 20 Sep 2008 00:03:14 -0000 1.1209
@@ -17426,8 +17426,7 @@
dotest_fail errmsg2-16 "$testcvs add bogus-dir/file16" \
"$SPROG add: in directory \`bogus-dir':
$SPROG \[add aborted\]: there is no version here; do \`$SPROG checkout' first"
\
-"$CPROG add: cannot open \`bogus-dir/CVS/Entries' for reading: No such file or
directory
-$CPROG \[add aborted\]: no repository"
+"$CPROG \[add aborted\]: no repository"
rm -r bogus-dir
# One error condition we don't test for is trying to add a file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog find-names.h find_names.c re...,
Derek Robert Price <=