diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2007-06-02 09:00:20 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2007-06-02 09:00:20 +0000 |
commit | 81fddecfcf1580d324a4de15baf9ff3794033919 (patch) | |
tree | 5a3a3796f93251ca11716d09e746c480ae55996d /usr.bin/cvs/entries.c | |
parent | 050c0b0e9dbd5c0589a4f397297d24ce914e4281 (diff) |
don't try to parse a server conflict message as a date.
makes cvs remote merging with conflicts work a bit better.
ok joris@ xsa@
Diffstat (limited to 'usr.bin/cvs/entries.c')
-rw-r--r-- | usr.bin/cvs/entries.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 882a2ea36d0..41309f2020e 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.77 2007/05/26 02:30:28 ray Exp $ */ +/* $OpenBSD: entries.c,v 1.78 2007/06/02 09:00:19 niallo Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -157,13 +157,15 @@ cvs_ent_parse(const char *entry) strncmp(fields[3], "Result of merge", 15) == 0) ent->ce_mtime = CVS_DATE_DMSEC; else { - if (strptime(fields[3], "%a %b %d %T %Y", &t) == NULL) - fatal("'%s' is not a valid date", fields[3]); - - t.tm_isdst = -1; /* Figure out DST. */ - t.tm_gmtoff = 0; - ent->ce_mtime = mktime(&t); - ent->ce_mtime += t.tm_gmtoff; + /* Date field can be a '+=' with remote to indicate + * conflict. In this case do nothing. */ + if (strptime(fields[3], "%a %b %d %T %Y", &t) != NULL) { + + t.tm_isdst = -1; /* Figure out DST. */ + t.tm_gmtoff = 0; + ent->ce_mtime = mktime(&t); + ent->ce_mtime += t.tm_gmtoff; + } } } |