diff options
Diffstat (limited to 'gnu/usr.bin/cvs/cvs/update.c')
-rw-r--r-- | gnu/usr.bin/cvs/cvs/update.c | 27 |
1 files changed, 22 insertions, 5 deletions
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 |