diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-02 16:59:49 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-02 16:59:49 +0000 |
commit | 3753a0f2197e46e5a303dbf6e5023c6718fceec9 (patch) | |
tree | cccb9056c32b9b54cc3395396d654b71151590f8 /usr.bin/cvs | |
parent | fb2de20ce7483b3dc26c0b1f049170b3ba9ceff3 (diff) |
Although this doesn't comply to common sense, it complies to GNU cvs. All
commands which supply -f and -r have this weirdness: an unknown
symbol leads to fatal instead of head revision.
OK xsa@
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/annotate.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index 98f7365dcc4..2e8c6cc9feb 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.48 2008/02/02 16:44:11 xsa Exp $ */ +/* $OpenBSD: annotate.c,v 1.49 2008/02/02 16:59:48 tobias Exp $ */ /* * Copyright (c) 2007 Tobias Stoeckmann <tobias@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -161,12 +161,6 @@ 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 dc9857bbb9d..d10d0e68561 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.243 2008/01/31 22:19:36 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.244 2008/02/02 16:59:48 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2657,8 +2657,14 @@ 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) - return (NULL); + fatal("no such tag %s", revstr); /* * If it was not a branch, thats ok the symbolic |