version 1.93, 2008/02/06 18:12:28 |
version 1.94, 2008/02/09 20:04:00 |
|
|
void |
void |
cvs_add_entry(struct cvs_file *cf) |
cvs_add_entry(struct cvs_file *cf) |
{ |
{ |
char entry[CVS_ENT_MAXLINELEN]; |
char *entry; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
|
|
if (cf->file_type == CVS_DIR) { |
if (cf->file_type == CVS_DIR) { |
(void)xsnprintf(entry, CVS_ENT_MAXLINELEN, |
entry = xmalloc(CVS_ENT_MAXLINELEN); |
"D/%s////", cf->file_name); |
cvs_ent_line_str(cf->file_name, NULL, NULL, NULL, NULL, 1, 0, |
|
entry, CVS_ENT_MAXLINELEN); |
|
|
entlist = cvs_ent_open(cf->file_wd); |
entlist = cvs_ent_open(cf->file_wd); |
cvs_ent_add(entlist, entry); |
cvs_ent_add(entlist, entry); |
cvs_ent_close(entlist, ENT_SYNC); |
cvs_ent_close(entlist, ENT_SYNC); |
|
|
|
xfree(entry); |
} else { |
} else { |
add_entry(cf); |
add_entry(cf); |
} |
} |
|
|
entry, tag, date); |
entry, tag, date); |
|
|
p = xmalloc(CVS_ENT_MAXLINELEN); |
p = xmalloc(CVS_ENT_MAXLINELEN); |
(void)xsnprintf(p, CVS_ENT_MAXLINELEN, |
cvs_ent_line_str(cf->file_name, NULL, NULL, NULL, |
"D/%s////", cf->file_name); |
NULL, 1, 0, p, CVS_ENT_MAXLINELEN); |
|
|
entlist = cvs_ent_open(cf->file_wd); |
entlist = cvs_ent_open(cf->file_wd); |
cvs_ent_add(entlist, p); |
cvs_ent_add(entlist, p); |
cvs_ent_close(entlist, ENT_SYNC); |
cvs_ent_close(entlist, ENT_SYNC); |
|
|
add_entry(struct cvs_file *cf) |
add_entry(struct cvs_file *cf) |
{ |
{ |
FILE *fp; |
FILE *fp; |
char entry[CVS_ENT_MAXLINELEN], path[MAXPATHLEN]; |
char *entry, path[MAXPATHLEN]; |
char revbuf[CVS_REV_BUFSZ], tbuf[CVS_TIME_BUFSZ]; |
char revbuf[CVS_REV_BUFSZ], tbuf[CVS_TIME_BUFSZ]; |
char sticky[CVS_ENT_MAXLINELEN]; |
char sticky[CVS_ENT_MAXLINELEN]; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
|
|
return; |
return; |
|
|
sticky[0] = '\0'; |
sticky[0] = '\0'; |
|
entry = xmalloc(CVS_ENT_MAXLINELEN); |
|
|
if (cf->file_status == FILE_REMOVED) { |
if (cf->file_status == FILE_REMOVED) { |
rcsnum_tostr(cf->file_ent->ce_rev, revbuf, sizeof(revbuf)); |
rcsnum_tostr(cf->file_ent->ce_rev, revbuf, sizeof(revbuf)); |
|
|
cf->file_ent->ce_tag); |
cf->file_ent->ce_tag); |
|
|
/* Remove the '-' prefixing the version number. */ |
/* Remove the '-' prefixing the version number. */ |
(void)xsnprintf(entry, CVS_ENT_MAXLINELEN, |
cvs_ent_line_str(cf->file_name, revbuf, tbuf, |
"/%s/%s/%s/%s/%s", cf->file_name, revbuf, tbuf, |
cf->file_ent->ce_opts ? cf->file_ent->ce_opts : "", sticky, |
cf->file_ent->ce_opts ? cf->file_ent->ce_opts : "", sticky); |
0, 0, entry, CVS_ENT_MAXLINELEN); |
} else { |
} else { |
if (logmsg != NULL) { |
if (logmsg != NULL) { |
(void)xsnprintf(path, MAXPATHLEN, "%s/%s%s", |
(void)xsnprintf(path, MAXPATHLEN, "%s/%s%s", |
|
|
(void)xsnprintf(tbuf, sizeof(tbuf), "Initial %s", |
(void)xsnprintf(tbuf, sizeof(tbuf), "Initial %s", |
cf->file_name); |
cf->file_name); |
|
|
(void)xsnprintf(entry, CVS_ENT_MAXLINELEN, |
|
"/%s/0/%s/%s/%s", cf->file_name, tbuf, kflag ? kbuf : "", |
cvs_ent_line_str(cf->file_name, "0", tbuf, kflag ? kbuf : "", |
sticky); |
sticky, 0, 0, entry, CVS_ENT_MAXLINELEN); |
} |
} |
|
|
if (cvs_server_active) { |
if (cvs_server_active) { |
|
|
cvs_ent_add(entlist, entry); |
cvs_ent_add(entlist, entry); |
cvs_ent_close(entlist, ENT_SYNC); |
cvs_ent_close(entlist, ENT_SYNC); |
} |
} |
|
xfree(entry); |
} |
} |