diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-05-28 21:35:59 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-05-28 21:35:59 +0000 |
commit | f79baba3b85c9dc657ace83580690bbc0cf6f157 (patch) | |
tree | 4888e35074d05afe8668dfbd0939306428dc3eb2 | |
parent | 296716bcd389c354c305434ffad4526c937f984f (diff) |
teach log how to handle the revisions passed on the command line.
the following now works:
'opencvs log -r1.5:1.15 foobar'
-rw-r--r-- | usr.bin/cvs/getlog.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 2c52bd69a0e..7d9a4563b14 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.57 2006/05/28 21:11:12 joris Exp $ */ +/* $OpenBSD: getlog.c,v 1.58 2006/05/28 21:35:58 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -143,7 +143,7 @@ cvs_log_local(struct cvs_file *cf) printf("total revisions: %u", cf->file_rcs->rf_ndelta); if (logrev != NULL) - nrev = 1; + nrev = cvs_revision_select(cf->file_rcs, logrev); else nrev = cf->file_rcs->rf_ndelta; @@ -152,14 +152,13 @@ cvs_log_local(struct cvs_file *cf) printf("description:\n%s", cf->file_rcs->rf_desc); TAILQ_FOREACH(rdp, &(cf->file_rcs->rf_delta), rd_list) { - rcsnum_tostr(rdp->rd_num, numb, sizeof(numb)); - if (logrev != NULL && - strcmp(logrev, numb)) + !(rdp->rd_flags & RCS_RD_SELECT)) continue; printf("%s\n", LOG_REVSEP); + rcsnum_tostr(rdp->rd_num, numb, sizeof(numb)); printf("revision %s", numb); strftime(timeb, sizeof(timeb), "%Y/%m/%d %H:%M:%S", |