Merge rev 1.2 (extensions to the $CVSROOT/config syntax) and

rev 1.4 (1.12 CVSROOT/config keyword expansion forward compatability)
into version 1.11.22.
This commit is contained in:
obrien 2008-01-13 06:10:58 +00:00
parent 89cdc74185
commit 7575169e50

View File

@ -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.
@ -11,6 +16,7 @@
#include "cvs.h"
#include "getline.h"
#include <assert.h>
#include "history.h"
extern char *logHistory;
@ -42,6 +48,8 @@ Parse_Info (infofile, repository, callproc, all)
const char *srepos;
const char *regex_err;
assert (repository);
if (current_parsed_root == NULL)
{
/* XXX - should be error maybe? */
@ -272,8 +280,7 @@ parse_config (cvsroot)
value, currently at least. */
error (0, errno, "cannot open %s", infopath);
}
free (infopath);
return 0;
goto set_defaults_and_return;
}
while (getline (&line, &line_allocated, fp_info) >= 0)
@ -416,8 +423,8 @@ warning: this CVS does not support PreservePermissions");
{
if (strcmp (p, "all") != 0)
{
logHistory=xmalloc(strlen (p) + 1);
strcpy (logHistory, p);
if (logHistory) free (logHistory);
logHistory = xstrdup (p);
}
}
else if (strcmp (line, "RereadLogAfterVerify") == 0)
@ -467,12 +474,17 @@ warning: this CVS does not support PreservePermissions");
error (0, errno, "cannot close %s", infopath);
goto error_return;
}
set_defaults_and_return:
if (!logHistory)
logHistory = xstrdup (ALL_HISTORY_REC_TYPES);
free (infopath);
if (line != NULL)
free (line);
return 0;
error_return:
if (!logHistory)
logHistory = xstrdup (ALL_HISTORY_REC_TYPES);
if (infopath != NULL)
free (infopath);
if (line != NULL)