diff options
author | peter <peter@FreeBSD.org> | 1997-06-22 10:55:49 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-06-22 10:55:49 +0000 |
commit | 571cfa0005d94d99d1341bf8ab02be04d4df5f9f (patch) | |
tree | 8684660dbfd105deed9a44c9e97d4f56b231fac1 /contrib/cvs/src/mkmodules.c | |
parent | fc35590c6dddf32e1fa855b541dc28a23965f90c (diff) | |
download | FreeBSD-src-571cfa0005d94d99d1341bf8ab02be04d4df5f9f.zip FreeBSD-src-571cfa0005d94d99d1341bf8ab02be04d4df5f9f.tar.gz |
Import cvs-1.9.10
Diffstat (limited to 'contrib/cvs/src/mkmodules.c')
-rw-r--r-- | contrib/cvs/src/mkmodules.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/contrib/cvs/src/mkmodules.c b/contrib/cvs/src/mkmodules.c index cff993a..ec5d770 100644 --- a/contrib/cvs/src/mkmodules.c +++ b/contrib/cvs/src/mkmodules.c @@ -708,6 +708,8 @@ init (argc, argv) char *info; /* Name of ,v file for this administrative file. */ char *info_v; + /* Exit status. */ + int err; const struct admin_file *fileptr; @@ -739,7 +741,10 @@ init (argc, argv) strcat (adm, CVSROOTADM); mkdir_if_needed (adm); - /* This is needed by the call to "ci" below. */ + /* This is needed because we pass "fileptr->filename" not "info" + to add_rcs_file below. I think this would be easy to change, + thus nuking the need for CVS_CHDIR here, but I haven't looked + closely (e.g. see wrappers calls within add_rcs_file). */ if ( CVS_CHDIR (adm) < 0) error (1, errno, "cannot change to directory %s", adm); @@ -776,16 +781,15 @@ init (argc, argv) if (fclose (fp) < 0) error (1, errno, "cannot close %s", info); } - /* Now check the file in. FIXME: we could be using - add_rcs_file from import.c which is faster (if it were - tweaked slightly). */ - run_setup ("%s%s -x,v/ -q -u -t-", Rcsbin, RCS_CI); - run_args ("-minitial checkin of %s", fileptr->filename); - run_arg (fileptr->filename); - retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + /* The message used to say " of " and fileptr->filename after + "initial checkin" but I fail to see the point as we know what + file it is from the name. */ + retcode = add_rcs_file ("initial checkin", info_v, + fileptr->filename, "1.1", NULL, NULL, + 0, NULL, NULL); if (retcode != 0) - error (1, retcode == -1 ? errno : 0, - "failed to check in %s", info); + /* add_rcs_file already printed an error message. */ + err = 1; } } |