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.
This commit is contained in:
John Polstra 1996-07-20 02:08:56 +00:00
parent c616bf2a71
commit dc38658703
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17228

View File

@ -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]))