diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-05-28 21:11:13 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-05-28 21:11:13 +0000 |
commit | d83f21246935bfa2da8280ce9cc845c79eb78a01 (patch) | |
tree | fd19554cb1b77de631c594c87fa8f218f18d4c9e /usr.bin/cvs/file.c | |
parent | 99661afd38faa75dbd974bd3883d6e6f31ff5fcc (diff) |
add basic 'cvs log' support.
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 13 |
1 files changed, 11 insertions, 2 deletions
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 <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -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); |