=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/ci.c,v retrieving revision 1.141 retrieving revision 1.142 diff -u -r1.141 -r1.142 --- src/usr.bin/rcs/ci.c 2006/04/13 00:58:25 1.141 +++ src/usr.bin/rcs/ci.c 2006/04/13 03:18:06 1.142 @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.141 2006/04/13 00:58:25 ray Exp $ */ +/* $OpenBSD: ci.c,v 1.142 2006/04/13 03:18:06 joris Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins * All rights reserved. @@ -281,6 +281,12 @@ NULL) fatal("invalid revision: %s", rev_str); + /* XXX - support for commiting to a file without revisions */ + if (pb.file->rf_ndelta == 0) { + pb.flags |= NEWFILE; + pb.file->rf_flags |= RCS_CREATE; + } + if (pb.flags & NEWFILE) status = checkin_init(&pb); else @@ -661,6 +667,9 @@ checkin_keywordscan(filec, &pb->newrev, &pb->date, &pb->state, &pb->author); + if (pb->file->rf_ndelta == 0) + goto skipdesc; + /* Get description from user */ if (pb->description == NULL) rcs_desc = (const char *)checkin_getdesc(); @@ -681,6 +690,8 @@ } } rcs_desc_set(pb->file, rcs_desc); + +skipdesc: /* * If the user had specified a zero-ending revision number e.g. 4