version 1.55, 2006/06/07 07:01:12 |
version 1.56, 2006/06/14 15:14:47 |
|
|
static void |
static void |
add_directory(struct cvs_file *cf) |
add_directory(struct cvs_file *cf) |
{ |
{ |
int l, added; |
int l, added, nb; |
struct stat st; |
struct stat st; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
char *entry, *repo; |
char *date, *entry, msg[1024], *repo, *tag; |
|
|
cvs_log(LP_TRACE, "add_directory(%s)", cf->file_path); |
cvs_log(LP_TRACE, "add_directory(%s)", cf->file_path); |
|
|
|
|
cf->file_path); |
cf->file_path); |
added = 0; |
added = 0; |
} else { |
} 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, |
l = snprintf(entry, MAXPATHLEN, "%s/%s", cf->file_path, |
CVS_PATH_CVSDIR); |
CVS_PATH_CVSDIR); |
if (l == -1 || l >= MAXPATHLEN) |
if (l == -1 || l >= MAXPATHLEN) |
|
|
cf->file_path); |
cf->file_path); |
|
|
cvs_mkadmin(cf->file_path, current_cvsroot->cr_dir, |
cvs_mkadmin(cf->file_path, current_cvsroot->cr_dir, |
entry); |
entry, tag, date, nb); |
|
|
xfree(repo); |
xfree(repo); |
xfree(entry); |
xfree(entry); |
|
|
} |
} |
|
|
if (added == 1) { |
if (added == 1) { |
cvs_printf("Directory %s added to the repository\n", |
snprintf(msg, sizeof(msg), |
cf->file_rpath); |
"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; |
cf->file_status = FILE_SKIP; |