summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-15 08:39:15 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-15 08:39:15 +0000
commitd7d2cdb4e6bcff859ec757c6a79f9337d6689079 (patch)
tree4799cbf5f885147f21ee8912e44166d80c31dea9
parent9cb46ce18d3f9630105c0c43b004fb3412511091 (diff)
if a file has been locally added and not committed, handle it with proper
warning message;
-rw-r--r--usr.bin/cvs/getlog.c13
1 files changed, 10 insertions, 3 deletions
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 <jfb@openbsd.org>
* 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);