version 1.3, 2004/07/29 18:32:46 |
version 1.4, 2004/07/30 01:49:24 |
|
|
#include "cvs.h" |
#include "cvs.h" |
#include "rcs.h" |
#include "rcs.h" |
#include "log.h" |
#include "log.h" |
|
#include "proto.h" |
|
|
|
|
int cvs_update_file (CVSFILE *, void *); |
int cvs_update_file (CVSFILE *, void *); |
|
|
|
|
cvs_file_examine(cf, cvs_update_file, NULL); |
cvs_file_examine(cf, cvs_update_file, NULL); |
|
|
cvs_client_senddir(cf->cf_path); |
cvs_senddir(cf->cf_ddat->cd_root, cf); |
cvs_client_sendreq(CVS_REQ_UPDATE, NULL, 1); |
cvs_sendreq(cf->cf_ddat->cd_root, CVS_REQ_UPDATE, NULL); |
|
|
return (0); |
return (0); |
} |
} |
|
|
root = cf->cf_ddat->cd_root; |
root = cf->cf_ddat->cd_root; |
if ((cf->cf_parent == NULL) || |
if ((cf->cf_parent == NULL) || |
(root != cf->cf_parent->cf_ddat->cd_root)) { |
(root != cf->cf_parent->cf_ddat->cd_root)) { |
cvs_client_connect(root); |
cvs_connect(root); |
/* XXX temporary hack */ |
|
cvs_root = root; |
|
} |
} |
|
|
cvs_client_senddir(cf->cf_path); |
cvs_senddir(root, cf); |
return (0); |
return (0); |
} |
} |
else |
else |
|
|
if (root->cr_method == CVS_METHOD_LOCAL) |
if (root->cr_method == CVS_METHOD_LOCAL) |
cvs_printf("? %s\n", cf->cf_path); |
cvs_printf("? %s\n", cf->cf_path); |
else |
else |
cvs_client_sendreq(CVS_REQ_QUESTIONABLE, |
cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); |
cf->cf_name, 0); |
|
return (0); |
return (0); |
} |
} |
|
|
|
|
return (-1); |
return (-1); |
|
|
if ((root->cr_method != CVS_METHOD_LOCAL) && |
if ((root->cr_method != CVS_METHOD_LOCAL) && |
(cvs_client_sendentry(entp) < 0)) { |
(cvs_sendentry(root, entp) < 0)) { |
cvs_ent_free(entp); |
cvs_ent_free(entp); |
return (-1); |
return (-1); |
} |
} |
|
|
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (root->cr_method != CVS_METHOD_LOCAL) { |
switch (cf->cf_cvstat) { |
switch (cf->cf_cvstat) { |
case CVS_FST_UPTODATE: |
case CVS_FST_UPTODATE: |
cvs_client_sendreq(CVS_REQ_UNCHANGED, cf->cf_name, 0); |
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: |
cvs_client_sendreq(CVS_REQ_MODIFIED, cf->cf_name, 0); |
cvs_sendreq(root, CVS_REQ_MODIFIED, cf->cf_name); |
cvs_sendfile(cf->cf_path); |
cvs_sendfile(root, cf->cf_path); |
break; |
break; |
default: |
default: |
return (-1); |
return (-1); |