From d7d2cdb4e6bcff859ec757c6a79f9337d6689079 Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Fri, 15 Jul 2005 08:39:15 +0000 Subject: if a file has been locally added and not committed, handle it with proper warning message; --- usr.bin/cvs/getlog.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs/getlog.c') diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 69cc464beee..24771e8a7e8 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.38 2005/07/14 06:50:50 xsa Exp $ */ +/* $OpenBSD: getlog.c,v 1.39 2005/07/15 08:39:14 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -210,6 +210,15 @@ cvs_getlog_local(CVSFILE *cf, void *arg) struct rcs_delta *rdp; struct rcs_access *acp; + nrev = 0; + + if (cf->cf_cvstat == CVS_FST_ADDED) { + if (verbosity > 0) + cvs_log(LP_WARN, "%s has been added, but not committed", + cf->cf_name); + return (0); + } + if (cf->cf_cvstat == CVS_FST_UNKNOWN) { if (verbosity > 0) cvs_log(LP_WARN, "nothing known about %s", cf->cf_name); @@ -222,8 +231,6 @@ cvs_getlog_local(CVSFILE *cf, void *arg) return (0); } - nrev = 0; - if (cvs_rcs_getpath(cf, rcspath, sizeof(rcspath)) == NULL) return (CVS_EX_DATA); -- cgit v1.2.3