git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deskin Miller <deskinm@gmail.com>
To: Ward Wouts <ward@wouts.nl>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Subject: Re: git-svn error: Unable to parse date
Date: Tue, 17 Feb 2009 09:26:29 -0500	[thread overview]
Message-ID: <86d4c5e00902170626q7d460a30l168ecd227db69a46@mail.gmail.com> (raw)
In-Reply-To: <20090217094850.GQ7504@wouts.nl>

Hi,

Cc:ing Eric Wong, the git-svn author; further comments inline.

On Tue, Feb 17, 2009 at 04:48, Ward Wouts <ward@wouts.nl> wrote:
> $ git svn fetch
> Unable to parse date: 2004-03-09T09:44:33.Z
>  at /usr/bin/git-svn line 3995
>
> The message goes away with this one character patch:
>
> $ diff -bru git-svn*

Not using git to hack on git?

> --- 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";
>  }

I was rather confused until I looked at the source currently in git,
but it looks like you have the patch lines backward.  Looking at the
diff header now that's more clear to me.  At any rate, it's clear why
this date didn't parse, and why your patch fixes it.

I don't have any idea what sort of date format git should be expecting
from svn, so the possibility exists that the current regex is actually
correct and svn is buggily leaving off the subseconds.  Especially
given that this timestamp issue doesn't seem to have come up before,
that feels like a very real possibility.  All the same, even if it is
svn's fault, we likely want to adjust to accommodate faulty svn
installs, certainly in easy cases like this; but I'll defer to Eric in
that regard.

I appreciate the time you took to address this issue, and go so far as
to submit a patch, but you'll be much farther ahead if you use git to
submit patches to git.  Your patch is pretty small and easy to
understand, but it's still lacking a commit message and a signoff from
you, and the diff is actually backwards.  Patches in this state often
end up dropped on the floor on this list- there's too much work to be
done to spend our time on stuff where people haven't used the list
conventions.  It'd be a shame for any further work you do improving
git go to waste, especially when it's not hard to correct, so I'm
trying to help out now by pointing you in the right direction.  You
can find git.git on the web at the following address, along with git
URLs from which you can clone:

http://git.kernel.org/?p=git/git.git;a=summary

Within the repository, Documentation/SubmittingPatches is your best
guide to sending stuff to the mailing list.

In anticipation of a proper commit message and the like, this patch is

Acked-by: Deskin Miller <deskinm@umich.edu>

  reply	other threads:[~2009-02-17 14:28 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 [this message]
2009-02-17 18:38 ` Junio C Hamano
2009-02-17 19:35   ` Ward Wouts
2009-02-17 21:49     ` Eric Wong
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=86d4c5e00902170626q7d460a30l168ecd227db69a46@mail.gmail.com \
    --to=deskinm@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).