From 6a41219210e7b04a80197a2a5afd88859b8ce476 Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 20 Jul 1996 02:08:56 +0000 Subject: 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. --- gnu/usr.bin/cvs/cvs/import.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu') 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])) -- cgit v1.1