=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/commit.c,v retrieving revision 1.141 retrieving revision 1.142 diff -c -r1.141 -r1.142 *** src/usr.bin/cvs/commit.c 2008/06/14 03:19:15 1.141 --- src/usr.bin/cvs/commit.c 2008/06/14 04:34:08 1.142 *************** *** 1,4 **** ! /* $OpenBSD: commit.c,v 1.141 2008/06/14 03:19:15 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: commit.c,v 1.142 2008/06/14 04:34:08 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria *************** *** 472,479 **** rrev = rcs_head_get(cf->file_rcs); crev = rcs_head_get(cf->file_rcs); if (crev == NULL || rrev == NULL) ! fatal("RCS head empty or missing in %s\n", ! cf->file_rcs->rf_path); tag = cvs_directory_tag; if (cf->file_ent != NULL && cf->file_ent->ce_tag != NULL) --- 472,479 ---- rrev = rcs_head_get(cf->file_rcs); crev = rcs_head_get(cf->file_rcs); if (crev == NULL || rrev == NULL) ! fatal("no head revision in RCS file for %s", ! cf->file_path); tag = cvs_directory_tag; if (cf->file_ent != NULL && cf->file_ent->ce_tag != NULL) *************** *** 570,575 **** --- 570,578 ---- cvs_printf("%s <- %s\n", cf->file_rpath, cf->file_path); cvs_printf("old revision: %s; ", rbuf); } + + if (isnew == 0 && cf->file_rcs->rf_head == NULL) + fatal("no head revision in RCS file for %s", cf->file_path); if (isnew == 0 && onbranch == 0) d = commit_diff(cf, cf->file_rcs->rf_head, 0);