=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/ci.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- src/usr.bin/rcs/ci.c 2006/02/16 16:43:45 1.96 +++ src/usr.bin/rcs/ci.c 2006/02/16 17:30:46 1.97 @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.96 2006/02/16 16:43:45 niallo Exp $ */ +/* $OpenBSD: ci.c,v 1.97 2006/02/16 17:30:46 niallo Exp $ */ /* * Copyright (c) 2005 Niall O'Higgins * All rights reserved. @@ -582,10 +582,18 @@ } rcs_desc_set(pb->file, rcs_desc); + /* + * Set the date of the revision to be the last modification + * time of the working file if -d has no argument. + */ + if (pb->date == DATE_MTIME + && (checkin_mtimedate(pb) < 0)) + return (-1); + /* Now add our new revision */ if (rcs_rev_add(pb->file, (pb->newrev == NULL ? RCS_HEAD_REV : pb->newrev), - LOG_INIT, -1, pb->author) != 0) { + LOG_INIT, pb->date, pb->author) != 0) { cvs_log(LP_ERR, "failed to add new revision"); return (-1); }