summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-03-05 14:23:08 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-03-05 14:23:08 +0000
commitbe9b50319381ef4a0d73fa9de5e54198ea2d85e2 (patch)
tree3fef1a304108f86d78e1d905da2c9a87d0a656dc
parentafc36b528a76a72f9ff4fdbacbc8da63a938a0f0 (diff)
now that rcs_getrev() isn't doing keyword expansion anymore and rcsdiff(1)
expects to be comparing files with expanded keywords, we need to add a couple of calls to rcs_kwexp_buf() to rcsdiff.c. two minor output fixes in this diff also. ok xsa@ eyeballed by Rai Lai
-rw-r--r--usr.bin/rcs/rcsdiff.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 2cf672e1ba5..718ece0e6ab 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.30 2006/01/05 10:28:24 xsa Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.31 2006/03/05 14:23:07 niallo Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -182,9 +182,10 @@ rcsdiff_file(RCSFILE *file, RCSNUM *rev, const char *filename)
}
if ((b1 = rcs_getrev(file, rev)) == NULL) {
- cvs_log(LP_ERR, "failed to retrieve revision");
+ cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf);
return (-1);
}
+ b1 = rcs_kwexp_buf(b1, file, rev);
tv[0].tv_sec = (long)rcs_rev_getdate(file, rev);
tv[1].tv_sec = tv[0].tv_sec;
@@ -242,9 +243,10 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, RCSNUM *rev2, const char *filename)
printf("retrieving revision %s\n", rbuf1);
if ((b1 = rcs_getrev(file, rev1)) == NULL) {
- cvs_log(LP_ERR, "failed to retrieve revision");
+ cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf1);
return (-1);
}
+ b1 = rcs_kwexp_buf(b1, file, rev1);
tv[0].tv_sec = (long)rcs_rev_getdate(file, rev1);
tv[1].tv_sec = tv[0].tv_sec;
@@ -253,9 +255,10 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, RCSNUM *rev2, const char *filename)
fprintf(stderr, "retrieving revision %s\n", rbuf2);
if ((b2 = rcs_getrev(file, rev2)) == NULL) {
- cvs_log(LP_ERR, "failed to retrieve revision");
+ cvs_log(LP_ERR, "failed to retrieve revision %s", rbuf2);
return (-1);
}
+ b2 = rcs_kwexp_buf(b2, file, rev2);
tv2[0].tv_sec = (long)rcs_rev_getdate(file, rev2);
tv2[1].tv_sec = tv2[0].tv_sec;