=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/getlog.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/cvs/getlog.c 2004/11/18 15:54:17 1.6 --- src/usr.bin/cvs/getlog.c 2004/11/26 16:23:50 1.7 *************** *** 1,4 **** ! /* $OpenBSD: getlog.c,v 1.6 2004/11/18 15:54:17 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: getlog.c,v 1.7 2004/11/26 16:23:50 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 126,140 **** static int cvs_getlog_file(CVSFILE *cf, void *arg) { ! char *dir, *repo, rcspath[MAXPATHLEN]; RCSFILE *rf; struct cvsroot *root; struct cvs_ent *entp; if (cf->cf_type == DT_DIR) { if (cf->cf_cvstat == CVS_FST_UNKNOWN) { root = cf->cf_parent->cf_ddat->cd_root; ! cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); } else { root = cf->cf_ddat->cd_root; --- 126,143 ---- static int cvs_getlog_file(CVSFILE *cf, void *arg) { ! char *repo, fpath[MAXPATHLEN]; RCSFILE *rf; struct cvsroot *root; struct cvs_ent *entp; + cvs_file_getpath(cf, fpath, sizeof(fpath)); + if (cf->cf_type == DT_DIR) { if (cf->cf_cvstat == CVS_FST_UNKNOWN) { root = cf->cf_parent->cf_ddat->cd_root; ! cvs_sendreq(root, CVS_REQ_QUESTIONABLE, ! CVS_FILE_NAME(cf)); } else { root = cf->cf_ddat->cd_root; *************** *** 153,175 **** rf = NULL; if (cf->cf_parent != NULL) { - dir = cf->cf_parent->cf_path; repo = cf->cf_parent->cf_ddat->cd_repo; } else { - dir = "."; repo = NULL; } if (cf->cf_cvstat == CVS_FST_UNKNOWN) { if (root->cr_method == CVS_METHOD_LOCAL) ! cvs_printf("? %s\n", cf->cf_path); else ! cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); return (0); } ! entp = cvs_ent_getent(cf->cf_path); if (entp == NULL) return (-1); --- 156,177 ---- rf = NULL; if (cf->cf_parent != NULL) { repo = cf->cf_parent->cf_ddat->cd_repo; } else { repo = NULL; } if (cf->cf_cvstat == CVS_FST_UNKNOWN) { if (root->cr_method == CVS_METHOD_LOCAL) ! cvs_printf("? %s\n", fpath); else ! cvs_sendreq(root, CVS_REQ_QUESTIONABLE, ! CVS_FILE_NAME(cf)); return (0); } ! entp = cvs_ent_getent(fpath); if (entp == NULL) return (-1); *************** *** 182,192 **** if (root->cr_method != CVS_METHOD_LOCAL) { switch (cf->cf_cvstat) { case CVS_FST_UPTODATE: ! cvs_sendreq(root, CVS_REQ_UNCHANGED, cf->cf_name); break; case CVS_FST_ADDED: case CVS_FST_MODIFIED: ! cvs_sendreq(root, CVS_REQ_ISMODIFIED, cf->cf_name); break; default: return (-1); --- 184,195 ---- if (root->cr_method != CVS_METHOD_LOCAL) { switch (cf->cf_cvstat) { case CVS_FST_UPTODATE: ! cvs_sendreq(root, CVS_REQ_UNCHANGED, CVS_FILE_NAME(cf)); break; case CVS_FST_ADDED: case CVS_FST_MODIFIED: ! cvs_sendreq(root, CVS_REQ_ISMODIFIED, ! CVS_FILE_NAME(cf)); break; default: return (-1); *************** *** 196,205 **** return (0); } ! snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", ! root->cr_dir, repo, cf->cf_path, RCS_FILE_EXT); ! rf = rcs_open(rcspath, RCS_MODE_READ); if (rf == NULL) { cvs_ent_free(entp); return (-1); --- 199,208 ---- return (0); } ! snprintf(fpath, sizeof(fpath), "%s/%s/%s%s", ! root->cr_dir, repo, fpath, RCS_FILE_EXT); ! rf = rcs_open(fpath, RCS_MODE_READ); if (rf == NULL) { cvs_ent_free(entp); return (-1);