version 1.1, 2004/08/03 04:58:45 |
version 1.2, 2004/08/03 05:08:45 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
|
#include <sys/time.h> |
|
|
#include <fcntl.h> |
#include <fcntl.h> |
#include <stdio.h> |
#include <stdio.h> |
|
|
BUF *fbuf; |
BUF *fbuf; |
CVSENTRIES *ef; |
CVSENTRIES *ef; |
struct cvs_ent *ep; |
struct cvs_ent *ep; |
|
struct timeval tv[2]; |
|
|
ep = NULL; |
ep = NULL; |
|
|
|
|
ep = cvs_ent_parse(path); |
ep = cvs_ent_parse(path); |
if (ep == NULL) |
if (ep == NULL) |
return (-1); |
return (-1); |
printf("adding entry `%s'\n", path); |
|
snprintf(path, sizeof(path), "%s%s", line, ep->ce_name); |
snprintf(path, sizeof(path), "%s%s", line, ep->ce_name); |
|
|
if (type == CVS_RESP_CREATED) { |
if (type == CVS_RESP_CREATED) { |
|
|
return (-1); |
return (-1); |
|
|
cvs_buf_write(fbuf, path, fmode); |
cvs_buf_write(fbuf, path, fmode); |
|
|
|
tv[0].tv_sec = (long)cvs_modtime; |
|
tv[0].tv_usec = 0; |
|
tv[1].tv_sec = (long)cvs_modtime; |
|
tv[1].tv_usec = 0; |
|
if (utimes(path, tv) == -1) |
|
cvs_log(LP_ERRNO, "failed to set file timestamps"); |
|
|
/* now see if there is a checksum */ |
/* now see if there is a checksum */ |
if (cvs_fcksum != NULL) { |
if (cvs_fcksum != NULL) { |