mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Enhancements to use now -K option to rcs so that certain keywords are
NOT touched by cvs. Only takes effect if -DFREEBSD_DEVELOPER, and installs as ncvs when this is defined. You must also have the changes to rcs for this to work.
This commit is contained in:
parent
c783dff047
commit
b0ca86919b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1537
@ -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 \
|
||||
|
@ -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);
|
||||
|
@ -221,6 +221,10 @@ checkout (argc, argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
#ifdef FREEBSD_DEVELOPER
|
||||
if (!K_flag && freebsd)
|
||||
K_flag = "-KeAuthor,Date,Header,Id,Locker,Log,RCSfile,Revision,Source,State -KiFreeBSD";
|
||||
#endif /* FREEBSD_DEVELOPER */
|
||||
if (shorten == -1)
|
||||
shorten = 0;
|
||||
|
||||
|
@ -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__
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -189,6 +189,11 @@ update (argc, argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
#ifdef FREEBSD_DEVELOPER
|
||||
if (!K_flag && freebsd)
|
||||
K_flag = "-KeAuthor,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
|
||||
|
Loading…
Reference in New Issue
Block a user