diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-03-28 07:42:57 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-03-28 07:42:57 +0000 |
commit | 11354a5e78bf8c9a79066ef026c41d53c575c147 (patch) | |
tree | cc0c29000f5f0d8fb131a33e1e47921cf391a71c | |
parent | df79e8f9180701a3da97251ad4b4e53c2c225595 (diff) |
Finally. Basically, rcs_parse_delta() doesn't understand that
sometimes there are no revisions, and that it is not an error. This
makes it so that if rcs_parse_delta is called and the only thing
that is found is the description, we know that there are no more
revisions.
Fixes ``rcs -i file; rlog file''.
OK xsa@
-rw-r--r-- | usr.bin/cvs/rcs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 179535860c6..bca3180d550 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.153 2006/03/28 02:13:44 ray Exp $ */ +/* $OpenBSD: rcs.c,v 1.154 2006/03/28 07:42:56 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1789,7 +1789,10 @@ rcs_parse_delta(RCSFILE *rfp) TAILQ_INIT(&(rdp->rd_snodes)); tok = rcs_gettok(rfp); - if (tok != RCS_TOK_NUM) { + if (tok == RCS_TOK_DESC) { + rcs_pushtok(rfp, RCS_TOKSTR(rfp), tok); + return (0); + } else if (tok != RCS_TOK_NUM) { rcs_errno = RCS_ERR_PARSE; cvs_log(LP_ERR, "unexpected token `%s' at start of delta", RCS_TOKSTR(rfp)); |