summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/edit.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-03-18 09:21:42 +0000
committerpeter <peter@FreeBSD.org>1999-03-18 09:21:42 +0000
commit308b60f66831aa65a459a7b347ea6ca14b6e4799 (patch)
tree1b2cd3bad90a2dd8ccb449f73ddfb9e295c0737d /contrib/cvs/src/edit.c
parent0c111e2b51cac7eead56494b30c5977e4ec9a8ea (diff)
downloadFreeBSD-src-308b60f66831aa65a459a7b347ea6ca14b6e4799.zip
FreeBSD-src-308b60f66831aa65a459a7b347ea6ca14b6e4799.tar.gz
Import cvs-1.10 onto vendor branch. Merge to follow shortly.
Obtained from: cyclic.com
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