summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-07-31 11:37:38 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-07-31 11:37:38 +0000
commitf92ae7fc86bbf80a8b95721e8cc4d0927ddf508c (patch)
tree73d0e68b2dd39363b72515c6d19114352612a5f6 /usr.bin
parent1f936ce7f847180df7250d9afd622d1c5c78b529 (diff)
When looking for revision, break out of the loop at the end rather than
looping forever. This prevents the server going into an infinite loop when the repository is behind the checkout, but the behaviour is not correct (it is an error rather than ignoring the file), so mark with an XXX for now. Some underlying OpenCVS functions are too fatal()-happy and will probably need to be changed in order to fix this properly. Problem reported by sthen. ok xsa ray
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/rcs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 3eac5b26018..4ea2d5912a4 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.297 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: rcs.c,v 1.298 2010/07/31 11:37:37 nicm Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -2783,6 +2783,13 @@ again:
trdp = rcs_findrev(rfp, rdp->rd_next);
if (trdp == NULL)
fatal("failed to grab next revision");
+ } else {
+ /*
+ * XXX Fail, although the caller does not always do the
+ * right thing (eg cvs diff when the tree is ahead of
+ * the repository).
+ */
+ break;
}
if (rdp->rd_tlen == 0) {