From 56f996a25db7a342802e62d08ce5f37fa6d19ea3 Mon Sep 17 00:00:00 2001 From: xsa Date: Fri, 26 Jan 2007 21:48:16 +0000 Subject: - support [-k mode] for the add command - do not let the file keyword expension options (-k) disappear from the Entries file when doing a commit/update/checkout - be sure the expension mode gets written to the RCS file when a file is added/committed in the first place problems raised by otto@; tests/ok otto@ and joris@. --- usr.bin/cvs/commit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs/commit.c') diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index eb7b6e2f635..0b929a28371 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.100 2007/01/25 18:56:33 otto Exp $ */ +/* $OpenBSD: commit.c,v 1.101 2007/01/26 21:48:17 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria @@ -321,6 +321,13 @@ cvs_commit_local(struct cvs_file *cf) cf->file_rcs->rf_branch = NULL; } + if (cf->file_status == FILE_ADDED && cf->file_ent->ce_opts != NULL) { + int kflag; + + kflag = rcs_kflag_get(cf->file_ent->ce_opts + 2); + rcs_kwexp_set(cf->file_rcs, kflag); + } + rcs_write(cf->file_rcs); if (cf->file_status == FILE_REMOVED) { -- cgit v1.2.3-59-g8ed1b