version 1.111, 2007/09/23 10:49:49 |
version 1.112, 2007/09/23 11:19:24 |
|
|
void |
void |
cvs_update_local(struct cvs_file *cf) |
cvs_update_local(struct cvs_file *cf) |
{ |
{ |
|
char *tag; |
int ret, flags; |
int ret, flags; |
CVSENTRIES *entlist; |
CVSENTRIES *entlist; |
char rbuf[CVS_REV_BUFSZ]; |
char rbuf[CVS_REV_BUFSZ]; |
|
|
} |
} |
|
|
flags = 0; |
flags = 0; |
cvs_file_classify(cf, cvs_directory_tag); |
if (cvs_specified_tag != NULL) |
|
tag = cvs_specified_tag; |
|
else |
|
tag = cvs_directory_tag; |
|
|
|
cvs_file_classify(cf, tag); |
|
|
|
if (cf->file_ent != NULL && cf->file_ent->ce_tag != NULL) |
|
tag = cf->file_ent->ce_tag; |
|
|
if ((cf->file_status == FILE_UPTODATE || |
if ((cf->file_status == FILE_UPTODATE || |
cf->file_status == FILE_MODIFIED) && cf->file_ent != NULL && |
cf->file_status == FILE_MODIFIED) && cf->file_ent != NULL && |
cf->file_ent->ce_tag != NULL && reset_stickies == 1) { |
cf->file_ent->ce_tag != NULL && reset_stickies == 1) { |
|
|
cvs_log(LP_RCS, "VERS: %s", rbuf); |
cvs_log(LP_RCS, "VERS: %s", rbuf); |
cvs_log(LP_RCS, "***************"); |
cvs_log(LP_RCS, "***************"); |
} |
} |
cvs_checkout_file(cf, cf->file_rcsrev, CO_DUMP); |
cvs_checkout_file(cf, cf->file_rcsrev, tag, CO_DUMP); |
return; |
return; |
} |
} |
|
|
|
|
case FILE_LOST: |
case FILE_LOST: |
case FILE_CHECKOUT: |
case FILE_CHECKOUT: |
case FILE_PATCH: |
case FILE_PATCH: |
if (cvs_directory_tag != NULL || |
if ((tag != NULL && reset_stickies != 1) || |
(((cf->file_ent != NULL) && cf->file_ent->ce_tag != NULL) && |
(((cf->file_ent != NULL) && cf->file_ent->ce_tag != NULL) && |
(reset_stickies != 1))) |
(reset_stickies != 1))) |
flags = CO_SETSTICKY; |
flags = CO_SETSTICKY; |
|
|
cvs_checkout_file(cf, cf->file_rcsrev, flags); |
cvs_checkout_file(cf, cf->file_rcsrev, tag, flags); |
cvs_printf("U %s\n", cf->file_path); |
cvs_printf("U %s\n", cf->file_path); |
cvs_history_add(CVS_HISTORY_UPDATE_CO, cf, NULL); |
cvs_history_add(CVS_HISTORY_UPDATE_CO, cf, NULL); |
break; |
break; |
case FILE_MERGE: |
case FILE_MERGE: |
cvs_checkout_file(cf, cf->file_rcsrev, CO_MERGE); |
cvs_checkout_file(cf, cf->file_rcsrev, tag, CO_MERGE); |
|
|
if (diff3_conflicts != 0) { |
if (diff3_conflicts != 0) { |
cvs_printf("C %s\n", cf->file_path); |
cvs_printf("C %s\n", cf->file_path); |
|
|
case FILE_UNLINK: |
case FILE_UNLINK: |
(void)unlink(cf->file_path); |
(void)unlink(cf->file_path); |
if (cvs_server_active == 1) |
if (cvs_server_active == 1) |
cvs_checkout_file(cf, cf->file_rcsrev, CO_REMOVE); |
cvs_checkout_file(cf, cf->file_rcsrev, tag, CO_REMOVE); |
case FILE_REMOVE_ENTRY: |
case FILE_REMOVE_ENTRY: |
entlist = cvs_ent_open(cf->file_wd); |
entlist = cvs_ent_open(cf->file_wd); |
cvs_ent_remove(entlist, cf->file_name); |
cvs_ent_remove(entlist, cf->file_name); |
|
|
if (cvs_cmdop != CVS_OP_UPDATE) |
if (cvs_cmdop != CVS_OP_UPDATE) |
break; |
break; |
|
|
if (cvs_directory_tag != NULL && cf->file_rcs->rf_dead != 1 && |
if (tag != NULL && cf->file_rcs->rf_dead != 1 && |
(cf->file_flags & FILE_HAS_TAG)) |
(cf->file_flags & FILE_HAS_TAG)) |
cvs_checkout_file(cf, cf->file_rcsrev, CO_SETSTICKY); |
cvs_checkout_file(cf, cf->file_rcsrev, |
|
tag, CO_SETSTICKY); |
break; |
break; |
default: |
default: |
break; |
break; |