summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2008-02-10 13:16:36 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2008-02-10 13:16:36 +0000
commit70a6b9497a1e9d5d75546b2eb9ea9edbd6f59c1f (patch)
tree9a6002f4c37c82ececd671bcdc0986cb5b5d72c5 /usr.bin
parentda6a2cfcc03b253b57694c243c7a1c428d43e719 (diff)
Add support for Sticky Date. OK joris@ tobias@.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/status.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index fe2b7c7cbc8..f4c1d8d2828 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: status.c,v 1.80 2008/01/31 10:15:05 tobias Exp $ */
+/* $OpenBSD: status.c,v 1.81 2008/02/10 13:16:35 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
- * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
+ * Copyright (c) 2005-2008 Xavier Santolaria <xsa@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -208,6 +208,18 @@ cvs_status_local(struct cvs_file *cf)
else if (verbosity > 0)
cvs_printf(" Sticky Tag:\t\t(none)\n");
+ if (cf->file_ent->ce_date != -1) {
+ struct tm *datetm;
+ char datetmp[CVS_TIME_BUFSZ];
+
+ datetm = gmtime(&(cf->file_ent->ce_date));
+ (void)strftime(datetmp, sizeof(datetmp),
+ "%Y.%m.%d.%H.%M.%S", datetm);
+
+ cvs_printf(" Sticky Date:\t\t%s\n", datetmp);
+ } else if (verbosity > 0)
+ cvs_printf(" Sticky Date:\t\t(none)\n");
+
if (cf->file_ent->ce_opts != NULL)
cvs_printf(" Sticky Options:\t%s\n",
cf->file_ent->ce_opts);