diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-02-01 18:01:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-02-01 18:01:43 +0000 |
commit | 68cbcf1a57ad273f5dee03223eafd6ea21d8e8ec (patch) | |
tree | 86c565cc14abe75c1ea3122d6cac07f73d9d576d /usr.bin | |
parent | 12cd28413051f1a7467fda8fd7c6f5af106e62da (diff) |
When checking to see if a checked-out copy of the file is the same
as what is in the repo, expand keywords before doing the diff.
OK xsa@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/co.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index fdf895bd3a2..ff4feb99ec5 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.100 2006/11/10 16:31:29 millert Exp $ */ +/* $OpenBSD: co.c,v 1.101 2007/02/01 18:01:42 millert Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -520,6 +520,10 @@ checkout_file_has_diffs(RCSFILE *rfp, RCSNUM *frev, const char *dst) warnx("failed to load revision"); return (D_ERROR); } + if ((bp = rcs_kwexp_buf(bp, rfp, frev)) == NULL) { + warnx("failed to expand tags"); + return (D_ERROR); + } (void)xasprintf(&tempfile, "%s/diff.XXXXXXXXXX", rcs_tmpdir); rcs_buf_write_stmp(bp, tempfile); |