summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs/import.c')
-rw-r--r--usr.bin/cvs/import.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c
index 8f8b760f700..20e5d907d63 100644
--- a/usr.bin/cvs/import.c
+++ b/usr.bin/cvs/import.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: import.c,v 1.19 2005/05/26 00:51:36 jfb Exp $ */
+/* $OpenBSD: import.c,v 1.20 2005/05/26 02:35:13 jfb Exp $ */
/*
* Copyright (c) 2004 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -312,8 +312,7 @@ cvs_import_local(CVSFILE *cf, void *arg)
/* don't error out, no big deal */
}
- /* first add the magic 1.1.1.1 revision */
- rev = rcsnum_parse("1.1.1.1");
+ rev = rcsnum_brtorev(imp_brnum);
if (rcs_rev_add(rf, rev, cvs_msg, stamp) < 0) {
cvs_log(LP_ERR, "failed to add revision: %s",
rcs_errstr(rcs_errno));
@@ -330,9 +329,7 @@ cvs_import_local(CVSFILE *cf, void *arg)
return (CVS_EX_DATA);
}
- rcsnum_free(rev);
-
- rev = rcsnum_parse(RCS_HEAD_INIT);
+ rcsnum_cpy(imp_brnum, rev, 2);
if (rcs_rev_add(rf, rev, cvs_msg, stamp) < 0) {
cvs_log(LP_ERR, "failed to add revision: %s",
rcs_errstr(rcs_errno));
@@ -355,6 +352,14 @@ cvs_import_local(CVSFILE *cf, void *arg)
return (CVS_EX_DATA);
}
+ if (rcs_sym_add(rf, vendor, imp_brnum) < 0) {
+ cvs_log(LP_ERR, "failed to set RCS symbol: %s",
+ strerror(rcs_errno));
+ rcs_close(rf);
+ (void)unlink(rpath);
+ return (CVS_EX_DATA);
+ }
+
/* add the vendor tag and release tag as symbols */
rcs_close(rf);