=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/status.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- src/usr.bin/cvs/status.c 2015/04/04 14:20:11 1.96 +++ src/usr.bin/cvs/status.c 2016/10/18 17:11:43 1.97 @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.96 2015/04/04 14:20:11 stsp Exp $ */ +/* $OpenBSD: status.c,v 1.97 2016/10/18 17:11:43 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2005-2008 Xavier Santolaria @@ -16,6 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include #include @@ -119,7 +120,7 @@ cvs_status_local(struct cvs_file *cf) { size_t len; - RCSNUM *head; + RCSNUM *head, *brev; const char *status; struct rcs_delta *rdp; char buf[PATH_MAX + CVS_REV_BUFSZ + 128]; @@ -223,11 +224,23 @@ } if (cf->file_ent != NULL) { - if (cf->file_ent->ce_tag != NULL) - cvs_printf(" Sticky Tag:\t\t%s\n", - cf->file_ent->ce_tag); - else if (verbosity > 0) + if (cf->file_ent->ce_tag != NULL) { + if ((brev = rcs_sym_getrev(cf->file_rcs, + cf->file_ent->ce_tag)) == NULL) { + (void)strlcpy(buf, "- MISSING from RCS file!", + sizeof(buf)); + } else { + rcsnum_tostr(brev, revbuf, sizeof(revbuf)); + (void)xsnprintf(buf, sizeof(buf), + "(branch: %s)", revbuf); + free(brev); + } + + cvs_printf(" Sticky Tag:\t\t%s %s\n", + cf->file_ent->ce_tag, buf); + } else if (verbosity > 0) { cvs_printf(" Sticky Tag:\t\t(none)\n"); + } if (cf->file_ent->ce_date != -1) { struct tm datetm;