From bb02993716ad42bd207d749bbca5daefffd99503 Mon Sep 17 00:00:00 2001 From: jfb Date: Mon, 18 Apr 2005 21:02:49 +0000 Subject: Modify the CVSFILE structure using a union to keep information about both files and directories. We can now keep the revision number for regular files, and don't need to fetch the appropriate entry in the command callbacks. This saves a huge amount of parsing on Entries files. ok joris@ --- usr.bin/cvs/annotate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'usr.bin/cvs/annotate.c') diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index deb225b43f2..2562ae21292 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.10 2005/04/13 20:05:37 jfb Exp $ */ +/* $OpenBSD: annotate.c,v 1.11 2005/04/18 21:02:49 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -131,7 +131,6 @@ cvs_annotate_file(CVSFILE *cf, void *arg) int ret; char fpath[MAXPATHLEN]; struct cvsroot *root; - struct cvs_ent *entp; ret = 0; root = CVS_DIR_ROOT(cf); @@ -149,11 +148,9 @@ cvs_annotate_file(CVSFILE *cf, void *arg) } cvs_file_getpath(cf, fpath, sizeof(fpath)); - entp = cvs_ent_getent(fpath); if (root->cr_method != CVS_METHOD_LOCAL) { - if ((entp != NULL) && (cvs_sendentry(root, entp) < 0)) { - cvs_ent_free(entp); + if (cvs_sendentry(root, cf) < 0) { return (CVS_EX_PROTO); } @@ -181,7 +178,5 @@ cvs_annotate_file(CVSFILE *cf, void *arg) } } - if (entp != NULL) - cvs_ent_free(entp); return (ret); } -- cgit v1.2.3-59-g8ed1b