summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1996-07-20 02:08:56 +0000
committerjdp <jdp@FreeBSD.org>1996-07-20 02:08:56 +0000
commit6a41219210e7b04a80197a2a5afd88859b8ce476 (patch)
tree2745c03986f359cf0b6daced2c4d0ee5c87afa41 /gnu/usr.bin
parent88f3f2f294a2adb887fbaa9e33cf56bf0810d732 (diff)
downloadFreeBSD-src-6a41219210e7b04a80197a2a5afd88859b8ce476.zip
FreeBSD-src-6a41219210e7b04a80197a2a5afd88859b8ce476.tar.gz
Check for, and disallow, duplicate tags in the "cvs import" command.
RCS cannot deal with duplicate tags; the extra one always becomes inaccessible and useless. This will prevent the common mistake of specifying the same name for the vendor tag and the release tag. The FreeBSD CVS repository already contains zillions of files with this error. We don't need any more of them.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/cvs/import.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/cvs/import.c b/gnu/usr.bin/cvs/cvs/import.c
index 9980763..187f109 100644
--- a/gnu/usr.bin/cvs/cvs/import.c
+++ b/gnu/usr.bin/cvs/cvs/import.c
@@ -138,7 +138,14 @@ import (argc, argv)
usage (import_usage);
for (i = 1; i < argc; i++) /* check the tags for validity */
+ {
+ int j;
+
RCS_check_tag (argv[i]);
+ for (j = 1; j < i; j++)
+ if (strcmp (argv[j], argv[i]) == 0)
+ error (1, 0, "tag `%s' was specified more than once", argv[i]);
+ }
/* XXX - this should be a module, not just a pathname */
if (! isabsolute (argv[0]))
OpenPOWER on IntegriCloud