diff options
-rw-r--r-- | contrib/cvs/src/log.c | 6 | ||||
-rw-r--r-- | contrib/cvs/src/main.c | 3 | ||||
-rw-r--r-- | contrib/cvs/src/rcs.c | 5 | ||||
-rw-r--r-- | contrib/cvs/src/rcs.h | 1 |
4 files changed, 11 insertions, 4 deletions
diff --git a/contrib/cvs/src/log.c b/contrib/cvs/src/log.c index 9e10bd905bfd..88e5bb7672f7 100644 --- a/contrib/cvs/src/log.c +++ b/contrib/cvs/src/log.c @@ -10,6 +10,8 @@ * Prints the RCS "log" (rlog) information for the specified files. With no * argument, prints the log information for all the files in the directory * (recursive by default). + * + * $FreeBSD$ */ #include "cvs.h" @@ -1605,8 +1607,8 @@ log_version (log_data, revlist, rcs, ver, trunk) &sec); if (year < 1900) year += 1900; - sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, - hour, min, sec); + sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", + year, datesep, mon, datesep, mday, hour, min, sec); cvs_output (buf, 0); cvs_output ("; author: ", 0); diff --git a/contrib/cvs/src/main.c b/contrib/cvs/src/main.c index d00bddd9a7fa..932dbd2af731 100644 --- a/contrib/cvs/src/main.c +++ b/contrib/cvs/src/main.c @@ -1237,6 +1237,9 @@ parseopts(root) if (q) *q = '\0'; + if (!strcmp(buf, "iso8601")) { + datesep = '-'; + } if (!strncmp(buf, "tag=", 4)) { char *what; char *rcs_localid; diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c index 8aee286050ee..f60d02e971ef 100644 --- a/contrib/cvs/src/rcs.c +++ b/contrib/cvs/src/rcs.c @@ -26,6 +26,7 @@ # endif #endif +int datesep = '/'; int preserve_perms = 0; /* The RCS -k options, and a set of enums that must match the array. @@ -3549,8 +3550,8 @@ printable_date (rcs_date) &sec); if (year < 1900) year += 1900; - sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, - hour, min, sec); + sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", + year, datesep, mon, datesep, mday, hour, min, sec); return xstrdup (buf); } diff --git a/contrib/cvs/src/rcs.h b/contrib/cvs/src/rcs.h index a2a30f7cf413..d40d1781b755 100644 --- a/contrib/cvs/src/rcs.h +++ b/contrib/cvs/src/rcs.h @@ -250,6 +250,7 @@ void RCS_setincexc PROTO ((const char *arg)); void RCS_setlocalid PROTO ((const char *arg)); char *make_file_label PROTO ((const char *, const char *, RCSNode *)); +extern int datesep; extern int preserve_perms; /* From import.c. */ |