diff options
author | peter <peter@FreeBSD.org> | 2004-06-10 19:05:38 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-06-10 19:05:38 +0000 |
commit | 8416bda1d23bda4666a5b880a9d78eccaa640036 (patch) | |
tree | 7d97944b58f1e30ab542f9c3d6720b69314cec4d /contrib/cvs/src/update.c | |
parent | 3d101ef985844544d089e129157a94a0640fd246 (diff) | |
download | FreeBSD-src-8416bda1d23bda4666a5b880a9d78eccaa640036.zip FreeBSD-src-8416bda1d23bda4666a5b880a9d78eccaa640036.tar.gz |
Import cvs-1.11.17 onto vendor branch.
Diffstat (limited to 'contrib/cvs/src/update.c')
-rw-r--r-- | contrib/cvs/src/update.c | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/contrib/cvs/src/update.c b/contrib/cvs/src/update.c index e245e7b..62a6c63 100644 --- a/contrib/cvs/src/update.c +++ b/contrib/cvs/src/update.c @@ -420,9 +420,11 @@ update (argc, argv) if (date != NULL) free (date); - return (err); + return err; } + + /* * Command line interface to update (used by checkout) */ @@ -496,7 +498,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, argc, argv, local, which, aflag, CVS_LOCK_READ, preload_update_dir, 1, (char *) NULL); if (err) - return (err); + return err; /* FIXME-twp: at this point we should walk the hardlist and update the `links' field of each hardlink_info struct @@ -523,7 +525,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, sleep_past (last_register_time); } - return (err); + return err; } #ifdef PRESERVE_PERMISSIONS_SUPPORT @@ -856,7 +858,7 @@ update_filesdone_proc (callerdat, err, repository, update_dir, entries) Create_Root ((char *) NULL, current_parsed_root->original); } - return (err); + return err; } @@ -889,7 +891,7 @@ update_dirent_proc (callerdat, dir, repository, update_dir, entries) { /* if we aren't building dirs, blow it off */ if (!update_build_dirs) - return (R_SKIP_ALL); + return R_SKIP_ALL; /* Various CVS administrators are in the habit of removing the repository directory for things they don't want any @@ -917,7 +919,7 @@ update_dirent_proc (callerdat, dir, repository, update_dir, entries) { /* ignore the missing dir if -n is specified */ error (0, 0, "New directory `%s' -- ignored", update_dir); - return (R_SKIP_ALL); + return R_SKIP_ALL; } else { @@ -1015,7 +1017,7 @@ update_dirent_proc (callerdat, dir, repository, update_dir, entries) if (!quiet) error (0, 0, "Updating %s", update_dir); - return (R_PROCESS); + return R_PROCESS; } @@ -1075,9 +1077,11 @@ update_dirleave_proc (callerdat, dir, err, update_dir, entries) } } - return (err); + return err; } + + static int isremoved PROTO ((Node *, void *)); /* Returns 1 if the file indicated by node has been removed. */ @@ -1093,6 +1097,8 @@ isremoved (node, closure) return (entdata->version && entdata->version[0] == '-') ? 1 : 0; } + + /* Returns 1 if the argument directory is completely empty, other than the existence of the CVS directory entry. Zero otherwise. If MIGHT_NOT_EXIST and the directory doesn't exist, then just return 0. */ @@ -1109,7 +1115,7 @@ isemptydir (dir, might_not_exist) if (might_not_exist && existence_error (errno)) return 0; error (0, errno, "cannot open directory %s for empty check", dir); - return (0); + return 0; } errno = 0; while ((dp = CVS_READDIR (dirp)) != NULL) @@ -1122,7 +1128,7 @@ isemptydir (dir, might_not_exist) /* An entry other than the CVS directory. The directory is certainly not empty. */ (void) CVS_CLOSEDIR (dirp); - return (0); + return 0; } else { @@ -1153,7 +1159,7 @@ isemptydir (dir, might_not_exist) /* There are files that have been removed, but not committed! Do not consider the directory empty. */ (void) CVS_CLOSEDIR (dirp); - return (0); + return 0; } } } @@ -1163,12 +1169,14 @@ isemptydir (dir, might_not_exist) { error (0, errno, "cannot read directory %s", dir); (void) CVS_CLOSEDIR (dirp); - return (0); + return 0; } (void) CVS_CLOSEDIR (dirp); - return (1); + return 1; } + + /* * scratch the Entries file entry associated with a file */ @@ -1213,9 +1221,11 @@ scratch_file (finfo, vers) vers->ts_user = NULL; } } - return (0); + return 0; } + + /* * Check out a file. */ @@ -1503,9 +1513,11 @@ VERS: ", 0); if (revbuf != NULL) buf_free (revbuf); - return (retval); + return retval; } + + #ifdef SERVER_SUPPORT /* This function is used to write data from a file being checked out @@ -1847,9 +1859,11 @@ patch_file (finfo, vers_ts, docheckout, file_info, checksum) free (backup); free (file1); free (file2); - return (retval); + return retval; } + + /* Write data to a file. Record whether the last byte written was a newline. Optionally compute a checksum. This is called by patch_file via RCS_checkout. */ @@ -2989,8 +3003,10 @@ special_file_mismatch (finfo, rev1, rev2) #endif } + + int joining () { - return (join_rev1 != NULL); + return join_rev1 != NULL; } |