version 1.139, 2008/02/24 20:04:05 |
version 1.140, 2008/02/27 22:34:04 |
|
|
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) |
{ |
{ |
int cf_kflag, oflags, exists; |
int cf_kflag, oflags, exists, fd; |
time_t rcstime; |
time_t rcstime; |
CVSENTRIES *ent; |
CVSENTRIES *ent; |
struct timeval tv[2]; |
struct timeval tv[2]; |
|
|
if (co_flags & CO_MERGE) { |
if (co_flags & CO_MERGE) { |
cvs_merge_file(cf, 1); |
cvs_merge_file(cf, 1); |
tosend = cf->file_path; |
tosend = cf->file_path; |
|
fd = cf->fd; |
} |
} |
|
|
if (co_flags & CO_COMMIT) |
if (co_flags & CO_COMMIT) |
|
|
(void)xsnprintf(template, MAXPATHLEN, |
(void)xsnprintf(template, MAXPATHLEN, |
"%s/checkout.XXXXXXXXXX", cvs_tmpdir); |
"%s/checkout.XXXXXXXXXX", cvs_tmpdir); |
|
|
rcs_rev_write_stmp(cf->file_rcs, rnum, |
fd = rcs_rev_write_stmp(cf->file_rcs, rnum, |
template, 0); |
template, 0); |
tosend = template; |
tosend = template; |
} |
} |
|
|
cvs_remote_send_file(tosend); |
cvs_remote_send_file(tosend, fd); |
|
|
if (!(co_flags & CO_MERGE)) { |
if (!(co_flags & CO_MERGE)) { |
|
close(fd); |
(void)unlink(template); |
(void)unlink(template); |
cvs_worklist_run(&temp_files, |
cvs_worklist_run(&temp_files, |
cvs_worklist_unlink); |
cvs_worklist_unlink); |