From: Eric Wong <normalperson@yhbt.net>
To: Ward Wouts <ward@wouts.nl>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git-svn error: Unable to parse date
Date: Tue, 17 Feb 2009 13:49:14 -0800 [thread overview]
Message-ID: <20090217214914.GD26706@dcvr.yhbt.net> (raw)
In-Reply-To: <20090217193550.GT7504@wouts.nl>
Ward Wouts <ward@wouts.nl> wrote:
> On Tue, Feb 17, 2009 at 10:38:32AM -0800, Junio C Hamano wrote:
> > Ward Wouts <ward@wouts.nl> writes:
> >
> > > Unable to parse date: 2004-03-09T09:44:33.Z
> > > at /usr/bin/git-svn line 3995
> >
> > A very nice problem description, illustrating what the code should accept
> > but doesn't.
>
> Thank you.
>
> > > The message goes away with this one character patch:
> > >
> > > $ diff -bru git-svn*
> > > --- git-svn 2009-02-17 10:23:24.000000000 +0100
> > > +++ git-svn.orig 2009-02-17 10:20:30.000000000 +0100
> > > @@ -2387,7 +2387,7 @@
> > > sub parse_svn_date {
> > > my $date = shift || return '+0000 1970-01-01 00:00:00';
> > > my ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\d{4})\-(\d\d)\-(\d\d)T
> > > - (\d\d)\:(\d\d)\:(\d\d).\d*Z$/x) or
> > > + (\d\d)\:(\d\d)\:(\d\d).\d+Z$/x) or
> > > croak "Unable to parse date: $date\n";
> > > "+0000 $Y-$m-$d $H:$M:$S";
> > > }
> >
> > You had me scratch my head by giving a reverse patch.
>
> Yes, I'm sorry about that. Hopefully my other post about this subject,
> sent after the remarks Deskin made, is in the proper format.
>
> > I think neither regexp is quite correct, assuming that SVN timestamp is
> > supposed to always have decimal point after seconds, with optional
> > fractional part, followed by Z (presumably to mean Zulu).
> >
> > - (\d\d)\:(\d\d)\:(\d\d).\d+Z$/x) or
> > + (\d\d)\:(\d\d)\:(\d\d)\.\d*Z$/x) or
> >
> > The decimal point should get quoted.
>
> I think you're right.
Yup. Consider a patch with the quoted decimal point to be
Acked-by: Eric Wong <normalperson@yhbt.net>
Thanks Junio, Deskin and Ward.
Ward: Just curious, which version of the SVN libraries are you running?
Odd that this hasn't come up before, I wonder if it's the latest
versions (which I haven't tried, still on 1.5.1) or if SVN just
truncates the zeroes...
--
Eric Wong
next prev parent reply other threads:[~2009-02-17 21:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 9:48 git-svn error: Unable to parse date Ward Wouts
2009-02-17 14:26 ` Deskin Miller
2009-02-17 18:38 ` Junio C Hamano
2009-02-17 19:35 ` Ward Wouts
2009-02-17 21:49 ` Eric Wong [this message]
2009-02-19 0:53 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090217214914.GD26706@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ward@wouts.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.