From d83f21246935bfa2da8280ce9cc845c79eb78a01 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sun, 28 May 2006 21:11:13 +0000 Subject: add basic 'cvs log' support. --- usr.bin/cvs/file.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/file.c') diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 1b16d080c7e..1d0b4b3cfa8 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.146 2006/05/28 17:25:18 joris Exp $ */ +/* $OpenBSD: file.c,v 1.147 2006/05/28 21:11:12 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -599,7 +599,16 @@ cvs_file_classify(struct cvs_file *cf, int loud) return; } - rflags = 0; + rflags = RCS_READ; + switch (cvs_cmdop) { + case CVS_OP_COMMIT: + rflags = RCS_WRITE; + break; + case CVS_OP_LOG: + rflags |= RCS_PARSE_FULLY; + break; + } + cf->repo_fd = open(cf->file_rpath, O_RDONLY); if (cf->repo_fd != -1) { cf->file_rcs = rcs_open(cf->file_rpath, cf->repo_fd, rflags); -- cgit v1.2.3