* Problems with git-svn authors file
@ 2006-12-10 17:26 Nicolas Vilz
2006-12-11 9:04 ` Andy Parkins
2006-12-12 4:25 ` Eric Wong
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Vilz @ 2006-12-10 17:26 UTC (permalink / raw)
To: git
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
my svn-authors file looks like this:
---->8-----------------
username = Real Name <email@address>
---->8-----------------
It is placed in .git/info/svn-authors and is configured via
svn.authorsfile. I tried to dig in the code and it says at line 2952 if
there is an $_author variable defined and no $users{$author}, then die
with that message...
above function load_authors i have found
# '<svn username> = real-name <email address>' mapping based on git-svnimport:
now i am a bit confused, because the manual says, the svn-authors file
looks like my file above and here it sounds like
<svn username> = real-name <email address>
is the real syntax for that file...
If i ommit the -A or --authors-file= parameter (or unset the
svn.authorsfile config-parameter) while git-svn fetch, afterwards in
gitk --all, there is only the svn-username and the revision-uuid.
Am i doing something wrong?
Sincerly
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with git-svn authors file
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
1 sibling, 1 reply; 4+ messages in thread
From: Andy Parkins @ 2006-12-11 9:04 UTC (permalink / raw)
To: git
On Sunday 2006 December 10 17:26, Nicolas Vilz wrote:
> 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
I've had errors like this. For certain repositories (possibly very old ones)
there is an unusual, empty, revision 0. I got around the problem by telling
git-svn to start at revision 1. Everything seemed fine after that.
$ git-svn fetch -r1
I don't know if that will be your fix, but it's worth a try.
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with git-svn authors file
2006-12-11 9:04 ` Andy Parkins
@ 2006-12-11 11:44 ` Nicolas Vilz
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Vilz @ 2006-12-11 11:44 UTC (permalink / raw)
To: Andy Parkins; +Cc: git
On Mon, Dec 11, 2006 at 09:04:52AM +0000, Andy Parkins wrote:
> On Sunday 2006 December 10 17:26, Nicolas Vilz wrote:
>
> > 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
>
> I've had errors like this. For certain repositories (possibly very old ones)
> there is an unusual, empty, revision 0. I got around the problem by telling
> git-svn to start at revision 1. Everything seemed fine after that.
>
Well it is a fresh repository. And you are right, there is an empty
revision 0. I didn't recognize that is was the revision 0 I got stuck
with. But it is obvious now :)
> $ git-svn fetch -r1
>
> I don't know if that will be your fix, but it's worth a try.
That fixed it, thx.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems with git-svn authors file
2006-12-10 17:26 Problems with git-svn authors file Nicolas Vilz
2006-12-11 9:04 ` Andy Parkins
@ 2006-12-12 4:25 ` Eric Wong
1 sibling, 0 replies; 4+ messages in thread
From: Eric Wong @ 2006-12-12 4:25 UTC (permalink / raw)
To: Nicolas Vilz; +Cc: Junio C Hamano, git
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);
--
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-12 4:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).