version 1.145, 2006/05/28 10:14:59 |
version 1.146, 2006/05/28 17:25:18 |
|
|
if ((d = dirname(l->file_path)) == NULL) |
if ((d = dirname(l->file_path)) == NULL) |
fatal("cvs_file_walklist: dirname failed"); |
fatal("cvs_file_walklist: dirname failed"); |
|
|
|
type = CVS_FILE; |
if ((fd = open(l->file_path, O_RDONLY)) != -1) { |
if ((fd = open(l->file_path, O_RDONLY)) != -1) { |
if (fstat(fd, &st) == -1) { |
if (fstat(fd, &st) == -1) { |
cvs_log(LP_ERRNO, "%s", l->file_path); |
cvs_log(LP_ERRNO, "%s", l->file_path); |
|
|
goto next; |
goto next; |
} |
} |
|
|
cvs_get_repo(d, repo, MAXPATHLEN); |
cvs_get_repository_path(d, repo, MAXPATHLEN); |
len = snprintf(fpath, MAXPATHLEN, "%s/%s", |
len = snprintf(fpath, MAXPATHLEN, "%s/%s", |
repo, f); |
repo, f); |
if (len == -1 || len >= MAXPATHLEN) |
if (len == -1 || len >= MAXPATHLEN) |
|
|
if (cr->local != NULL) |
if (cr->local != NULL) |
cr->local(cf); |
cr->local(cf); |
|
|
|
if (cf->file_status == FILE_SKIP) |
|
return; |
|
|
fpath = xmalloc(MAXPATHLEN); |
fpath = xmalloc(MAXPATHLEN); |
|
|
/* |
/* |
|
|
if (l == -1 || l >= MAXPATHLEN) |
if (l == -1 || l >= MAXPATHLEN) |
fatal("cvs_file_walkdir: overflow"); |
fatal("cvs_file_walkdir: overflow"); |
|
|
if (stat(fpath, &st) == -1) { |
l = stat(fpath, &st); |
|
if (l == -1 || (l == 0 && !S_ISDIR(st.st_mode))) { |
xfree(fpath); |
xfree(fpath); |
return; |
return; |
} |
} |
|
|
|
|
if (cr->flags & CR_REPO) { |
if (cr->flags & CR_REPO) { |
repo = xmalloc(MAXPATHLEN); |
repo = xmalloc(MAXPATHLEN); |
cvs_get_repo(cf->file_path, repo, MAXPATHLEN); |
cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN); |
cvs_repository_lock(repo); |
cvs_repository_lock(repo); |
|
|
cvs_repository_getdir(repo, cf->file_path, &fl, &dl, |
cvs_repository_getdir(repo, cf->file_path, &fl, &dl, |
|
|
repo = xmalloc(MAXPATHLEN); |
repo = xmalloc(MAXPATHLEN); |
rcsfile = xmalloc(MAXPATHLEN); |
rcsfile = xmalloc(MAXPATHLEN); |
|
|
cvs_get_repo(cf->file_wd, repo, MAXPATHLEN); |
cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); |
l = snprintf(rcsfile, MAXPATHLEN, "%s/%s", |
l = snprintf(rcsfile, MAXPATHLEN, "%s/%s", |
repo, cf->file_name); |
repo, cf->file_name); |
if (l == -1 || l >= MAXPATHLEN) |
if (l == -1 || l >= MAXPATHLEN) |