=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/rcs.c,v retrieving revision 1.223 retrieving revision 1.224 diff -c -r1.223 -r1.224 *** src/usr.bin/cvs/rcs.c 2007/10/09 12:16:29 1.223 --- src/usr.bin/cvs/rcs.c 2007/10/09 12:18:53 1.224 *************** *** 1,4 **** ! /* $OpenBSD: rcs.c,v 1.223 2007/10/09 12:16:29 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcs.c,v 1.224 2007/10/09 12:18:53 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 2591,2600 **** /* * If it was not a branch, thats ok the symbolic * name refered to a revision, so return the resolved ! * revision for the given name. */ ! if (!RCSNUM_ISBRANCH(rev)) return (rev); brev = rcsnum_alloc(); rcsnum_cpy(rev, brev, rev->rn_len - 1); --- 2591,2605 ---- /* * If it was not a branch, thats ok the symbolic * name refered to a revision, so return the resolved ! * revision for the given name if it is not newer than HEAD. */ ! if (!RCSNUM_ISBRANCH(rev)) { ! if (rcsnum_cmp(rev, rfp->rf_head, 0) < 0) { ! rcsnum_free(rev); ! return NULL; ! } return (rev); + } brev = rcsnum_alloc(); rcsnum_cpy(rev, brev, rev->rn_len - 1);