summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/status.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-19 15:48:53 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-19 15:48:53 +0000
commita10ef50c210d9487ca184c50f0498d1f4d6306c0 (patch)
treed225fd97b48d79bcb7c65b65494646c60a03b9dc /usr.bin/cvs/status.c
parent9e68db7eb3140e1d7eae2a46a08a6eb2cdcf3f7e (diff)
print existing tags if any (-v); long time ago Ok joris@.
Diffstat (limited to 'usr.bin/cvs/status.c')
-rw-r--r--usr.bin/cvs/status.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index c4f102cf516..0aa39de4f86 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,6 +1,7 @@
-/* $OpenBSD: status.c,v 1.40 2005/07/14 06:54:59 xsa Exp $ */
+/* $OpenBSD: status.c,v 1.41 2005/07/19 15:48:52 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
+ * Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -55,9 +56,9 @@ const char *cvs_statstr[] = {
};
-static int cvs_status_init (struct cvs_cmd *, int, char **, int *);
-static int cvs_status_remote (CVSFILE *, void *);
-static int cvs_status_local (CVSFILE *, void *);
+static int cvs_status_init (struct cvs_cmd *, int, char **, int *);
+static int cvs_status_remote (CVSFILE *, void *);
+static int cvs_status_local (CVSFILE *, void *);
static int cvs_status_pre_exec (struct cvsroot *);
struct cvs_cmd cvs_cmd_status = {
@@ -181,6 +182,7 @@ cvs_status_local(CVSFILE *cf, void *arg)
char buf[MAXNAMLEN], fpath[MAXPATHLEN], rcspath[MAXPATHLEN];
char numbuf[64], timebuf[32];
RCSFILE *rf;
+ struct rcs_sym *sym;
if (cf->cf_type == DT_DIR) {
if (verbosity > 1)
@@ -275,6 +277,25 @@ cvs_status_local(CVSFILE *cf, void *arg)
else if (verbosity > 0)
cvs_printf(" Sticky Options:\t(none)\n");
+ if (verbose) {
+ cvs_printf("\n");
+ cvs_printf(" Existing Tags:\n");
+
+ if (!TAILQ_EMPTY(&(rf->rf_symbols))) {
+ TAILQ_FOREACH(sym, &(rf->rf_symbols), rs_list) {
+ rcsnum_tostr(sym->rs_num, numbuf,
+ sizeof(numbuf));
+
+ cvs_printf("\t%-25s\t(%s: %s)\n",
+ sym->rs_name,
+ RCSNUM_ISBRANCH(sym->rs_num) ? "branch" :
+ "revision", numbuf);
+ }
+ } else {
+ cvs_printf("\tNo Tags Exist\n");
+ }
+ }
+
cvs_printf("\n");
rcs_close(rf);