version 1.121, 2007/10/09 12:14:09 |
version 1.122, 2008/01/10 10:00:53 |
|
|
void |
void |
cvs_mkpath(const char *path, char *tag) |
cvs_mkpath(const char *path, char *tag) |
{ |
{ |
|
CVSENTRIES *ent; |
FILE *fp; |
FILE *fp; |
size_t len; |
size_t len; |
char sticky[CVS_REV_BUFSZ]; |
char entry[CVS_ENT_MAXLINELEN], sticky[CVS_REV_BUFSZ]; |
char *sp, *dp, *dir, rpath[MAXPATHLEN], repo[MAXPATHLEN]; |
char *sp, *dp, *dir, *p, rpath[MAXPATHLEN], repo[MAXPATHLEN]; |
|
|
dir = xstrdup(path); |
dir = xstrdup(path); |
|
|
|
|
|
|
cvs_mkadmin(rpath, current_cvsroot->cr_str, repo, |
cvs_mkadmin(rpath, current_cvsroot->cr_str, repo, |
tag, NULL, 0); |
tag, NULL, 0); |
|
|
|
if (dp != NULL) { |
|
if ((p = strchr(dp, '/')) != NULL) |
|
*p = '\0'; |
|
ent = cvs_ent_open(rpath); |
|
xsnprintf(entry, sizeof(entry), "D/%s/////", dp); |
|
cvs_ent_add(ent, entry); |
|
cvs_ent_close(ent, ENT_SYNC); |
|
if (p != NULL) |
|
*p = '/'; |
|
} |
|
|
if (cvs_server_active == 1 && strcmp(rpath, ".")) { |
if (cvs_server_active == 1 && strcmp(rpath, ".")) { |
if (tag != NULL) { |
if (tag != NULL) { |