version 1.48, 2005/12/22 14:59:54 |
version 1.49, 2005/12/30 02:03:28 |
|
|
cvs_getlog_pre_exec(struct cvsroot *root) |
cvs_getlog_pre_exec(struct cvsroot *root) |
{ |
{ |
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (log_honly && (cvs_sendarg(root, "-h", 0) < 0)) |
if (log_honly) |
return (CVS_EX_PROTO); |
cvs_sendarg(root, "-h", 0); |
if (log_notags && (cvs_sendarg(root, "-N", 0) < 0)) |
if (log_notags) |
return (CVS_EX_PROTO); |
cvs_sendarg(root, "-N", 0); |
if (log_rfonly && (cvs_sendarg(root, "-R", 0) < 0)) |
if (log_rfonly) |
return (CVS_EX_PROTO); |
cvs_sendarg(root, "-R", 0); |
if (log_lhonly && (cvs_sendarg(root, "-t", 0) < 0)) |
if (log_lhonly) |
return (CVS_EX_PROTO); |
cvs_sendarg(root, "-t", 0); |
} |
} |
|
|
return (0); |
return (0); |
|
|
static int |
static int |
cvs_getlog_remote(CVSFILE *cf, void *arg) |
cvs_getlog_remote(CVSFILE *cf, void *arg) |
{ |
{ |
int ret; |
|
char fpath[MAXPATHLEN]; |
char fpath[MAXPATHLEN]; |
struct cvsroot *root; |
struct cvsroot *root; |
|
|
ret = 0; |
|
root = CVS_DIR_ROOT(cf); |
root = CVS_DIR_ROOT(cf); |
|
|
if (cf->cf_type == DT_DIR) { |
if (cf->cf_type == DT_DIR) { |
if (cf->cf_cvstat == CVS_FST_UNKNOWN) |
if (cf->cf_cvstat == CVS_FST_UNKNOWN) |
ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE, |
cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); |
cf->cf_name); |
|
else |
else |
ret = cvs_senddir(root, cf); |
cvs_senddir(root, cf); |
return (ret); |
return (0); |
} |
} |
|
|
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
|
|
if (cvs_sendentry(root, cf) < 0) |
cvs_sendentry(root, cf); |
return (CVS_EX_PROTO); |
|
|
|
switch (cf->cf_cvstat) { |
switch (cf->cf_cvstat) { |
case CVS_FST_UNKNOWN: |
case CVS_FST_UNKNOWN: |
ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); |
cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); |
break; |
break; |
case CVS_FST_UPTODATE: |
case CVS_FST_UPTODATE: |
ret = cvs_sendreq(root, CVS_REQ_UNCHANGED, cf->cf_name); |
cvs_sendreq(root, CVS_REQ_UNCHANGED, cf->cf_name); |
break; |
break; |
case CVS_FST_ADDED: |
case CVS_FST_ADDED: |
case CVS_FST_MODIFIED: |
case CVS_FST_MODIFIED: |
ret = cvs_sendreq(root, CVS_REQ_ISMODIFIED, cf->cf_name); |
cvs_sendreq(root, CVS_REQ_ISMODIFIED, cf->cf_name); |
break; |
break; |
default: |
default: |
break; |
break; |
} |
} |
|
|
if (ret == -1) |
return (0); |
ret = CVS_EX_PROTO; |
|
return (ret); |
|
} |
} |
|
|
|
|