forked from Lainports/freebsd-ports
came to the fore in checkout mode when a file "files,v" in the repository was manually changed into a directory "files". With this patch, CVSup will still complain that it cannot delete "files" because the directory is not empty. However, it is now a warning rather than a fatal error, and the update will run to completion. The warning will happen only once. After emitting the warning, CVSup will fix the damage in the checkouts file to eliminate the problem. On subsequent updates everything will be OK and no more warnings will occur. I have bumped PORTREVISION to 1, and added "p1" to the end of the version number printed by CVSup. PR: misc/27495
51 lines
1.6 KiB
Text
51 lines
1.6 KiB
Text
Index: client/src/Updater.m3
|
|
===================================================================
|
|
RCS file: /home/cvsupcvs/cvsup/client/src/Updater.m3,v
|
|
retrieving revision 1.91
|
|
diff -u -r1.91 Updater.m3
|
|
--- client/src/Updater.m3 1999/08/13 19:51:29 1.91
|
|
+++ client/src/Updater.m3 2001/05/26 23:11:39
|
|
@@ -712,7 +712,7 @@
|
|
IF SupFileRec.Option.KeepBadFiles IN sfr.options THEN
|
|
Warn(self, "Bad version saved in " & tempPath);
|
|
ELSE
|
|
- DeleteFile(tempPath);
|
|
+ DeleteFile(self, tempPath);
|
|
END;
|
|
END;
|
|
END UpdateFile;
|
|
@@ -1188,7 +1188,7 @@
|
|
IF NOT SupFileRec.Option.CheckoutMode IN sfr.options THEN
|
|
(* Try the attic. *)
|
|
WITH atticName = SupMisc.AtticName(destPath) DO
|
|
- DeleteFile(atticName);
|
|
+ DeleteFile(self, atticName);
|
|
(* We always delete the Attic directory when it becomes empty.
|
|
FIXME - Is that the right thing to do?. *)
|
|
TRY
|
|
@@ -1196,7 +1196,7 @@
|
|
EXCEPT OSError.E => (* Ignore. *) END;
|
|
END;
|
|
END;
|
|
- DeleteFile(destPath);
|
|
+ DeleteFile(self, destPath);
|
|
IF SupFileRec.Option.CheckoutMode IN sfr.options
|
|
OR NOT self.proto.v.dirsAreExplicit THEN
|
|
(* Delete the directory automatically if it is now empty. *)
|
|
@@ -1231,14 +1231,13 @@
|
|
END;
|
|
END MakeDirectories;
|
|
|
|
-PROCEDURE DeleteFile(path: Pathname.T)
|
|
- RAISES {Error} =
|
|
+PROCEDURE DeleteFile(self: T; path: Pathname.T) =
|
|
BEGIN
|
|
TRY
|
|
FileAttr.Delete(path);
|
|
EXCEPT OSError.E(l) =>
|
|
IF l.head # EnoentAtom THEN
|
|
- RAISE Error("Cannot delete \"" & path & "\": " &
|
|
+ Warn(self, "Cannot delete \"" & path & "\": " &
|
|
ErrMsg.StrError(l));
|
|
END;
|
|
END;
|