summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/edit.c')
-rw-r--r--contrib/cvs/src/edit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/cvs/src/edit.c b/contrib/cvs/src/edit.c
index 6c6f040..aa0f4c4 100644
--- a/contrib/cvs/src/edit.c
+++ b/contrib/cvs/src/edit.c
@@ -521,6 +521,26 @@ unedit_fileproc (callerdat, finfo)
if (node != NULL)
{
entdata = (Entnode *) node->data;
+ if (baserev == NULL)
+ {
+ /* This can only happen if the CVS/Baserev file got
+ corrupted. We suspect it might be possible if the
+ user interrupts CVS, although I haven't verified
+ that. */
+ error (0, 0, "%s not mentioned in %s", finfo->fullname,
+ CVSADM_BASEREV);
+
+ /* Since we don't know what revision the file derives from,
+ keeping it around would be asking for trouble. */
+ if (unlink_file (finfo->file) < 0)
+ error (0, errno, "cannot remove %s", finfo->fullname);
+
+ /* This is cheesy, in a sense; why shouldn't we do the
+ update for the user? However, doing that would require
+ contacting the server, so maybe this is OK. */
+ error (0, 0, "run update to complete the unedit");
+ return 0;
+ }
Register (finfo->entries, finfo->file, baserev, entdata->timestamp,
entdata->options, entdata->tag, entdata->date,
entdata->conflict);
OpenPOWER on IntegriCloud