summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/find_names.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-01-26 03:09:57 +0000
committerpeter <peter@FreeBSD.org>1998-01-26 03:09:57 +0000
commite6e45661e44f15cb8c5c6f063080509bd910b98d (patch)
treea9812ba7ade0fde6f62c1626b45d522ba104c314 /contrib/cvs/src/find_names.c
parent571cfa0005d94d99d1341bf8ab02be04d4df5f9f (diff)
downloadFreeBSD-src-e6e45661e44f15cb8c5c6f063080509bd910b98d.zip
FreeBSD-src-e6e45661e44f15cb8c5c6f063080509bd910b98d.tar.gz
Import cvs-1.9.23 as at 19980123. There are a number of really nice
things fixed in here, including the '-ko' vs. -A problem with remote cvs which caused all files with -ko to be resent each time (which is damn painful over a modem, I can tell you). It also found a heap of stray empty directories that should have been pruned with the -P flag to cvs update but were not for some reason. It also has the fully integrated rcs and diff, so no more fork/exec overheads for rcs,ci,patch,diff,etc. This means that it parses the control data in the rcs files only once rather than twice or more. If the 'cvs diff' vs. Index thing is going to be fixed for future patch compatability, this is the place to do it.
Diffstat (limited to 'contrib/cvs/src/find_names.c')
-rw-r--r--contrib/cvs/src/find_names.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/contrib/cvs/src/find_names.c b/contrib/cvs/src/find_names.c
index 5d2a79e..ed6c5c4 100644
--- a/contrib/cvs/src/find_names.c
+++ b/contrib/cvs/src/find_names.c
@@ -3,7 +3,7 @@
* Copyright (c) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
- * specified in the README file that comes with the CVS 1.4 kit.
+ * specified in the README file that comes with the CVS source distribution.
*
* Find Names
*
@@ -200,6 +200,15 @@ Find_Directories (repository, which, entries)
information is not recorded in the Entries file. Find
the subdirectories the hard way, and, if possible, add
it to the Entries file for next time. */
+
+ /* FIXME-maybe: find_dirs is bogus for this usage because
+ it skips CVSATTIC and CVSLCK directories--those names
+ should be special only in the repository. However, in
+ the interests of not perturbing this code, we probably
+ should leave well enough alone unless we want to write
+ a sanity.sh test case (which would operate by manually
+ hacking on the CVS/Entries file). */
+
if (find_dirs (".", dirlist, 1, tmpentries) != 0)
error (1, errno, "cannot open current directory");
if (tmpentries != NULL)
@@ -292,6 +301,16 @@ find_dirs (dir, list, checkadm, entries)
size_t tmp_size = 0;
struct dirent *dp;
DIR *dirp;
+ int skip_emptydir = 0;
+
+ /* First figure out whether we need to skip directories named
+ Emptydir. Except in the CVSNULLREPOS case, Emptydir is just
+ a normal directory name. */
+ if (isabsolute (dir)
+ && strncmp (dir, CVSroot_directory, strlen (CVSroot_directory)) == 0
+ && ISDIRSEP (dir[strlen (CVSroot_directory)])
+ && strcmp (dir + strlen (CVSroot_directory) + 1, CVSROOTADM) == 0)
+ skip_emptydir = 1;
/* set up to read the dir */
if ((dirp = CVS_OPENDIR (dir)) == NULL)
@@ -313,6 +332,10 @@ find_dirs (dir, list, checkadm, entries)
if (entries != NULL && findnode (entries, dp->d_name) != NULL)
continue;
+ if (skip_emptydir
+ && strcmp (dp->d_name, CVSNULLREPOS) == 0)
+ continue;
+
#ifdef DT_DIR
if (dp->d_type != DT_DIR)
{
OpenPOWER on IntegriCloud