=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.152 retrieving revision 1.153 diff -c -r1.152 -r1.153 *** src/usr.bin/cvs/file.c 2006/05/30 19:16:51 1.152 --- src/usr.bin/cvs/file.c 2006/05/30 21:32:52 1.153 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.152 2006/05/30 19:16:51 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.153 2006/05/30 21:32:52 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau *************** *** 537,543 **** } void ! cvs_file_classify(struct cvs_file *cf, int loud) { size_t len; time_t mtime; --- 537,543 ---- } void ! cvs_file_classify(struct cvs_file *cf, const char *tag, int loud) { size_t len; time_t mtime; *************** *** 639,648 **** } } if (cf->file_ent != NULL) rcsnum_tostr(cf->file_ent->ce_rev, r1, sizeof(r1)); ! if (cf->file_rcs != NULL) ! rcsnum_tostr(cf->file_rcs->rf_head, r2, sizeof(r2)); ismodified = rcsdead = 0; if (cf->fd != -1 && cf->file_ent != NULL) { --- 639,655 ---- } } + if (tag != NULL && cf->file_rcs != NULL) + cf->file_rcsrev = rcs_translate_tag(tag, cf->file_rcs); + else if (cf->file_rcs != NULL) + cf->file_rcsrev = cf->file_rcs->rf_head; + else + cf->file_rcsrev = NULL; + if (cf->file_ent != NULL) rcsnum_tostr(cf->file_ent->ce_rev, r1, sizeof(r1)); ! if (cf->file_rcsrev != NULL) ! rcsnum_tostr(cf->file_rcsrev, r2, sizeof(r2)); ismodified = rcsdead = 0; if (cf->fd != -1 && cf->file_ent != NULL) { *************** *** 658,668 **** } if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL) { ! b1 = rcs_getrev(cf->file_rcs, cf->file_rcs->rf_head); if (b1 == NULL) fatal("failed to get HEAD revision for comparison"); ! b1 = rcs_kwexp_buf(b1, cf->file_rcs, cf->file_rcs->rf_head); /* XXX */ b2 = cvs_buf_load(cf->file_path, BUF_AUTOEXT); --- 665,675 ---- } if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL) { ! b1 = rcs_getrev(cf->file_rcs, cf->file_rcsrev); if (b1 == NULL) fatal("failed to get HEAD revision for comparison"); ! b1 = rcs_kwexp_buf(b1, cf->file_rcs, cf->file_rcsrev); /* XXX */ b2 = cvs_buf_load(cf->file_path, BUF_AUTOEXT); *************** *** 677,683 **** } if (cf->file_rcs != NULL) { ! state = rcs_state_get(cf->file_rcs, cf->file_rcs->rf_head); if (state == NULL) fatal("failed to get state for HEAD for %s", cf->file_path); --- 684,690 ---- } if (cf->file_rcs != NULL) { ! state = rcs_state_get(cf->file_rcs, cf->file_rcsrev); if (state == NULL) fatal("failed to get state for HEAD for %s", cf->file_path);