version 1.27, 2005/10/15 22:56:02 |
version 1.28, 2005/11/24 11:17:15 |
|
|
return (0); |
return (0); |
} |
} |
|
|
if (dflag) { |
if (dflag == 1) { |
ctime_r(&(cf->cf_mtime), date); |
ctime_r(&(cf->cf_mtime), date); |
sz = strlen(date); |
sz = strlen(date); |
if ((sz > 0) && (date[sz - 1] == '\n')) |
if ((sz > 0) && (date[sz - 1] == '\n')) |
|
|
cvs_import_local(CVSFILE *cf, void *arg) |
cvs_import_local(CVSFILE *cf, void *arg) |
{ |
{ |
size_t len; |
size_t len; |
|
int l; |
time_t stamp; |
time_t stamp; |
char fpath[MAXPATHLEN], rpath[MAXPATHLEN], repo[MAXPATHLEN]; |
char fpath[MAXPATHLEN], rpath[MAXPATHLEN], repo[MAXPATHLEN]; |
const char *comment; |
const char *comment; |
|
|
* If -d was given, use the file's last modification time as the |
* If -d was given, use the file's last modification time as the |
* timestamps for the initial revisions. |
* timestamps for the initial revisions. |
*/ |
*/ |
if (dflag) { |
if (dflag == 1) { |
if (stat(fpath, &fst) == -1) { |
if (stat(fpath, &fst) == -1) { |
cvs_log(LP_ERRNO, "failed to stat %s", fpath); |
cvs_log(LP_ERRNO, "failed to stat %s", fpath); |
return (CVS_EX_DATA); |
return (CVS_EX_DATA); |
|
|
} else |
} else |
stamp = -1; |
stamp = -1; |
|
|
snprintf(rpath, sizeof(rpath), "%s/%s%s", |
l = snprintf(rpath, sizeof(rpath), "%s/%s%s", |
repo, fpath, RCS_FILE_EXT); |
repo, fpath, RCS_FILE_EXT); |
|
if (l == -1 || l >= (int)sizeof(rpath)) { |
|
errno = ENAMETOOLONG; |
|
cvs_log(LP_ERRNO, "%s", rpath); |
|
return (CVS_EX_DATA); |
|
} |
|
|
cvs_printf("N %s\n", fpath); |
cvs_printf("N %s\n", fpath); |
|
|
|
|
/* add the vendor tag and release tag as symbols */ |
/* add the vendor tag and release tag as symbols */ |
rcs_close(rf); |
rcs_close(rf); |
|
|
if (dflag && (utimes(rpath, ts) == -1)) |
if ((dflag ==1) && (utimes(rpath, ts) == -1)) |
cvs_log(LP_ERRNO, "failed to timestamp RCS file"); |
cvs_log(LP_ERRNO, "failed to timestamp RCS file"); |
|
|
return (CVS_EX_OK); |
return (CVS_EX_OK); |