version 1.147, 2008/06/10 01:00:34 |
version 1.148, 2008/06/10 20:30:17 |
|
|
void |
void |
cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags) |
cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags) |
{ |
{ |
|
mode_t mode; |
int cf_kflag, exists, fd; |
int cf_kflag, exists, fd; |
time_t rcstime; |
time_t rcstime; |
CVSENTRIES *ent; |
CVSENTRIES *ent; |
|
|
cvs_merge_file(cf, (cvs_join_rev1 == NULL)); |
cvs_merge_file(cf, (cvs_join_rev1 == NULL)); |
} |
} |
|
|
if (fchmod(cf->fd, 0644) == -1) |
mode = cf->file_rcs->rf_mode; |
|
mode |= S_IWUSR; |
|
|
|
if (fchmod(cf->fd, mode) == -1) |
fatal("cvs_checkout_file: fchmod: %s", strerror(errno)); |
fatal("cvs_checkout_file: fchmod: %s", strerror(errno)); |
|
|
if ((exists == 0) && (cf->file_ent == NULL) && |
if ((exists == 0) && (cf->file_ent == NULL) && |
|
|
|
|
fd = rcs_rev_write_stmp(cf->file_rcs, rnum, |
fd = rcs_rev_write_stmp(cf->file_rcs, rnum, |
template, 0); |
template, 0); |
|
|
|
mode = cf->file_rcs->rf_mode; |
|
mode |= S_IWUSR; |
|
|
|
if (fchmod(fd, mode) == -1) { |
|
cvs_log(LP_ERR, |
|
"failed to set mode for %s", |
|
cf->file_path); |
|
} |
|
|
tosend = template; |
tosend = template; |
} |
} |
|
|