summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-10-11 00:07:30 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-10-11 00:07:30 +0000
commit1115784493123da562d75c5d2473742c8c469d4a (patch)
tree971a1d34e1d9f262e4b95e8af3c811744db98071
parentab6ec19f4296067556c8e8f0b89a0ab2b514376f (diff)
fix patching in rcs_getrev();
-rw-r--r--usr.bin/cvs/rcs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 313040627c5..3bd85432997 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.86 2005/10/10 23:37:15 joris Exp $ */
+/* $OpenBSD: rcs.c,v 1.87 2005/10/11 00:07:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1367,8 +1367,9 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev)
/* Apply patches backwards to get the right version.
* This will need some rework to support sub branches.
*/
- crev = rdp->rd_next;
do {
+ crev = rdp->rd_next;
+ printf("loop\n");
rdp = rcs_findrev(rfp, crev);
if (rdp == NULL) {
cvs_buf_free(rbuf);
@@ -1384,7 +1385,6 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *frev)
free(bp);
if (rbuf == NULL)
break;
- crev = rdp->rd_next;
} while (rcsnum_cmp(crev, rev, 0) != 0);
}
@@ -1566,6 +1566,10 @@ rcs_findrev(RCSFILE *rfp, const RCSNUM *rev)
struct rcs_delta *rdp;
struct rcs_dlist *hp;
int found;
+ char buf[16];
+
+ rcsnum_tostr(rev, buf, sizeof(buf));
+ printf("rcs_findrev(%s)\n", buf);
cmplen = 2;
hp = &(rfp->rf_delta);