{"thread":{"id":"43504","subject":"Re: Problems with git-svn authors file","startedAt":"2006-12-10T17:26:05Z","lastAt":"2006-12-12T04:25:58Z","messageCount":4,"participants":["Andy Parkins","Eric Wong","Nicolas Vilz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297306","messageId":"20061210172604.GA18385@hermes.lan.home.vilz.de","threadId":"43504","inReplyTo":null,"subject":"Problems with git-svn authors file","fromName":"Nicolas Vilz","fromEmail":"niv@iaglans.de","sentAt":"2006-12-10T17:26:05Z","receivedAt":"2006-12-10T17:26:05Z","isPatch":false,"sender":{"key":"niv@iaglans.de","avatar":"https://gravatar.com/avatar/e4d43a32d721241212d4edb1d2210327e28423c913071b4bfeeaa0ce15296110?d=mp&s=160"},"body":"hello,\n\ni tried to use git-svn with author-files and got stuck with following\nerror message:\n\nUse of uninitialized value in hash element at /usr/bin/git-svn line\n2952.\nUse of uninitialized value in concatenation (.) or string at\n/usr/bin/git-svn line 2953.\nAuthor:  not defined in .git/info/svn-authors file\n512 at /usr/bin/git-svn line 457\n        main::fetch_lib() called at /usr/bin/git-svn line 328\n        main::fetch() called at /usr/bin/git-svn line 187\n\n\nmy svn-authors file looks like this:\n---->8-----------------\nusername = Real Name <email@address>\n---->8-----------------\nIt is placed in .git/info/svn-authors and is configured via\nsvn.authorsfile. I tried to dig in the code and it says at line 2952 if\nthere is an $_author variable defined and no $users{$author}, then die\nwith that message... \n\nabove function load_authors i have found\n\n# '<svn username> = real-name <email address>' mapping based on git-svnimport:\n\nnow i am a bit confused, because the manual says, the svn-authors file\nlooks like my file above and here it sounds like \n\n<svn username> = real-name <email address>\n\nis the real syntax for that file...\n\nIf i ommit the -A or --authors-file= parameter (or unset the\nsvn.authorsfile config-parameter)  while git-svn fetch, afterwards in \ngitk --all, there is only the svn-username and the revision-uuid.\n\nAm i doing something wrong?\n\nSincerly\n"},{"id":"295161","messageId":"200612110904.54389.andyparkins@gmail.com","threadId":"43504","inReplyTo":"20061210172604.GA18385@hermes.lan.home.vilz.de","subject":"Re: Problems with git-svn authors file","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-12-11T09:04:52Z","receivedAt":"2006-12-11T09:04:52Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Sunday 2006 December 10 17:26, Nicolas Vilz wrote:\n\n> Use of uninitialized value in hash element at /usr/bin/git-svn line\n> 2952.\n> Use of uninitialized value in concatenation (.) or string at\n> /usr/bin/git-svn line 2953.\n> Author:  not defined in .git/info/svn-authors file\n> 512 at /usr/bin/git-svn line 457\n>         main::fetch_lib() called at /usr/bin/git-svn line 328\n>         main::fetch() called at /usr/bin/git-svn line 187\n\nI've had errors like this.  For certain repositories (possibly very old ones) \nthere is an unusual, empty, revision 0.  I got around the problem by telling \ngit-svn to start at revision 1.  Everything seemed fine after that.\n\n$ git-svn fetch -r1\n\nI don't know if that will be your fix, but it's worth a try.\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIEE\n"},{"id":"295962","messageId":"20061211114422.GA5332@fry.bender.fht","threadId":"43504","inReplyTo":"200612110904.54389.andyparkins@gmail.com","subject":"Re: Problems with git-svn authors file","fromName":"Nicolas Vilz","fromEmail":"niv@iaglans.de","sentAt":"2006-12-11T11:44:22Z","receivedAt":"2006-12-11T11:44:22Z","isPatch":false,"sender":{"key":"niv@iaglans.de","avatar":"https://gravatar.com/avatar/e4d43a32d721241212d4edb1d2210327e28423c913071b4bfeeaa0ce15296110?d=mp&s=160"},"body":"On Mon, Dec 11, 2006 at 09:04:52AM +0000, Andy Parkins wrote:\n> On Sunday 2006 December 10 17:26, Nicolas Vilz wrote:\n> \n> > Use of uninitialized value in hash element at /usr/bin/git-svn line\n> > 2952.\n> > Use of uninitialized value in concatenation (.) or string at\n> > /usr/bin/git-svn line 2953.\n> > Author:  not defined in .git/info/svn-authors file\n> > 512 at /usr/bin/git-svn line 457\n> >         main::fetch_lib() called at /usr/bin/git-svn line 328\n> >         main::fetch() called at /usr/bin/git-svn line 187\n> \n> I've had errors like this.  For certain repositories (possibly very old ones) \n> there is an unusual, empty, revision 0.  I got around the problem by telling \n> git-svn to start at revision 1.  Everything seemed fine after that.\n> \n\nWell it is a fresh repository. And you are right, there is an empty\nrevision 0. I didn't recognize that is was the revision 0 I got stuck\nwith. But it is obvious now :)\n\n> $ git-svn fetch -r1\n> \n> I don't know if that will be your fix, but it's worth a try.\nThat fixed it, thx.\n\n"},{"id":"295250","messageId":"20061212042558.GA31795@soma","threadId":"43504","inReplyTo":"20061210172604.GA18385@hermes.lan.home.vilz.de","subject":"Re: Problems with git-svn authors file","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-12T04:25:58Z","receivedAt":"2006-12-12T04:25:58Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Nicolas Vilz <niv@iaglans.de> wrote:\n> hello,\n> \n> i tried to use git-svn with author-files and got stuck with following\n> error message:\n> \n> Use of uninitialized value in hash element at /usr/bin/git-svn line\n> 2952.\n> Use of uninitialized value in concatenation (.) or string at\n> /usr/bin/git-svn line 2953.\n> Author:  not defined in .git/info/svn-authors file\n> 512 at /usr/bin/git-svn line 457\n>         main::fetch_lib() called at /usr/bin/git-svn line 328\n>         main::fetch() called at /usr/bin/git-svn line 187\n\n> Am i doing something wrong?\n\nNo, this is just a bug in git-svn.\n\nAfter the following patch, you should be able to use\n--------------------------------------------\n(no author) = real-name <email address>\n--------------------------------------------\nin your authors file.\n\n-- \nEric Wong\n\nFrom b40e14605809b0b1501002a333fbd680913f127f Mon Sep 17 00:00:00 2001\nFrom: Eric Wong <normalperson@yhbt.net>\nDate: Mon, 11 Dec 2006 20:22:29 -0800\nSubject: [PATCH] git-svn: correctly handle \"(no author)\" when using an authors file\n\nThe low-level parts of the SVN library return NULL/undef for\nauthor-less revisions, whereas \"(no author)\" is a (svn) client\nconvention.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 1f8a3b0..17ebb77 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2948,7 +2948,8 @@ sub libsvn_log_entry {\n \tmy ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\\d{4})\\-(\\d\\d)\\-(\\d\\d)T\n \t\t\t\t\t (\\d\\d)\\:(\\d\\d)\\:(\\d\\d).\\d+Z$/x)\n \t\t\t\tor die \"Unable to parse date: $date\\n\";\n-\tif (defined $_authors && ! defined $users{$author}) {\n+\tif (defined $author && length $author > 0 &&\n+\t    defined $_authors && ! defined $users{$author}) {\n \t\tdie \"Author: $author not defined in $_authors file\\n\";\n \t}\n \t$msg = '' if ($rev == 0 && !defined $msg);\n-- \n"}]}