[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog entries.c [cvs1-11-x-branch]
From: |
Larry Jones |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog entries.c [cvs1-11-x-branch] |
Date: |
Wed, 19 Nov 2008 21:47:59 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch: cvs1-11-x-branch
Changes by: Larry Jones <scjones> 08/11/19 21:47:59
Modified files:
src : ChangeLog entries.c
Log message:
* entries.c (WriteTag): Remove any exiting file and recreate
rather than trying to overwrite (to avoid permission problems).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.2336.2.513&r2=1.2336.2.514
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/entries.c?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.46.6.7&r2=1.46.6.8
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.513
retrieving revision 1.2336.2.514
diff -u -b -r1.2336.2.513 -r1.2336.2.514
--- ChangeLog 19 Nov 2008 19:42:11 -0000 1.2336.2.513
+++ ChangeLog 19 Nov 2008 21:47:58 -0000 1.2336.2.514
@@ -1,5 +1,8 @@
2008-11-19 Larry Jones <address@hidden>
+ * entries.c (WriteTag): Remove any exiting file and recreate
+ rather than trying to overwrite (to avoid permission problems).
+
* sanity.sh (keyword-25): Protect keywords against accidental
expansion in sanity.sh itself.
Index: entries.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/entries.c,v
retrieving revision 1.46.6.7
retrieving revision 1.46.6.8
diff -u -b -r1.46.6.7 -r1.46.6.8
--- entries.c 7 May 2008 15:34:14 -0000 1.46.6.7
+++ entries.c 19 Nov 2008 21:47:59 -0000 1.46.6.8
@@ -670,22 +670,17 @@
else
(void) sprintf (tmp, "%s/%s", dir, CVSADM_TAG);
+ if (unlink_file (tmp) < 0 && ! existence_error (errno))
+ error (1, errno, "cannot remove %s", tmp);
+
if (tag || date)
{
- fout = open_file (tmp, "w+");
+ fout = open_file (tmp, "w");
if (tag)
{
- if (nonbranch)
- {
- if (fprintf (fout, "N%s\n", tag) < 0)
- error (1, errno, "write to %s failed", tmp);
- }
- else
- {
- if (fprintf (fout, "T%s\n", tag) < 0)
+ if (fprintf (fout, "%c%s\n", nonbranch ? 'N' : 'T', tag) < 0)
error (1, errno, "write to %s failed", tmp);
}
- }
else
{
if (fprintf (fout, "D%s\n", date) < 0)
@@ -694,9 +689,6 @@
if (fclose (fout) == EOF)
error (1, errno, "cannot close %s", tmp);
}
- else
- if (unlink_file (tmp) < 0 && ! existence_error (errno))
- error (1, errno, "cannot remove %s", tmp);
free (tmp);
#ifdef SERVER_SUPPORT
if (server_active)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog entries.c [cvs1-11-x-branch],
Larry Jones <=