[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog sanity.sh update.c
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog sanity.sh update.c |
Date: |
Fri, 01 Feb 2008 19:35:21 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/02/01 19:35:21
Modified files:
src : ChangeLog sanity.sh update.c
Log message:
Merge changes from 1.11.x.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3559&r2=1.3560
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1193&r2=1.1194
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/update.c?cvsroot=cvs&r1=1.278&r2=1.279
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3559
retrieving revision 1.3560
diff -u -b -r1.3559 -r1.3560
--- ChangeLog 30 Jan 2008 16:49:55 -0000 1.3559
+++ ChangeLog 1 Feb 2008 19:35:20 -0000 1.3560
@@ -1,3 +1,10 @@
+2008-01-30 Derek R. Price <address@hidden>
+
+ * update.c (join_file): Use local copy to detect deletion conflicts,
+ as opposed to the base revision. Restore freeing of rev2 to its
+ original location. Use simpler conflict message.
+ * sanity.sh: Update to compensate.
+
2008-01-29 Derek R. Price <address@hidden>
Paul Edwards <address@hidden>
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1193
retrieving revision 1.1194
diff -u -b -r1.1193 -r1.1194
--- sanity.sh 30 Jan 2008 16:49:55 -0000 1.1193
+++ sanity.sh 1 Feb 2008 19:35:20 -0000 1.1194
@@ -6719,7 +6719,7 @@
# and join
dotest death-95 "$testcvs -q update -j HEAD" \
-"$SPROG update: file \`file1' is modified since GCA (1\.3), but has been
removed in revision HEAD
+"$SPROG update: file \`file1' has been removed in revision HEAD, but the
destination is incompatibly modified
C file1
$SPROG update: file file3 exists, but has been added in revision HEAD"
@@ -11103,7 +11103,7 @@
U first-dir/file3
$SPROG checkout: scheduling \`first-dir/file3' for removal
U first-dir/file4
-$SPROG checkout: file \`first-dir/file4' is modified since GCA (1\.1), but has
been removed in revision T2
+$SPROG checkout: file \`first-dir/file4' has been removed in revision T2, but
the destination is incompatibly modified
C first-dir/file4
U first-dir/file7
$SPROG checkout: file first-dir/file9 does not exist, but is present in
revision T2"
@@ -11123,7 +11123,7 @@
$SPROG update: file file2 exists, but has been added in revision T2
$SPROG update: scheduling \`file3' for removal
M file4
-$SPROG update: file \`file4' is locally modified, but has been removed in
revision T2
+$SPROG update: file \`file4' has been removed in revision T2, but the
destination is incompatibly modified
C file4
$SPROG update: file file9 does not exist, but is present in revision T2"
@@ -11154,7 +11154,7 @@
U first-dir/file3
$SPROG checkout: scheduling \`first-dir/file3' for removal
U first-dir/file4
-$SPROG checkout: file \`first-dir/file4' is modified since GCA (1\.1), but has
been removed in revision branch
+$SPROG checkout: file \`first-dir/file4' has been removed in revision branch,
but the destination is incompatibly modified
C first-dir/file4
U first-dir/file7
$SPROG checkout: file first-dir/file9 does not exist, but is present in
revision branch"
@@ -11188,7 +11188,7 @@
M file2
$SPROG update: scheduling \`file3' for removal
M file4
-$SPROG update: file \`file4' is locally modified, but has been removed in
revision branch
+$SPROG update: file \`file4' has been removed in revision branch, but the
destination is incompatibly modified
C file4
$SPROG update: file file9 does not exist, but is present in revision branch"
@@ -11229,7 +11229,7 @@
$SPROG update: Replacing \`file2' with contents of revision 1\.1\.2\.2\.
M file2
$SPROG update: scheduling \`file3' for removal
-$SPROG update: file \`file4' is modified since GCA (1\.1), but has been
removed in revision branch
+$SPROG update: file \`file4' has been removed in revision branch, but the
destination is incompatibly modified
C file4
$SPROG update: scheduling addition from revision 1\.1 of \`file8'\.
$SPROG update: scheduling addition from revision 1\.1\.2\.2 of \`file9'\."
@@ -11265,7 +11265,7 @@
U file3
$SPROG update: scheduling \`file3' for removal
U file4
-$SPROG update: file \`file4' is modified since GCA (1\.1), but has been
removed in revision branch
+$SPROG update: file \`file4' has been removed in revision branch, but the
destination is incompatibly modified
C file4
U file7
$SPROG update: \`file8' is no longer in the repository
@@ -11707,7 +11707,7 @@
$SPROG update: file file2 exists, but has been added in revision T2
$SPROG update: scheduling \`file3' for removal
M file4
-$SPROG update: file \`file4' is locally modified, but has been removed in
revision T2
+$SPROG update: file \`file4' has been removed in revision T2, but the
destination is incompatibly modified
C file4
R file6
A file7
@@ -12007,10 +12007,20 @@
"$testcvs checkout -r pvcs-1 -j base-1 -j project-1 -d combine join8" \
"$SPROG checkout: Updating combine
U combine/file\.txt
-$SPROG checkout: file \`combine/file\.txt' is modified since GCA (1\.1), but
has been removed in revision project-1
+$SPROG checkout: file \`combine/file\.txt' has been removed in revision
project-1, but the destination is incompatibly modified
C combine/file.txt
$SPROG checkout: scheduling addition from revision 1\.1\.301\.1 of
\`combine/xxx\.txt'\."
+ dotest join8-5 \
+"$testcvs -Q up -pr base-1 combine/file.txt >combine/file.txt"
+
+ dotest join8-6 \
+"$testcvs up -j base-1 -j project-1 combine" \
+"$SPROG update: Updating combine
+M combine/file\.txt
+$SPROG update: scheduling \`combine/file\.txt' for removal
+A combine/xxx\.txt
+$SPROG update: file combine/xxx\.txt exists, but has been added in revision
project-1"
cd ..
dokeep
rm -rf join8
Index: update.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/update.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -b -r1.278 -r1.279
--- update.c 30 Jan 2008 16:49:55 -0000 1.278
+++ update.c 1 Feb 2008 19:35:21 -0000 1.279
@@ -2144,7 +2144,9 @@
{
char *mrev;
short conflict = 0;
- char *modmsg = NULL;
+
+ if (rev2 != NULL)
+ free (rev2);
/* If the first revision doesn't exist either, then there is
no change between the two revisions, so we don't do
@@ -2153,8 +2155,6 @@
{
if (rev1 != NULL)
free (rev1);
- if (rev2 != NULL)
- free (rev2);
return;
}
@@ -2195,8 +2195,6 @@
|| RCS_isdead (vers->srcfile, vers->vn_user))
{
free (rev1);
- if (rev2 != NULL)
- free (rev2);
return;
}
@@ -2205,14 +2203,13 @@
resolve. No_Difference will already have been called in
this case, so comparing the timestamps is sufficient to
determine whether the file is locally modified. */
- if (/* added */ STREQ (vers->vn_user, "0")
+ if (/* may have changed on destination branch */
+ /* file added locally */
+ STREQ (vers->vn_user, "0")
+ || /* destination branch modified in repository */
+ !STREQ (rev1, vers->vn_user)
|| /* locally modified */
vers->ts_user && !STREQ (vers->ts_user, vers->ts_rcs))
- conflict = 1;
-
- if (!conflict
- && /* may have changed */
- strcmp (rev1, vers->vn_user))
{
/* The removal should happen if either the file has never changed
* on the destination or the file has changed to be identical to
@@ -2231,45 +2228,51 @@
* if D == R removal should happen
* otherwise, fail.
*
- * (In the source, J2 = REV2, D = VN_USER, R = GCA computed below)
+ * (In the source, J2 = REV2, D = user file (potentially VN_USER),
+ * R = GCA computed below)
*/
char *gca_rev1 = gca (rev1, vers->vn_user);
+#ifdef SERVER_SUPPORT
+ if (server_active && !isreadable (finfo->file))
+ {
+ int retcode;
+ /* The file is up to date. Need to check out the current
+ * contents.
+ */
+ /* FIXME - see the FIXME comment above the call to RCS_checkout
+ * in the patch_file function.
+ */
+ retcode = RCS_checkout (vers->srcfile, finfo->file,
+ vers->vn_user, vers->tag,
+ NULL, RUN_TTY, NULL, NULL);
+ if (retcode)
+ error (1, 0,
+ "failed to check out %s file", finfo->fullname);
+ }
+#endif
if (/* genuinely changed on destination branch */
RCS_cmp_file (vers->srcfile, NULL, gca_rev1, NULL,
- vers->vn_user, vers->options, finfo->file)
+ NULL, vers->options, finfo->file)
&& /* genuinely different from REV1 */
RCS_cmp_file (vers->srcfile, jrev1, rev1, NULL,
- vers->vn_user, vers->options, finfo->file))
- {
+ NULL, vers->options, finfo->file))
conflict = 1;
- modmsg = xmalloc (14 + strlen (gca_rev1));
- sprintf (modmsg, " since GCA (%s)", gca_rev1);
- }
}
+ free (rev1);
+
if (conflict)
{
- const char *locally;
char *cp, *brmsg;
- if (!modmsg)
- modmsg = xstrdup ("");
-
- if (/* added */ !strcmp (vers->vn_user, "0")
- || /* locally modified */
- vers->ts_user && strcmp (vers->ts_user, vers->ts_rcs))
- locally = " locally";
- else
- locally = "";
-
if (jdate2)
brmsg = Xasprintf (" as of %s", jdate2);
else
brmsg = xstrdup ("");
error (0, 0,
- "file %s is%s modified%s, but has been removed in revision
%s%s",
- quote (finfo->fullname), locally, modmsg, jrev2, brmsg);
+ "file %s has been removed in revision %s%s, but the
destination is incompatibly modified",
+ quote (finfo->fullname), jrev2, brmsg);
/* FIXME: vers->ts_user should always be set here but sometimes
* isn't, namely when checkout_file() has just created the file,
@@ -2297,18 +2300,9 @@
#endif
free (brmsg);
- free (modmsg);
- free (rev1);
- if (rev2)
- free (rev2);
-
return;
}
- free (rev1);
- if (rev2 != NULL)
- free (rev2);
-
/* The user file exists and has not been modified. Mark it
for removal. FIXME: If we are doing a checkout, this has
the effect of first checking out the file, and then
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh update.c,
Derek Robert Price <=