From 255c06afcf301031f78aeb7d236e77f632e2a5d1 Mon Sep 17 00:00:00 2001 From: millert Date: Thu, 22 Jul 2010 17:49:18 +0000 Subject: [PATCH] Fix the "no changes" detection when a file has RCS keywords. This is consistent with GNU RCS. Also g/c an unused variable. OK xsa@ nicm@ --- usr.bin/rcs/ci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index c88f6b5536d..72aa4f3e116 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.205 2009/02/25 23:16:20 ray Exp $ */ +/* $OpenBSD: ci.c,v 1.206 2010/07/22 17:49:18 millert Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins * All rights reserved. @@ -344,11 +344,9 @@ checkin_diff_file(struct checkin_params *pb) { char *path1, *path2; BUF *b1, *b2, *b3; - char rbuf[RCS_REV_BUFSZ]; b1 = b2 = b3 = NULL; path1 = path2 = NULL; - rcsnum_tostr(pb->frev, rbuf, sizeof(rbuf)); if ((b1 = rcs_buf_load(pb->filename, BUF_AUTOEXT)) == NULL) { warnx("failed to load file: `%s'", pb->filename); @@ -359,6 +357,7 @@ checkin_diff_file(struct checkin_params *pb) warnx("failed to load revision"); goto out; } + b2 = rcs_kwexp_buf(b2, pb->file, pb->frev); if ((b3 = rcs_buf_alloc(128, BUF_AUTOEXT)) == NULL) { warnx("failed to allocated buffer for diff"); -- 2.20.1