diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /gnu/usr.bin/cvs | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) | |
download | src-releng/1.tar.gz src-releng/1.zip |
Release FreeBSD 1.1.5.1release/1.1.5.1_cvsreleng/1
This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'gnu/usr.bin/cvs')
-rw-r--r-- | gnu/usr.bin/cvs/cvs/Makefile | 11 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/checkin.c | 7 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/checkout.c | 16 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/cvs.h | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/diff.c | 26 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/ignore.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/import.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/main.c | 16 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/patch.c | 24 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/release.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/update.c | 27 |
11 files changed, 130 insertions, 15 deletions
diff --git a/gnu/usr.bin/cvs/cvs/Makefile b/gnu/usr.bin/cvs/cvs/Makefile index be35c2f95f62..6af8b8132594 100644 --- a/gnu/usr.bin/cvs/cvs/Makefile +++ b/gnu/usr.bin/cvs/cvs/Makefile @@ -1,4 +1,9 @@ +.if !defined(FREEBSD_DEVELOPER) PROG = cvs +.else +PROG = ncvs +.endif + CFLAGS += -I${.CURDIR}/../lib \ -DDIRENT -DSTDC_HEADERS -DPOSIX -DBROKEN_SIGISMEMBER \ -DFTIME_MISSING -DHAVE_TIMEZONE -DUTIME_NULL_MISSING @@ -9,6 +14,12 @@ LDADD= -L${.CURDIR}/../lib/obj -lcvs LDADD= -L${.CURDIR}/../lib/ -lcvs .endif +.if defined(FREEBSD_DEVELOPER) +CFLAGS+= -DFREEBSD_DEVELOPER +BINGRP= ncvs +#BINMODE=2555 +.endif + SRCS = add.c admin.c checkin.c checkout.c classify.c commit.c \ create_adm.c diff.c entries.c find_names.c history.c ignore.c \ import.c lock.c log.c logmsg.c main.c rcs.c modules.c \ diff --git a/gnu/usr.bin/cvs/cvs/checkin.c b/gnu/usr.bin/cvs/cvs/checkin.c index 14f7c055e2ae..44b733e970bc 100644 --- a/gnu/usr.bin/cvs/cvs/checkin.c +++ b/gnu/usr.bin/cvs/cvs/checkin.c @@ -65,8 +65,15 @@ Checkin (type, file, repository, rcs, rev, tag, message, entries) */ /* XXX - make sure -k options are used on the co; and tag/date? */ +#ifdef FREEBSD_DEVELOPER + run_setup ("%s%s -q %s%s %s", Rcsbin, RCS_CO, + rev ? "-r" : "", rev ? rev : "", + freebsd ? "-KeAuthor,Date,Header,Id,Locker,Log," + "RCSfile,Revision,Source,State -KiFreeBSD" : ""); +#else run_setup ("%s%s -q %s%s", Rcsbin, RCS_CO, rev ? "-r" : "", rev ? rev : ""); +#endif /* FREEBSD_DEVELOPER */ run_arg (rcs); (void) run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); xchmod (file, 1); diff --git a/gnu/usr.bin/cvs/cvs/checkout.c b/gnu/usr.bin/cvs/cvs/checkout.c index ad5a5b8115af..e7bc60818787 100644 --- a/gnu/usr.bin/cvs/cvs/checkout.c +++ b/gnu/usr.bin/cvs/cvs/checkout.c @@ -70,6 +70,7 @@ static char *checkout_usage[] = "\t-r rev\tCheck out revision or tag. (implies -P)\n", "\t-D date\tCheck out revisions as of date. (implies -P)\n", "\t-d dir\tCheck out into dir instead of module name.\n", + "\t-K key\tUse RCS key -K option on checkout.\n", "\t-k kopt\tUse RCS kopt -k option on checkout.\n", "\t-j rev\tMerge in changes made between current revision and rev.\n", NULL @@ -100,6 +101,7 @@ static char *date = NULL; static char *join_rev1 = NULL; static char *join_rev2 = NULL; static char *preload_update_dir = NULL; +static char *K_flag = NULL; int checkout (argc, argv) @@ -129,7 +131,7 @@ checkout (argc, argv) } else { - valid_options = "ANnk:d:flRpQqcsr:D:j:P"; + valid_options = "ANnk:d:flRpQqcsr:D:j:PK:"; valid_usage = checkout_usage; } @@ -207,6 +209,9 @@ checkout (argc, argv) else join_rev1 = optarg; break; + case 'K': + K_flag = optarg; + break; case '?': default: usage (valid_usage); @@ -216,6 +221,12 @@ checkout (argc, argv) argc -= optind; argv += optind; +#ifdef FREEBSD_DEVELOPER + if (!K_flag && freebsd) { + /* XXX Note: The leading -K is not needed, it gets added later! */ + K_flag = "eAuthor,Date,Header,Id,Locker,Log,RCSfile,Revision,Source,State -KiFreeBSD"; + } +#endif /* FREEBSD_DEVELOPER */ if (shorten == -1) shorten = 0; @@ -597,6 +608,7 @@ checkout_proc (pargc, argv, where, mwhere, mfile, shorten, force_tag_match, 0 /* !local */ , 1 /* update -d */ , aflag, checkout_prune_dirs, pipeout, which, join_rev1, join_rev2, + K_flag, preload_update_dir); free (preload_update_dir); preload_update_dir = oldupdate; @@ -639,7 +651,7 @@ checkout_proc (pargc, argv, where, mwhere, mfile, shorten, err += do_update (*pargc - 1, argv + 1, options, tag, date, force_tag_match, local_specified, 1 /* update -d */, aflag, checkout_prune_dirs, pipeout, which, join_rev1, - join_rev2, preload_update_dir); + join_rev2, K_flag, preload_update_dir); free (preload_update_dir); preload_update_dir = oldupdate; return (err); diff --git a/gnu/usr.bin/cvs/cvs/cvs.h b/gnu/usr.bin/cvs/cvs/cvs.h index ec47581143de..3e1f8f457782 100644 --- a/gnu/usr.bin/cvs/cvs/cvs.h +++ b/gnu/usr.bin/cvs/cvs/cvs.h @@ -257,6 +257,9 @@ extern int cvswrite; extern int trace; /* Show all commands */ extern int noexec; /* Don't modify disk anywhere */ extern int logoff; /* Don't write history entry */ +#ifdef FREEBSD_DEVELOPER +extern int freebsd; /* Assume option defaults for FreBSD */ +#endif /* FREEBSD_DEVELOPER */ /* Externs that are included directly in the CVS sources */ #if __STDC__ @@ -348,7 +351,8 @@ int do_recursion (int (*xfileproc) (), int (*xfilesdoneproc) (), int do_update (int argc, char *argv[], char *xoptions, char *xtag, char *xdate, int xforce, int local, int xbuild, int xaflag, int xprune, int xpipeout, int which, - char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir); + char *xjoin_rev1, char *xjoin_rev2, + char *xK_flag, char *preload_update_dir); void history_write (int type, char *update_dir, char *revs, char *name, char *repository); int start_recursion (int (*fileproc) (), int (*filesdoneproc) (), diff --git a/gnu/usr.bin/cvs/cvs/diff.c b/gnu/usr.bin/cvs/cvs/diff.c index db8b4b746e8d..003c2e3c602a 100644 --- a/gnu/usr.bin/cvs/cvs/diff.c +++ b/gnu/usr.bin/cvs/cvs/diff.c @@ -22,6 +22,7 @@ static char rcsid[] = "@(#)diff.c 1.52 92/04/10"; #if __STDC__ static Dtype diff_dirproc (char *dir, char *pos_repos, char *update_dir); +static int diff_filesdoneproc (int err, char *repos, char *update_dir); static int diff_dirleaveproc (char *dir, int err, char *update_dir); static int diff_file_nodiff (char *file, char *repository, List *entries, List *srcfiles, Vers_TS *vers); @@ -31,6 +32,7 @@ static void diff_mark_errors (int err); #else static int diff_fileproc (); static Dtype diff_dirproc (); +static int diff_filesdoneproc (); static int diff_dirleaveproc (); static int diff_file_nodiff (); static void diff_mark_errors (); @@ -151,7 +153,7 @@ diff (argc, argv) options = xstrdup (""); /* start the recursion processor */ - err = start_recursion (diff_fileproc, (int (*) ()) NULL, diff_dirproc, + err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, diff_dirleaveproc, argc, argv, local, W_LOCAL, 0, 1, (char *) NULL, 1); @@ -226,7 +228,14 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) return (0); } + /* Output an "Index:" line for patch to use */ (void) fflush (stdout); + if (update_dir[0]) + (void) printf ("Index: %s/%s\n", update_dir, file); + else + (void) printf ("Index: %s\n", file); + (void) fflush (stdout); + if (use_rev2) { run_setup ("%s%s %s %s -r%s -r%s", Rcsbin, RCS_DIFF, @@ -288,7 +297,20 @@ diff_dirproc (dir, pos_repos, update_dir) } /* - * Concoct the proper exit status. + * Concoct the proper exit status - done with files + */ +/* ARGSUSED */ +static int +diff_filesdoneproc (err, repos, update_dir) + int err; + char *repos; + char *update_dir; +{ + return (diff_errors); +} + +/* + * Concoct the proper exit status - leaving directories */ /* ARGSUSED */ static int diff --git a/gnu/usr.bin/cvs/cvs/ignore.c b/gnu/usr.bin/cvs/cvs/ignore.c index 74ab90c785ad..823648786c60 100644 --- a/gnu/usr.bin/cvs/cvs/ignore.c +++ b/gnu/usr.bin/cvs/cvs/ignore.c @@ -147,7 +147,7 @@ ign_add (ign, hold) * (saving it if necessary). We also catch * as a special case in a * global ignore file as an optimization */ - if (isspace (*(ign + 1)) && (*ign == '!' || *ign == '*')) + if ((!*(ign+1) || isspace (*(ign+1))) && (*ign == '!' || *ign == '*')) { if (!hold) { diff --git a/gnu/usr.bin/cvs/cvs/import.c b/gnu/usr.bin/cvs/cvs/import.c index 095a80042f07..288b9b265ba7 100644 --- a/gnu/usr.bin/cvs/cvs/import.c +++ b/gnu/usr.bin/cvs/cvs/import.c @@ -330,10 +330,14 @@ import_descend (message, vtag, targc, targv) { while ((dp = readdir (dirp)) != NULL) { - if (ign_name (dp->d_name) || !isdir (dp->d_name)) + if (!strcmp(".", dp->d_name) || !strcmp("..", dp->d_name)) + continue; + if (!isdir (dp->d_name) || ign_name (dp->d_name)) continue; err += import_descend_dir (message, dp->d_name, vtag, targc, targv); + /* need to re-load .cvsignore after each dir traversal */ + ign_add_file (CVSDOTIGNORE, 1); } (void) closedir (dirp); } diff --git a/gnu/usr.bin/cvs/cvs/main.c b/gnu/usr.bin/cvs/cvs/main.c index 03f4a2ca85c9..d6ad2584327a 100644 --- a/gnu/usr.bin/cvs/cvs/main.c +++ b/gnu/usr.bin/cvs/cvs/main.c @@ -93,6 +93,10 @@ int tag (); int update (); #endif /* __STDC__ */ +#ifdef FREEBSD_DEVELOPER +int freebsd = TRUE; /* Use the FreeBSD -K flags!! */ +#endif + struct cmd { char *fullname; /* Full name of the function (e.g. "commit") */ @@ -137,6 +141,9 @@ static char *usg[] = " -b bindir Find RCS programs in 'bindir'\n", " -e editor Use 'editor' for editing log information\n", " -d CVS_root Overrides $CVSROOT as the root of the CVS tree\n", +#ifdef FREEBSD_DEVELOPER + " -x Do NOT use the FreeBSD -K default flags\n", +#endif "\n", " and where 'command' is:\n", " add Adds a new file/directory to the repository\n", @@ -209,7 +216,11 @@ main (argc, argv) cvswrite = FALSE; optind = 1; +#ifdef FREEBSD_DEVELOPER + while ((c = gnu_getopt (argc, argv, "Qqrwtnlvb:e:d:Hx")) != -1) +#else while ((c = gnu_getopt (argc, argv, "Qqrwtnlvb:e:d:H")) != -1) +#endif /* FREEBSD_DEVELOPER */ { switch (c) { @@ -255,6 +266,11 @@ main (argc, argv) case 'H': help = TRUE; break; +#ifdef FREEBSD_DEVELOPER + case 'x': + freebsd = FALSE; + break; +#endif /* FREEBSD_DEVELOPER */ case '?': default: usage (usg); diff --git a/gnu/usr.bin/cvs/cvs/patch.c b/gnu/usr.bin/cvs/cvs/patch.c index 11134a714989..abc02fd73936 100644 --- a/gnu/usr.bin/cvs/cvs/patch.c +++ b/gnu/usr.bin/cvs/cvs/patch.c @@ -43,6 +43,8 @@ static char *rev1 = NULL; static char *rev2 = NULL; static char *date1 = NULL; static char *date2 = NULL; +static char *K_flag1 = NULL; +static char *K_flag2 = NULL; static char tmpfile1[L_tmpnam+1], tmpfile2[L_tmpnam+1], tmpfile3[L_tmpnam+1]; static int unidiff = 0; @@ -60,6 +62,7 @@ static char *patch_usage[] = "\t-D date\tDate.\n", "\t-r rev\tRevision - symbolic or numeric.\n", "\t-V vers\tUse RCS Version \"vers\" for keyword expansion.\n", + "\t-K key\tUse RCS key -K option on checkout.\n", NULL }; @@ -77,7 +80,7 @@ patch (argc, argv) usage (patch_usage); optind = 1; - while ((c = gnu_getopt (argc, argv, "V:k:cuftsQqlRD:r:")) != -1) + while ((c = gnu_getopt (argc, argv, "V:k:cuftsQqlRD:r:K:")) != -1) { switch (c) { @@ -139,6 +142,14 @@ patch (argc, argv) case 'c': /* Context diff */ unidiff = 0; break; + case 'K': + if (K_flag2 != NULL) + error (1, 0, "no more than two -K flags can be specified"); + if (K_flag1 != NULL) + K_flag2 = optarg; + else + K_flag1 = optarg; + break; case '?': default: usage (patch_usage); @@ -149,6 +160,11 @@ patch (argc, argv) argv += optind; /* Sanity checks */ + /* Check for dummy -K flags */ + if (K_flag1 && K_flag1[0] != 'e' && K_flag1[0] != 'i') + error (1, 0, "-K flag does not start e or i"); + if (K_flag2 && K_flag2[0] != 'e' && K_flag2[0] != 'i') + error (1, 0, "-K flag does not start e or i"); if (argc < 1) usage (patch_usage); @@ -364,7 +380,8 @@ patch_fileproc (file, update_dir, repository, entries, srcfiles) } if (vers_tag != NULL) { - run_setup ("%s%s %s -p -q -r%s", Rcsbin, RCS_CO, options, vers_tag); + run_setup ("%s%s %s -p -q -r%s %s%s", Rcsbin, RCS_CO, options, + vers_tag, K_flag1 ? "-K" : "", K_flag1 ? K_flag1 : ""); run_arg (rcsfile->path); if ((retcode = run_exec (RUN_TTY, tmpfile1, RUN_TTY, RUN_NORMAL)) != 0) { @@ -382,7 +399,8 @@ patch_fileproc (file, update_dir, repository, entries, srcfiles) } if (vers_head != NULL) { - run_setup ("%s%s %s -p -q -r%s", Rcsbin, RCS_CO, options, vers_head); + run_setup ("%s%s %s -p -q -r%s %s%s", Rcsbin, RCS_CO, options, + vers_head, K_flag2 ? "-K" : "", K_flag2 ? K_flag2 : ""); run_arg (rcsfile->path); if ((retcode = run_exec (RUN_TTY, tmpfile2, RUN_TTY, RUN_NORMAL)) != 0) { diff --git a/gnu/usr.bin/cvs/cvs/release.c b/gnu/usr.bin/cvs/cvs/release.c index 34d36bc33229..e2a941a6f284 100644 --- a/gnu/usr.bin/cvs/cvs/release.c +++ b/gnu/usr.bin/cvs/cvs/release.c @@ -155,7 +155,11 @@ release (argc, argv) * is "popen()" instead of "Popen()" since we don't want "-n" to * stop it. */ +#ifdef FREEBSD_DEVELOPER + fp = popen ("ncvs -n -q update", "r"); +#else fp = popen ("cvs -n -q update", "r"); +#endif /* FREEBSD_DEVELOPER */ c = 0; while (fgets (line, sizeof (line), fp)) { diff --git a/gnu/usr.bin/cvs/cvs/update.c b/gnu/usr.bin/cvs/cvs/update.c index c25bc757f549..d91ffdd4153d 100644 --- a/gnu/usr.bin/cvs/cvs/update.c +++ b/gnu/usr.bin/cvs/cvs/update.c @@ -75,6 +75,7 @@ static char *tag = NULL; static char *date = NULL; static char *join_rev1, *date_rev1; static char *join_rev2, *date_rev2; +static char *K_flag; static int aflag = 0; static int force_tag_match = 1; static int update_build_dirs = 0; @@ -99,6 +100,7 @@ static char *update_usage[] = "\t-D date\tSet date to update from.\n", "\t-j rev\tMerge in changes made between current revision and rev.\n", "\t-I ign\tMore files to ignore (! to reset).\n", + "\t-K key\tUse RCS key -K option on checkout.\n", NULL }; @@ -121,7 +123,7 @@ update (argc, argv) /* parse the args */ optind = 1; - while ((c = gnu_getopt (argc, argv, "ApPflRQqdk:r:D:j:I:")) != -1) + while ((c = gnu_getopt (argc, argv, "ApPflRQqdk:r:D:j:I:K:")) != -1) { switch (c) { @@ -175,6 +177,9 @@ update (argc, argv) else join_rev1 = optarg; break; + case 'K': + K_flag = optarg; + break; case '?': default: usage (update_usage); @@ -184,6 +189,13 @@ update (argc, argv) argc -= optind; argv += optind; +#ifdef FREEBSD_DEVELOPER + if (!K_flag && freebsd) { + /* XXX Note: The leading -K is not needed, it gets added later! */ + K_flag = "eAuthor,eDate,eHeader,eId,eLocker,eLog,eRCSfile,eRevision,eSource,eState,iFreeBSD"; + } +#endif /* FREEBSD_DEVELOPER */ + /* * If we are updating the entire directory (for real) and building dirs * as we go, we make sure there is no static entries file and write the @@ -209,7 +221,8 @@ update (argc, argv) /* call the command line interface */ err = do_update (argc, argv, options, tag, date, force_tag_match, local, update_build_dirs, aflag, update_prune_dirs, - pipeout, which, join_rev1, join_rev2, (char *) NULL); + pipeout, which, join_rev1, join_rev2, + K_flag, (char *) NULL); /* free the space Make_Date allocated if necessary */ if (date != NULL) @@ -223,7 +236,8 @@ update (argc, argv) */ int do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, - xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir) + xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, + xK_flag, preload_update_dir) int argc; char *argv[]; char *xoptions; @@ -238,6 +252,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, int which; char *xjoin_rev1; char *xjoin_rev2; + char *xK_flag; char *preload_update_dir; { int err = 0; @@ -253,6 +268,8 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, update_prune_dirs = xprune; pipeout = xpipeout; + K_flag = xK_flag; + /* setup the join support */ join_rev1 = xjoin_rev1; join_rev2 = xjoin_rev2; @@ -650,8 +667,8 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) (void) unlink_file (backup); } - run_setup ("%s%s -q -r%s %s", Rcsbin, RCS_CO, vers_ts->vn_rcs, - vers_ts->options); + run_setup ("%s%s -q -r%s %s %s%s", Rcsbin, RCS_CO, vers_ts->vn_rcs, + vers_ts->options, K_flag ? "-K" : "", K_flag ? K_flag : ""); /* * if we are checking out to stdout, print a nice message to stderr, and |