From 62312420a7cfa64b182013552ade2bf59cf4bfa2 Mon Sep 17 00:00:00 2001 From: joris Date: Sun, 10 Feb 2008 13:07:58 +0000 Subject: do not allow commits to files that have a sticky date set --- 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 48116852fcc..b8a181bc80d 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.127 2008/02/04 22:36:40 joris Exp $ */ +/* $OpenBSD: commit.c,v 1.128 2008/02/10 13:07:58 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria @@ -215,6 +215,13 @@ cvs_commit_check_files(struct cvs_file *cf) return; } + if (cf->file_ent != NULL && cf->file_ent->ce_date != -1) { + cvs_log(LP_ERR, "conflict: cannot commit to sticky date for %s", + cf->file_path); + conflicts_found++; + return; + } + if (current_cvsroot->cr_method == CVS_METHOD_LOCAL) { tag = cvs_directory_tag; if (cf->file_ent != NULL) -- cgit v1.2.3-59-g8ed1b