diff options
author | 2008-02-03 16:59:11 +0000 | |
---|---|---|
committer | 2008-02-03 16:59:11 +0000 | |
commit | b03d8731fb14e2a071453b06a18abce8a35e73fe (patch) | |
tree | 4fce998f2e39244a813236e080be36a57ab42aef | |
parent | Like i wrote in last commit, it's supposed to be sys/time.h, not sys/times.h. (diff) | |
download | wireguard-openbsd-b03d8731fb14e2a071453b06a18abce8a35e73fe.tar.xz wireguard-openbsd-b03d8731fb14e2a071453b06a18abce8a35e73fe.zip |
Do not unify this "-fr UNKNOWN" handling, it breaks commands which have
to work fine and just ignore files which don't have requested symbol.
Spotted by joris@.
-rw-r--r-- | usr.bin/cvs/annotate.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.c | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index 2e8c6cc9feb..7996d19ed0b 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.49 2008/02/02 16:59:48 tobias Exp $ */ +/* $OpenBSD: annotate.c,v 1.50 2008/02/03 16:59:11 tobias Exp $ */ /* * Copyright (c) 2007 Tobias Stoeckmann <tobias@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -161,6 +161,11 @@ cvs_annotate_local(struct cvs_file *cf) /* Stick at weird GNU cvs, ignore error. */ return; + /* -f is not allowed for unknown symbols */ + rev = rcsnum_parse(cvs_specified_tag); + if (rev == NULL) + fatal("no such tag %s", cvs_specified_tag); + rcsnum_free(rev); rev = rcsnum_alloc(); rcsnum_cpy(cf->file_rcs->rf_head, rev, 0); } diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index d10d0e68561..fab8c63ad5b 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.244 2008/02/02 16:59:48 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.245 2008/02/03 16:59:11 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2657,14 +2657,8 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) rev = rcs_sym_getrev(rfp, revstr); } - /* - * Although many cvs commands do have option -f to force head - * if a revision is not found, GNU cvs simply fatals with - * unknown symbols. If we reach this point rev is still NULL, - * do the same... - */ if (rev == NULL) - fatal("no such tag %s", revstr); + return (NULL); /* * If it was not a branch, thats ok the symbolic |