git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ward Wouts <ward@wouts.nl>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>, Deskin Miller <deskinm@gmail.com>
Subject: [PATCH] Fixes an 'Unable to parse date' error message in git-svn
Date: Tue, 17 Feb 2009 16:16:25 +0100	[thread overview]
Message-ID: <20090217151625.GR7504@wouts.nl> (raw)

I got the following error message while trying to fetch a subversion
repository:

$ git svn init file:///home/mg/svn/mg git-svn-test
Initialized empty Git repository in /home/ward/worktrees/git-svn-test/.git/
$ cd git-svn-test
$ git svn fetch

r59 = c20f5b6c61bb8b2babc1b3644b6372e023d9d428 (git-svn)
W: +empty_dir: CFE
r60 = 1b8ad7c39dd60897319545c9f3f08b3b2b82b863 (git-svn)
        A       CFE/Makefile
Unable to parse date: 2004-03-09T09:44:33.Z
 at /usr/bin/git-svn line 3995

This patch makes the matching of subseconds optional, which prevents the
error message from showing. Since the subseconds match isn't actually
used this should not be a problem.

Signed-off-by: Ward Wouts <ward@wouts.nl>
Acked-by: Deskin Miller <deskinm@umich.edu>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 83cb36f..8ffadcc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2526,7 +2526,7 @@ sub get_untracked {
 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";
 	my $parsed_date;    # Set next.
 
-- 
1.5.6.6

                 reply	other threads:[~2009-02-17 15:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090217151625.GR7504@wouts.nl \
    --to=ward@wouts.nl \
    --cc=deskinm@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /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).