From: Eric Wong <normalperson@yhbt.net>
To: Nicolas Vilz <niv@iaglans.de>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: Problems with git-svn authors file
Date: Mon, 11 Dec 2006 20:25:58 -0800 [thread overview]
Message-ID: <20061212042558.GA31795@soma> (raw)
In-Reply-To: <20061210172604.GA18385@hermes.lan.home.vilz.de>
Nicolas Vilz <niv@iaglans.de> wrote:
> hello,
>
> i tried to use git-svn with author-files and got stuck with following
> error message:
>
> Use of uninitialized value in hash element at /usr/bin/git-svn line
> 2952.
> Use of uninitialized value in concatenation (.) or string at
> /usr/bin/git-svn line 2953.
> Author: not defined in .git/info/svn-authors file
> 512 at /usr/bin/git-svn line 457
> main::fetch_lib() called at /usr/bin/git-svn line 328
> main::fetch() called at /usr/bin/git-svn line 187
> Am i doing something wrong?
No, this is just a bug in git-svn.
After the following patch, you should be able to use
--------------------------------------------
(no author) = real-name <email address>
--------------------------------------------
in your authors file.
--
Eric Wong
From b40e14605809b0b1501002a333fbd680913f127f Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 11 Dec 2006 20:22:29 -0800
Subject: [PATCH] git-svn: correctly handle "(no author)" when using an authors file
The low-level parts of the SVN library return NULL/undef for
author-less revisions, whereas "(no author)" is a (svn) client
convention.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 1f8a3b0..17ebb77 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2948,7 +2948,8 @@ sub libsvn_log_entry {
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 die "Unable to parse date: $date\n";
- if (defined $_authors && ! defined $users{$author}) {
+ if (defined $author && length $author > 0 &&
+ defined $_authors && ! defined $users{$author}) {
die "Author: $author not defined in $_authors file\n";
}
$msg = '' if ($rev == 0 && !defined $msg);
--
prev parent reply other threads:[~2006-12-12 4:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 17:26 Problems with git-svn authors file Nicolas Vilz
2006-12-11 9:04 ` Andy Parkins
2006-12-11 11:44 ` Nicolas Vilz
2006-12-12 4:25 ` Eric Wong [this message]
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=20061212042558.GA31795@soma \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=niv@iaglans.de \
/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).