version 1.37, 2004/12/06 07:28:15 |
version 1.38, 2004/12/06 21:03:12 |
|
|
if (errno != ENOENT) |
if (errno != ENOENT) |
cvs_log(LP_ERRNO, |
cvs_log(LP_ERRNO, |
"failed to open user's cvsignore", path); |
"failed to open user's cvsignore", path); |
} |
} else { |
else { |
|
while (fgets(buf, sizeof(buf), ifp) != NULL) { |
while (fgets(buf, sizeof(buf), ifp) != NULL) { |
len = strlen(buf); |
len = strlen(buf); |
if (len == 0) |
if (len == 0) |
|
|
if (ip->ip_flags & CVS_IGN_STATIC) { |
if (ip->ip_flags & CVS_IGN_STATIC) { |
if (cvs_file_cmpname(file, ip->ip_pat) == 0) |
if (cvs_file_cmpname(file, ip->ip_pat) == 0) |
return (1); |
return (1); |
} |
} else if (fnmatch(ip->ip_pat, file, flags) == 0) |
else if (fnmatch(ip->ip_pat, file, flags) == 0) |
|
return (1); |
return (1); |
} |
} |
|
|
|
|
} |
} |
|
|
cfp->cf_ddat->cd_ent = cvs_ent_open(path, O_RDWR); |
cfp->cf_ddat->cd_ent = cvs_ent_open(path, O_RDWR); |
} |
} else { |
else { |
|
fd = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); |
fd = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); |
if (fd == -1) { |
if (fd == -1) { |
cvs_file_free(cfp); |
cvs_file_free(cfp); |
|
|
} |
} |
cf = cf->cf_parent; |
cf = cf->cf_parent; |
continue; |
continue; |
} |
} else if (*(pp + 1) == '\0') |
else if (*(pp + 1) == '\0') |
|
continue; |
continue; |
} |
} |
|
|
|
|
if (cfp->cf_type == DT_DIR) { |
if (cfp->cf_type == DT_DIR) { |
TAILQ_INSERT_TAIL(&dirs, cfp, cf_list); |
TAILQ_INSERT_TAIL(&dirs, cfp, cf_list); |
ndirs++; |
ndirs++; |
} |
} else { |
else { |
|
TAILQ_INSERT_TAIL(&(cdp->cd_files), cfp, |
TAILQ_INSERT_TAIL(&(cdp->cd_files), cfp, |
cf_list); |
cf_list); |
cdp->cd_nfiles++; |
cdp->cd_nfiles++; |
|
|
if (ret == -1) |
if (ret == -1) |
break; |
break; |
} |
} |
} |
} else |
else |
|
ret = (*exam)(cf, arg); |
ret = (*exam)(cf, arg); |
|
|
return (ret); |
return (ret); |
|
|
if (ent == NULL) { |
if (ent == NULL) { |
cfp->cf_cvstat = (cwd == 1) ? |
cfp->cf_cvstat = (cwd == 1) ? |
CVS_FST_UPTODATE : CVS_FST_UNKNOWN; |
CVS_FST_UPTODATE : CVS_FST_UNKNOWN; |
} |
} else { |
else { |
|
/* always show directories as up-to-date */ |
/* always show directories as up-to-date */ |
if (ent->ce_type == CVS_ENT_DIR) |
if (ent->ce_type == CVS_ENT_DIR) |
cfp->cf_cvstat = CVS_FST_UPTODATE; |
cfp->cf_cvstat = CVS_FST_UPTODATE; |