version 1.175, 2007/01/23 01:53:38 |
version 1.176, 2007/01/25 18:56:33 |
|
|
int i, l; |
int i, l; |
FILE *ifp; |
FILE *ifp; |
size_t len; |
size_t len; |
char *path, *buf; |
char path[MAXPATHLEN], buf[MAXNAMLEN]; |
|
|
path = xmalloc(MAXPATHLEN); |
|
buf = xmalloc(MAXNAMLEN); |
|
|
|
TAILQ_INIT(&cvs_ign_pats); |
TAILQ_INIT(&cvs_ign_pats); |
TAILQ_INIT(&dir_ign_pats); |
TAILQ_INIT(&dir_ign_pats); |
|
|
|
|
|
|
(void)fclose(ifp); |
(void)fclose(ifp); |
} |
} |
|
|
xfree(path); |
|
xfree(buf); |
|
} |
} |
|
|
void |
void |
|
|
{ |
{ |
int l; |
int l; |
struct cvs_file *cf; |
struct cvs_file *cf; |
char *p, *rpath; |
char *p, rpath[MAXPATHLEN]; |
|
|
rpath = xmalloc(MAXPATHLEN); |
|
|
|
l = snprintf(rpath, MAXPATHLEN, "%s/%s", d, f); |
l = snprintf(rpath, MAXPATHLEN, "%s/%s", d, f); |
if (l == -1 || l >= MAXPATHLEN) |
if (l == -1 || l >= MAXPATHLEN) |
fatal("cvs_file_get_cf: overflow"); |
fatal("cvs_file_get_cf: overflow"); |
|
|
cf->file_status = cf->file_flags = 0; |
cf->file_status = cf->file_flags = 0; |
cf->file_ent = NULL; |
cf->file_ent = NULL; |
|
|
xfree(rpath); |
|
return (cf); |
return (cf); |
} |
} |
|
|
|
|
struct stat st; |
struct stat st; |
struct cvs_file *cf; |
struct cvs_file *cf; |
struct cvs_filelist *l, *nxt; |
struct cvs_filelist *l, *nxt; |
char *d, *f, *repo, *fpath; |
char *d, *f, repo[MAXPATHLEN], fpath[MAXPATHLEN]; |
|
|
fpath = xmalloc(MAXPATHLEN); |
|
repo = xmalloc(MAXPATHLEN); |
|
|
|
for (l = TAILQ_FIRST(fl); l != NULL; l = nxt) { |
for (l = TAILQ_FIRST(fl); l != NULL; l = nxt) { |
if (cvs_quit) |
if (cvs_quit) |
fatal("received signal %d", sig_received); |
fatal("received signal %d", sig_received); |
|
|
xfree(l->file_path); |
xfree(l->file_path); |
xfree(l); |
xfree(l); |
} |
} |
|
|
xfree(fpath); |
|
xfree(repo); |
|
} |
} |
|
|
void |
void |
|
|
struct cvs_ent_line *line; |
struct cvs_ent_line *line; |
struct cvs_flisthead fl, dl; |
struct cvs_flisthead fl, dl; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
char *buf, *ebuf, *cp, *repo, *fpath; |
char *buf, *ebuf, *cp, repo[MAXPATHLEN], fpath[MAXPATHLEN]; |
|
|
cvs_log(LP_TRACE, "cvs_file_walkdir(%s)", cf->file_path); |
cvs_log(LP_TRACE, "cvs_file_walkdir(%s)", cf->file_path); |
|
|
|
|
if (cf->file_status == FILE_SKIP) |
if (cf->file_status == FILE_SKIP) |
return; |
return; |
|
|
fpath = xmalloc(MAXPATHLEN); |
|
|
|
/* |
/* |
* If we do not have a admin directory inside here, dont bother, |
* If we do not have a admin directory inside here, dont bother, |
* unless we are running import. |
* unless we are running import. |
|
|
l = stat(fpath, &st); |
l = stat(fpath, &st); |
if (cvs_cmdop != CVS_OP_IMPORT && |
if (cvs_cmdop != CVS_OP_IMPORT && |
(l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) { |
(l == -1 || (l == 0 && !S_ISDIR(st.st_mode)))) { |
xfree(fpath); |
|
return; |
return; |
} |
} |
|
|
|
|
cvs_ent_close(entlist, ENT_NOSYNC); |
cvs_ent_close(entlist, ENT_NOSYNC); |
|
|
if (cr->flags & CR_REPO) { |
if (cr->flags & CR_REPO) { |
repo = xmalloc(MAXPATHLEN); |
|
cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN); |
cvs_get_repository_path(cf->file_path, repo, MAXPATHLEN); |
cvs_repository_lock(repo); |
cvs_repository_lock(repo); |
|
|
|
|
cvs_file_walklist(&fl, cr); |
cvs_file_walklist(&fl, cr); |
cvs_file_freelist(&fl); |
cvs_file_freelist(&fl); |
|
|
if (cr->flags & CR_REPO) { |
if (cr->flags & CR_REPO) |
cvs_repository_unlock(repo); |
cvs_repository_unlock(repo); |
xfree(repo); |
|
} |
|
|
|
cvs_file_walklist(&dl, cr); |
cvs_file_walklist(&dl, cr); |
cvs_file_freelist(&dl); |
cvs_file_freelist(&dl); |
|
|
xfree(fpath); |
|
|
|
if (cr->leavedir != NULL) |
if (cr->leavedir != NULL) |
cr->leavedir(cf); |
cr->leavedir(cf); |
} |
} |
|
|
int rflags, l, ismodified, rcsdead, verbose; |
int rflags, l, ismodified, rcsdead, verbose; |
CVSENTRIES *entlist = NULL; |
CVSENTRIES *entlist = NULL; |
const char *state; |
const char *state; |
char *repo, *rcsfile, r1[16], r2[16]; |
char repo[MAXPATHLEN], rcsfile[MAXPATHLEN], r1[16], r2[16]; |
|
|
cvs_log(LP_TRACE, "cvs_file_classify(%s)", cf->file_path); |
cvs_log(LP_TRACE, "cvs_file_classify(%s)", cf->file_path); |
|
|
|
|
|
|
verbose = (verbosity > 1 && loud == 1); |
verbose = (verbosity > 1 && loud == 1); |
|
|
repo = xmalloc(MAXPATHLEN); |
|
rcsfile = xmalloc(MAXPATHLEN); |
|
|
|
cvs_get_repository_path(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); |
|
|
else |
else |
cf->file_status = FILE_UNKNOWN; |
cf->file_status = FILE_UNKNOWN; |
|
|
xfree(repo); |
|
xfree(rcsfile); |
|
cvs_ent_close(entlist, ENT_NOSYNC); |
cvs_ent_close(entlist, ENT_NOSYNC); |
return; |
return; |
} |
} |
|
|
} |
} |
} |
} |
|
|
xfree(repo); |
|
xfree(rcsfile); |
|
cvs_ent_close(entlist, ENT_NOSYNC); |
cvs_ent_close(entlist, ENT_NOSYNC); |
} |
} |
|
|