summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/release.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/release.c')
-rw-r--r--contrib/cvs/src/release.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/contrib/cvs/src/release.c b/contrib/cvs/src/release.c
index 2d8c72c..27a16c0 100644
--- a/contrib/cvs/src/release.c
+++ b/contrib/cvs/src/release.c
@@ -1,4 +1,18 @@
/*
+ * Copyright (C) 1994-2005 The Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/*
* Release: "cancel" a checkout in the history log.
*
* - Enter a line in the history log indicating the "release". - If asked to,
@@ -67,7 +81,6 @@ release (argc, argv)
{
FILE *fp;
int i, c;
- char *repository;
char *line = NULL;
size_t line_allocated = 0;
char *update_cmd;
@@ -124,8 +137,12 @@ release (argc, argv)
+ 1 + 3 + 3 + 16 + 1);
sprintf (update_cmd, "%s %s%s-n -q -d %s update",
program_path,
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
cvsauthenticate ? "-a " : "",
cvsencrypt ? "-x " : "",
+#else
+ "", "",
+#endif
current_parsed_root->original);
#ifdef CLIENT_SUPPORT
@@ -173,11 +190,9 @@ release (argc, argv)
continue;
}
- repository = Name_Repository ((char *) NULL, (char *) NULL);
-
if (!really_quiet)
{
- int line_length;
+ int line_length, status;
/* The "release" command piggybacks on "update", which
does the real work of finding out if anything is not
@@ -204,10 +219,10 @@ release (argc, argv)
complain and go on to the next arg. Especially, we do
not want to delete the local copy, since it's obviously
not what the user thinks it is. */
- if ((pclose (fp)) != 0)
+ status = pclose (fp);
+ if (status != 0)
{
- error (0, 0, "unable to release `%s'", thisarg);
- free (repository);
+ error (0, 0, "unable to release `%s' (%d)", thisarg, status);
if (restore_cwd (&cwd, NULL))
error_exit ();
continue;
@@ -222,7 +237,6 @@ release (argc, argv)
{
(void) fprintf (stderr, "** `%s' aborted by user choice.\n",
cvs_cmd_name);
- free (repository);
if (restore_cwd (&cwd, NULL))
error_exit ();
continue;
@@ -236,9 +250,8 @@ release (argc, argv)
CVS/Entries file in the wrong directory. See release-17
through release-23. */
- free (repository);
if (restore_cwd (&cwd, NULL))
- exit (EXIT_FAILURE);
+ error_exit ();
if (1
#ifdef CLIENT_SUPPORT
@@ -255,7 +268,7 @@ release (argc, argv)
argv[2] = NULL;
err += unedit (argc, argv);
if (restore_cwd (&cwd, NULL))
- exit (EXIT_FAILURE);
+ error_exit ();
}
#ifdef CLIENT_SUPPORT
@@ -293,7 +306,7 @@ release (argc, argv)
err += get_server_responses ();
if (restore_cwd (&cwd, NULL))
- exit (EXIT_FAILURE);
+ error_exit ();
}
#endif /* CLIENT_SUPPORT */
}
OpenPOWER on IntegriCloud