=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/add.c,v retrieving revision 1.55 retrieving revision 1.56 diff -c -r1.55 -r1.56 *** src/usr.bin/cvs/add.c 2006/06/07 07:01:12 1.55 --- src/usr.bin/cvs/add.c 2006/06/14 15:14:47 1.56 *************** *** 1,4 **** ! /* $OpenBSD: add.c,v 1.55 2006/06/07 07:01:12 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2005, 2006 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: add.c,v 1.56 2006/06/14 15:14:47 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2005, 2006 Xavier Santolaria *************** *** 106,115 **** static void add_directory(struct cvs_file *cf) { ! int l, added; struct stat st; CVSENTRIES *entlist; ! char *entry, *repo; cvs_log(LP_TRACE, "add_directory(%s)", cf->file_path); --- 106,115 ---- static void add_directory(struct cvs_file *cf) { ! int l, added, nb; struct stat st; CVSENTRIES *entlist; ! char *date, *entry, msg[1024], *repo, *tag; cvs_log(LP_TRACE, "add_directory(%s)", cf->file_path); *************** *** 125,130 **** --- 125,133 ---- cf->file_path); added = 0; } else { + /* Let's see if we have any per-directory tags first. */ + cvs_parse_tagfile(cf->file_wd, &tag, &date, &nb); + l = snprintf(entry, MAXPATHLEN, "%s/%s", cf->file_path, CVS_PATH_CVSDIR); if (l == -1 || l >= MAXPATHLEN) *************** *** 153,159 **** cf->file_path); cvs_mkadmin(cf->file_path, current_cvsroot->cr_dir, ! entry); xfree(repo); xfree(entry); --- 156,162 ---- cf->file_path); cvs_mkadmin(cf->file_path, current_cvsroot->cr_dir, ! entry, tag, date, nb); xfree(repo); xfree(entry); *************** *** 168,175 **** } if (added == 1) { ! cvs_printf("Directory %s added to the repository\n", ! cf->file_rpath); } cf->file_status = FILE_SKIP; --- 171,197 ---- } if (added == 1) { ! snprintf(msg, sizeof(msg), ! "Directory %s added to the repository", cf->file_rpath); ! ! if (tag != NULL) { ! (void)strlcat(msg, ! "\n--> Using per-directory sticky tag ", ! sizeof(msg)); ! (void)strlcat(msg, tag, sizeof(msg)); ! } ! if (date != NULL) { ! (void)strlcat(msg, ! "\n--> Using per-directory sticky date ", ! sizeof(msg)); ! (void)strlcat(msg, date, sizeof(msg)); ! } ! cvs_printf("%s\n", msg); ! ! if (tag != NULL) ! xfree(tag); ! if (date != NULL) ! xfree(date); } cf->file_status = FILE_SKIP;