diff options
| author | christos <christos@NetBSD.org> | 2000-09-04 22:12:05 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2000-09-04 22:12:05 +0000 |
| commit | 1aedcfb5d35f4c455714f8be7cc6a1055bfb58cd (patch) | |
| tree | cb4203d99d49e7df886bba16dbd5d1177f10097a /gnu | |
| parent | d30d584a9145d43c1e61e7e8a36854dbcee630e4 (diff) | |
Apply patches from the cvs-current package.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/cvs/doc/cvs.texinfo | 12 | ||||
| -rw-r--r-- | gnu/dist/cvs/man/cvs.1 | 10 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/checkout.c | 2 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/client.c | 10 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/commit.c | 4 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/cvs.h | 1 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/history.c | 2 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/lock.c | 4 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/logmsg.c | 9 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/main.c | 8 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/rcs.c | 7 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/recurse.c | 4 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/server.c | 5 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/tag.c | 2 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/update.c | 9 |
15 files changed, 64 insertions, 25 deletions
diff --git a/gnu/dist/cvs/doc/cvs.texinfo b/gnu/dist/cvs/doc/cvs.texinfo index 3768fe91742..aec88aa7c83 100644 --- a/gnu/dist/cvs/doc/cvs.texinfo +++ b/gnu/dist/cvs/doc/cvs.texinfo @@ -40,6 +40,10 @@ @setfilename cvs.info @include CVSvn.texi @settitle CVS---Concurrent Versions System +@dircategory Programming & development tools +@direntry +* CVS: (cvs) CVS Reference Manual. +@end direntry @setchapternewpage odd @c -- TODO list: @@ -48,14 +52,6 @@ @c problems (as opposed to FIXCVS for CVS problems). @ifinfo -@format -START-INFO-DIR-ENTRY -* CVS: (cvs). Concurrent Versions System -END-INFO-DIR-ENTRY -@end format -@end ifinfo - -@ifinfo Copyright @copyright{} 1992, 1993 Signum Support AB Copyright @copyright{} 1993, 1994 Free Software Foundation, Inc. diff --git a/gnu/dist/cvs/man/cvs.1 b/gnu/dist/cvs/man/cvs.1 index 050703274e2..97244e6b343 100644 --- a/gnu/dist/cvs/man/cvs.1 +++ b/gnu/dist/cvs/man/cvs.1 @@ -358,11 +358,11 @@ file; see Incorporate a set of updates from off-site into the source repository, as a ``vendor branch''. (Changes repository.) .TP -+.B init -+Initialize a repository by adding the CVSROOT subdirectory and some default -+control files. You must use this command or initialize the repository in -+some other way before you can use it. -+.TP +.B init +Initialize a repository by adding the CVSROOT subdirectory and some default +control files. You must use this command or initialize the repository in +some other way before you can use it. +.TP .B log Display log information. diff --git a/gnu/dist/cvs/src/checkout.c b/gnu/dist/cvs/src/checkout.c index ffd5b9d0ca9..80697490795 100644 --- a/gnu/dist/cvs/src/checkout.c +++ b/gnu/dist/cvs/src/checkout.c @@ -180,7 +180,7 @@ checkout (argc, argv) case 'p': pipeout = 1; run_module_prog = 0; /* don't run module prog when piping */ - noexec = 1; /* so no locks will be created */ + noexec = nolock = 1; /* so no locks will be created */ break; case 'c': cat = 1; diff --git a/gnu/dist/cvs/src/client.c b/gnu/dist/cvs/src/client.c index 19c04c4c48c..9ee734783e9 100644 --- a/gnu/dist/cvs/src/client.c +++ b/gnu/dist/cvs/src/client.c @@ -4419,6 +4419,16 @@ the :server: access method is not supported by this port of CVS"); error (1, 0, "This server does not support the global -n option."); } + if (nolock && !noexec) + { + if (have_global) + { + send_to_server ("Global_option -u\012", 0); + } + else + error (1, 0, + "This server does not support the global -u option."); + } if (quiet) { if (have_global) diff --git a/gnu/dist/cvs/src/commit.c b/gnu/dist/cvs/src/commit.c index d9a7d604b20..862171b49d8 100644 --- a/gnu/dist/cvs/src/commit.c +++ b/gnu/dist/cvs/src/commit.c @@ -1005,7 +1005,9 @@ warning: file `%s' seems to still contain conflict indicators", xmalloc (sizeof (struct logfile_info))); li->type = status; li->tag = xstrdup (vers->tag); - li->rev_old = xstrdup (vers->vn_rcs); + /* If the file was re-added, we want the revision in the commitlog + to be NONE, not the previous dead revision. */ + li->rev_old = status == T_ADDED ? NULL : xstrdup (vers->vn_rcs); li->rev_new = NULL; p->data = (char *) li; (void) addnode (ulist, p); diff --git a/gnu/dist/cvs/src/cvs.h b/gnu/dist/cvs/src/cvs.h index 7fb3abda510..cdb570829a6 100644 --- a/gnu/dist/cvs/src/cvs.h +++ b/gnu/dist/cvs/src/cvs.h @@ -393,6 +393,7 @@ extern char *emptydir_name PROTO ((void)); extern int trace; /* Show all commands */ extern int noexec; /* Don't modify disk anywhere */ +extern int nolock; /* Don't create locks */ extern int logoff; /* Don't write history entry */ extern int top_level_admin; diff --git a/gnu/dist/cvs/src/history.c b/gnu/dist/cvs/src/history.c index 8cd31d5bdec..9871935b66b 100644 --- a/gnu/dist/cvs/src/history.c +++ b/gnu/dist/cvs/src/history.c @@ -726,7 +726,7 @@ history_write (type, update_dir, revs, name, repository) if (trace) fprintf (stderr, "%s-> fopen(%s,a)\n", CLIENT_SERVER_STR, fname); - if (noexec) + if (nolock) goto out; fd = CVS_OPEN (fname, O_WRONLY | O_APPEND | O_CREAT | OPEN_BINARY, 0666); if (fd < 0) diff --git a/gnu/dist/cvs/src/lock.c b/gnu/dist/cvs/src/lock.c index ef27d114ba1..a0284f91367 100644 --- a/gnu/dist/cvs/src/lock.c +++ b/gnu/dist/cvs/src/lock.c @@ -395,7 +395,7 @@ Reader_Lock (xrepository) FILE *fp; char *tmp; - if (noexec) + if (nolock) return (0); /* we only do one directory at a time for read locks! */ @@ -467,7 +467,7 @@ Writer_Lock (list) { char *wait_repos; - if (noexec) + if (nolock) return (0); /* We only know how to do one list at a time */ diff --git a/gnu/dist/cvs/src/logmsg.c b/gnu/dist/cvs/src/logmsg.c index 50ced198ba9..52ea9bc512a 100644 --- a/gnu/dist/cvs/src/logmsg.c +++ b/gnu/dist/cvs/src/logmsg.c @@ -589,6 +589,15 @@ title_proc (p, closure) strlen (str_list) + strlen (p->key) + 5); (void) strcat (str_list, p->key); break; + case 't': + str_list = + xrealloc (str_list, + (strlen (str_list) + + (li->tag ? strlen (li->tag) : 0) + + 10) + ); + (void) strcat (str_list, (li->tag ? li->tag : "")); + break; case 'V': str_list = xrealloc (str_list, diff --git a/gnu/dist/cvs/src/main.c b/gnu/dist/cvs/src/main.c index ba6b1cae4ef..de563c725e0 100644 --- a/gnu/dist/cvs/src/main.c +++ b/gnu/dist/cvs/src/main.c @@ -41,6 +41,7 @@ int really_quiet = 0; int quiet = 0; int trace = 0; int noexec = 0; +int nolock = 0; int logoff = 0; /* Set if we should be writing CVSADM directories at top level. At @@ -229,6 +230,7 @@ static const char *const opt_usage[] = " -w Make checked-out files read-write (default).\n", " -l Turn history logging off.\n", " -n Do not execute anything that will change the disk.\n", + " -u Don't create locks (implies -l).\n", " -t Show trace of program execution -- try with -n.\n", " -v CVS version and copyright.\n", " -T tmpdir Use 'tmpdir' for temporary files.\n", @@ -509,7 +511,7 @@ main (argc, argv) opterr = 1; while ((c = getopt_long - (argc, argv, "+Qqrwtnlvb:T:e:d:Hfz:s:xa", long_options, &option_index)) + (argc, argv, "+Qqrwtnulvb:T:e:d:Hfz:s:xa", long_options, &option_index)) != EOF) { switch (c) @@ -547,6 +549,8 @@ main (argc, argv) break; case 'n': noexec = 1; + case 'u': /* Fall through */ + nolock = 1; case 'l': /* Fall through */ logoff = 1; break; @@ -926,7 +930,7 @@ Copyright (c) 1989-1998 Brian Berliner, david d `zoo' zuhn, \n\ * BUT, only if the history file exists. */ - if (!client_active) + if (!client_active && !nolock) { char *path; int save_errno; diff --git a/gnu/dist/cvs/src/rcs.c b/gnu/dist/cvs/src/rcs.c index 3af905b0c66..cade77643ff 100644 --- a/gnu/dist/cvs/src/rcs.c +++ b/gnu/dist/cvs/src/rcs.c @@ -3720,6 +3720,9 @@ static const struct rcs_keyword keywords[] = { KEYWORD_INIT ("Revision") }, { KEYWORD_INIT ("Source") }, { KEYWORD_INIT ("State") }, +#ifdef LOCALID + { KEYWORD_INIT (LOCALID) }, +#endif { NULL, 0 } }; enum keyword @@ -3734,7 +3737,8 @@ enum keyword KEYWORD_RCSFILE, KEYWORD_REVISION, KEYWORD_SOURCE, - KEYWORD_STATE + KEYWORD_STATE, + KEYWORD_LOCALID }; /* Convert an RCS date string into a readable string. This is like @@ -3962,6 +3966,7 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) case KEYWORD_HEADER: case KEYWORD_ID: + case KEYWORD_LOCALID: { char *path; int free_path; diff --git a/gnu/dist/cvs/src/recurse.c b/gnu/dist/cvs/src/recurse.c index ca43bf995b0..b14e91681fc 100644 --- a/gnu/dist/cvs/src/recurse.c +++ b/gnu/dist/cvs/src/recurse.c @@ -507,7 +507,7 @@ do_recursion (frame) if (frame->flags == R_SKIP_ALL) return (0); - should_readlock = noexec ? 0 : frame->readlock; + should_readlock = nolock ? 0 : frame->readlock; /* The fact that locks are not active here is what makes us fail to have the @@ -549,7 +549,7 @@ do_recursion (frame) */ if (server_active /* If there are writelocks around, we cannot pause here. */ - && (should_readlock || noexec)) + && (should_readlock || nolock)) server_pause_check(); #endif diff --git a/gnu/dist/cvs/src/server.c b/gnu/dist/cvs/src/server.c index 1d1fe11b92f..27b9dc63b20 100644 --- a/gnu/dist/cvs/src/server.c +++ b/gnu/dist/cvs/src/server.c @@ -794,6 +794,8 @@ E Protocol error: Root says \"%s\" but pserver says \"%s\"", nothing. But for rsh, we need to do it now. */ parse_config (CVSroot_directory); + if (!nolock) + { path = malloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + sizeof (CVSROOTADM_HISTORY) @@ -824,6 +826,7 @@ Sorry, you don't have read/write access to the history file %s", path); pending_error = save_errno; } free (path); + } #ifdef HAVE_PUTENV env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1); @@ -2154,6 +2157,8 @@ serve_global_option (arg) { case 'n': noexec = 1; + case 'u': + nolock = 1; break; case 'q': quiet = 1; diff --git a/gnu/dist/cvs/src/tag.c b/gnu/dist/cvs/src/tag.c index fb19cbae78a..9843f99d05d 100644 --- a/gnu/dist/cvs/src/tag.c +++ b/gnu/dist/cvs/src/tag.c @@ -856,7 +856,7 @@ Numeric tag %s contains characters other than digits and '.'", name); /* The tags is valid but not mentioned in val-tags. Add it. */ datum value; - if (noexec) + if (nolock) { if (db != NULL) dbm_close (db); diff --git a/gnu/dist/cvs/src/update.c b/gnu/dist/cvs/src/update.c index 61d84d43737..4fdddd1f4ad 100644 --- a/gnu/dist/cvs/src/update.c +++ b/gnu/dist/cvs/src/update.c @@ -1366,11 +1366,18 @@ VERS: ", 0); xchmod (finfo->file, 1); else { + mode_t oumask, writeaccess; + /* We know that we are the server here, so although xchmod checks umask, we don't bother. */ - mode |= (((mode & S_IRUSR) ? S_IWUSR : 0) + /* Not bothering with the umask makes the files + mode 0777 on old clients, though. -chb */ + oumask = umask(0); + (void) umask(oumask); + writeaccess = (((mode & S_IRUSR) ? S_IWUSR : 0) | ((mode & S_IRGRP) ? S_IWGRP : 0) | ((mode & S_IROTH) ? S_IWOTH : 0)); + mode |= (~oumask) & writeaccess; } } |
