summaryrefslogtreecommitdiffstats
path: root/contrib/cvs
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-01-13 06:09:41 +0000
committerobrien <obrien@FreeBSD.org>2008-01-13 06:09:41 +0000
commit8981de8610656b8476315defa8a082640b08616a (patch)
tree8cec84a0ae5b5d7f84a089b0ca2729ff706bf17f /contrib/cvs
parentc2c220d2287f537efe209dcc2473c004f88ea2e6 (diff)
downloadFreeBSD-src-8981de8610656b8476315defa8a082640b08616a.zip
FreeBSD-src-8981de8610656b8476315defa8a082640b08616a.tar.gz
Merge rev 1.9 (put the blank line back in the beginning of constructed
log messages being passed to $EDITOR) into version 1.11.22.
Diffstat (limited to 'contrib/cvs')
-rw-r--r--contrib/cvs/src/logmsg.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/contrib/cvs/src/logmsg.c b/contrib/cvs/src/logmsg.c
index fbbcc3c..6878aaf 100644
--- a/contrib/cvs/src/logmsg.c
+++ b/contrib/cvs/src/logmsg.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -198,11 +203,7 @@ do_editor (dir, messagep, repository, changes)
struct stat pre_stbuf, post_stbuf;
int retcode = 0;
-#ifdef CLIENT_SUPPORT
assert (!current_parsed_root->isremote != !repository);
-#else
- assert (repository);
-#endif
if (noexec || reuse_log_message)
return;
@@ -294,12 +295,7 @@ do_editor (dir, messagep, repository, changes)
if (editinfo_editor)
free (editinfo_editor);
editinfo_editor = (char *) NULL;
-#ifdef CLIENT_SUPPORT
- if (current_parsed_root->isremote)
- ; /* nothing, leave editinfo_editor NULL */
- else
-#endif
- if (repository != NULL)
+ if (!current_parsed_root->isremote && repository != NULL)
(void) Parse_Info (CVSROOTADM_EDITINFO, repository, editinfo_proc, 0);
/* run the editor */
@@ -426,11 +422,9 @@ do_verify (messagep, repository)
struct stat pre_stbuf, post_stbuf;
-#ifdef CLIENT_SUPPORT
if (current_parsed_root->isremote)
/* The verification will happen on the server. */
return;
-#endif
/* FIXME? Do we really want to skip this on noexec? What do we do
for the other administrative files? */
@@ -449,7 +443,8 @@ do_verify (messagep, repository)
temp file, and close the file. */
if ((fp = cvs_temp_file (&fname)) == NULL)
- error (1, errno, "cannot create temporary file %s", fname);
+ error (1, errno, "cannot create temporary file %s",
+ fname ? fname : "(null)");
if (*messagep != NULL)
fputs (*messagep, fp);
@@ -555,7 +550,7 @@ do_verify (messagep, repository)
if (unlink_file (fname) < 0)
error (0, errno, "cannot remove %s", fname);
free (fname);
- free( verifymsg_script );
+ free (verifymsg_script);
verifymsg_script = NULL;
}
@@ -751,6 +746,8 @@ logfile_write (repository, filter, message, logfp, changes)
char *fmt_percent; /* the location of the percent sign
that starts the format string. */
+ assert (repository);
+
/* The user may specify a format string as part of the filter.
Originally, `%s' was the only valid string. The string that
was substituted for it was:
OpenPOWER on IntegriCloud