Hi.

Updated diff below.

.joris

Index: entries.c
===================================================================
RCS file: /cvs/src/usr.bin/cvs/entries.c,v
retrieving revision 1.103
diff -u -p -r1.103 entries.c
--- entries.c   16 Jan 2015 06:40:07 -0000      1.103
+++ entries.c   15 Feb 2015 19:03:11 -0000
@@ -151,6 +151,7 @@ cvs_ent_parse(const char *entry)
        ent->ce_rev = NULL;
        ent->ce_date = -1;
        ent->ce_tag = NULL;
+       ent->ce_time = NULL;
 
        if (ent->ce_type == CVS_ENT_FILE) {
                if (*fields[2] == '-') {
@@ -187,6 +188,8 @@ cvs_ent_parse(const char *entry)
                        if (strncmp(fields[3], "Result of merge+", 16) == 0)
                                p += 16;
 
+                       ent->ce_time = xstrdup(p);
+
                        /* Date field can be a '+=' with remote to indicate
                         * conflict.  In this case do nothing. */
                        if (strptime(p, "%a %b %d %T %Y", &t) != NULL) {
@@ -383,6 +386,9 @@ cvs_ent_free(struct cvs_ent *ent)
 {
        if (ent->ce_rev != NULL)
                rcsnum_free(ent->ce_rev);
+       if (ent->ce_time != NULL)
+               xfree(ent->ce_time);
+
        xfree(ent->ce_buf);
        xfree(ent);
 }
Index: status.c
===================================================================
RCS file: /cvs/src/usr.bin/cvs/status.c,v
retrieving revision 1.94
diff -u -p -r1.94 status.c
--- status.c    16 Jan 2015 06:40:07 -0000      1.94
+++ status.c    15 Feb 2015 19:03:11 -0000
@@ -176,9 +177,8 @@ cvs_status_local(struct cvs_file *cf)
                rcsnum_tostr(cf->file_ent->ce_rev, revbuf, sizeof(revbuf));
 
                if (cf->file_ent->ce_conflict == NULL) {
-                       ctime_r(&(cf->file_ent->ce_mtime), timebuf);
-                       if (timebuf[strlen(timebuf) - 1] == '\n')
-                               timebuf[strlen(timebuf) - 1] = '\0';
+                       (void)strlcpy(timebuf, cf->file_ent->ce_time,
+                           sizeof(timebuf));
                } else {
                        len = strlcpy(timebuf, cf->file_ent->ce_conflict,
                            sizeof(timebuf));
Index: cvs.h
===================================================================
RCS file: /cvs/src/usr.bin/cvs/cvs.h,v
retrieving revision 1.181
diff -u -p -r1.181 cvs.h
--- cvs.h       20 Sep 2011 12:43:45 -0000      1.181
+++ cvs.h       15 Feb 2015 19:03:11 -0000
@@ -249,6 +249,7 @@ struct cvs_ent {
        char            *ce_name;
        char            *ce_opts;
        char            *ce_tag;
+       char            *ce_time;
        time_t           ce_date;
        time_t           ce_mtime;
        u_int16_t        ce_type;

Reply via email to