version 1.101, 2007/01/26 21:48:17 |
version 1.102, 2007/01/31 21:07:35 |
|
|
BUF *b, *d; |
BUF *b, *d; |
int isnew; |
int isnew; |
RCSNUM *head; |
RCSNUM *head; |
int l, openflags, rcsflags; |
int openflags, rcsflags; |
char rbuf[24], nbuf[24]; |
char rbuf[24], nbuf[24]; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
char attic[MAXPATHLEN], repo[MAXPATHLEN], rcsfile[MAXPATHLEN]; |
char attic[MAXPATHLEN], repo[MAXPATHLEN], rcsfile[MAXPATHLEN]; |
|
|
"to be dead", cf->file_path); |
"to be dead", cf->file_path); |
|
|
cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); |
cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); |
l = snprintf(rcsfile, MAXPATHLEN, "%s/%s%s", |
(void)xsnprintf(rcsfile, MAXPATHLEN, "%s/%s%s", |
repo, cf->file_name, RCS_FILE_EXT); |
repo, cf->file_name, RCS_FILE_EXT); |
if (l == -1 || l >= MAXPATHLEN) |
|
fatal("cvs_commit_local: overflow"); |
|
|
|
if (rename(cf->file_rpath, rcsfile) == -1) |
if (rename(cf->file_rpath, rcsfile) == -1) |
fatal("cvs_commit_local: failed to move %s " |
fatal("cvs_commit_local: failed to move %s " |
|
|
|
|
cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); |
cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); |
|
|
l = snprintf(attic, MAXPATHLEN, "%s/%s", repo, CVS_PATH_ATTIC); |
(void)xsnprintf(attic, MAXPATHLEN, "%s/%s", |
if (l == -1 || l >= MAXPATHLEN) |
repo, CVS_PATH_ATTIC); |
fatal("cvs_commit_local: overflow"); |
|
|
|
if (mkdir(attic, 0755) == -1 && errno != EEXIST) |
if (mkdir(attic, 0755) == -1 && errno != EEXIST) |
fatal("cvs_commit_local: failed to create Attic"); |
fatal("cvs_commit_local: failed to create Attic"); |
|
|
l = snprintf(attic, MAXPATHLEN, "%s/%s/%s%s", repo, |
(void)xsnprintf(attic, MAXPATHLEN, "%s/%s/%s%s", repo, |
CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT); |
CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT); |
if (l == -1 || l >= MAXPATHLEN) |
|
fatal("cvs_commit_local: overflow"); |
|
|
|
if (rename(cf->file_rpath, attic) == -1) |
if (rename(cf->file_rpath, attic) == -1) |
fatal("cvs_commit_local: failed to move %s to Attic", |
fatal("cvs_commit_local: failed to move %s to Attic", |
|
|
commit_desc_set(struct cvs_file *cf) |
commit_desc_set(struct cvs_file *cf) |
{ |
{ |
BUF *bp; |
BUF *bp; |
int l, fd; |
int fd; |
char desc_path[MAXPATHLEN], *desc; |
char desc_path[MAXPATHLEN], *desc; |
|
|
l = snprintf(desc_path, MAXPATHLEN, "%s/%s%s", |
(void)xsnprintf(desc_path, MAXPATHLEN, "%s/%s%s", |
CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); |
CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT); |
if (l == -1 || l >= MAXPATHLEN) |
|
fatal("commit_desc_set: overflow"); |
|
|
|
if ((fd = open(desc_path, O_RDONLY)) == -1) |
if ((fd = open(desc_path, O_RDONLY)) == -1) |
return; |
return; |