{"thread":{"id":"37230","subject":"git-svn authors file and SVN users with ‘=’ in the username","startedAt":"2014-07-28T11:33:23Z","lastAt":"2014-07-29T09:32:12Z","messageCount":5,"participants":["David Braden","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"246791","messageId":"dc3fda62c3e94eba9d29fd4b34f2e7cc@EXCHLONDON2013.zoo.lan","threadId":"37230","inReplyTo":null,"subject":"git-svn authors file and SVN users with ‘=’ in the username","fromName":"David Braden","fromEmail":"david.braden@softwire.com","sentAt":"2014-07-28T11:33:23Z","receivedAt":"2014-07-28T11:33:23Z","isPatch":false,"sender":{"key":"david.braden@softwire.com","avatar":null},"body":"I’m creating a git clone of a svn repository and am trying to set up an authors file to map between the svn users and our git usernames. The svn repository uses the full subject line of a ssl certificate for the user id and so it contains ‘=’ which causes the authors file to be parsed incorrectly as it splits on the first equals.\n\nThe code that does the parsing is:\n\n# '<svn username> = real-name <email address>' mapping based on git-svnimport:\nsub load_authors {\n                open my $authors, '<', $_authors or die \"Can't open $_authors $!\\n\";\n                my $log = $cmd eq 'log';\n                while (<$authors>) {\n                                chomp;\n                                next unless /^(.+?|\\(no author\\))\\s*=\\s*(.+?)\\s*<(.+)>\\s*$/;\n                                my ($user, $name, $email) = ($1, $2, $3);\n                                if ($log) {\n                                                $Git::SVN::Log::rusers{\"$name <$email>\"} = $user;\n                                } else {\n                                                $users{$user} = [$name, $email];\n                                }\n                }\n                close $authors or croak $!;\n}\n\n\nHow can I work around this limitation?\n\nThanks\n\nDavid\nDavid Braden\nTel : 020 7485 7500 ext 3199 | Fax : 020 7485 7575\n\nsoftwire\nSunday Times Best Small Companies - UK top 25 four years running\nWeb : www.softwire.com<http://www.softwire.com/> | Addr : 325 Highgate Studios, 53-79 Highgate Road, London NW5 1TL\nSoftwire Technology Limited. Registered in England no. 3824658. Registered Office : 13 Station Road, London N3 2SB\n"},{"id":"246833","messageId":"20140728200744.GA18098@peff.net","threadId":"37230","inReplyTo":"dc3fda62c3e94eba9d29fd4b34f2e7cc@EXCHLONDON2013.zoo.lan","subject":"Re: git-svn authors file and SVN users with ‘=’ in the username","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-07-28T20:07:44Z","receivedAt":"2014-07-28T20:07:44Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 28, 2014 at 11:33:23AM +0000, David Braden wrote:\n\n> I’m creating a git clone of a svn repository and am trying to set up\n> an authors file to map between the svn users and our git usernames.\n> The svn repository uses the full subject line of a ssl certificate for\n> the user id and so it contains ‘=’ which causes the authors file to be\n> parsed incorrectly as it splits on the first equals.\n> [...]\n> How can I work around this limitation?\n\nI have not tried it, but I suspect --authors-prog might work, as it\npasses the name as an argument to the program.\n\n-Peff\n"},{"id":"246883","messageId":"49f272949fef4122b2eb83a7a242e366@EXCHLONDON2013.zoo.lan","threadId":"37230","inReplyTo":"20140728200744.GA18098@peff.net","subject":"RE: git-svn authors file and SVN users with ‘=’ in the username","fromName":"David Braden","fromEmail":"david.braden@softwire.com","sentAt":"2014-07-29T08:35:26Z","receivedAt":"2014-07-29T08:35:26Z","isPatch":false,"sender":{"key":"david.braden@softwire.com","avatar":null},"body":"Yeah, the --authors-prog does work.  Is there a way to save the configuration though so you don't have to add it everytime time you rebase or dcommit?\n\nThanks\n\nDavid\n\n\n\n-----Original Message-----\nFrom: Jeff King [mailto:peff@peff.net]\nSent: 28 July 2014 21:08\nTo: David Braden\nCc: git@vger.kernel.org\nSubject: Re: git-svn authors file and SVN users with ‘=’ in the username\n\nOn Mon, Jul 28, 2014 at 11:33:23AM +0000, David Braden wrote:\n\n> I’m creating a git clone of a svn repository and am trying to set up\n> an authors file to map between the svn users and our git usernames.\n> The svn repository uses the full subject line of a ssl certificate for\n> the user id and so it contains ‘=’ which causes the authors file to be\n> parsed incorrectly as it splits on the first equals.\n> [...]\n> How can I work around this limitation?\n\nI have not tried it, but I suspect --authors-prog might work, as it passes the name as an argument to the program.\n\n-Peff\n\nDavid Braden\nTel : 020 7485 7500 ext 3199 | Fax : 020 7485 7575\n\nsoftwire\nSunday Times Best Small Companies - UK top 25 four years running\nWeb : www.softwire.com<http://www.softwire.com/> | Addr : 325 Highgate Studios, 53-79 Highgate Road, London NW5 1TL\nSoftwire Technology Limited. Registered in England no. 3824658. Registered Office : 13 Station Road, London N3 2SB\n"},{"id":"246885","messageId":"20140729092637.GB13134@peff.net","threadId":"37230","inReplyTo":"49f272949fef4122b2eb83a7a242e366@EXCHLONDON2013.zoo.lan","subject":"Re: git-svn authors file and SVN users with ‘=’ in the username","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-07-29T09:26:37Z","receivedAt":"2014-07-29T09:26:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jul 29, 2014 at 08:35:26AM +0000, David Braden wrote:\n\n> Yeah, the --authors-prog does work.  Is there a way to save the\n> configuration though so you don't have to add it everytime time you\n> rebase or dcommit?\n\nI think that git-svn's config reader uses the command-line options as a\ntemplate, and automatically reads \"--authors-prog\" from\n\"svn.authorsprog\". I didn't test it, though.\n\n-Peff\n"},{"id":"246886","messageId":"b81d706aa8bd42f391dcc26b4b7f7fbf@EXCHLONDON2013.zoo.lan","threadId":"37230","inReplyTo":"20140729092637.GB13134@peff.net","subject":"RE: git-svn authors file and SVN users with ‘=’ in the username","fromName":"David Braden","fromEmail":"david.braden@softwire.com","sentAt":"2014-07-29T09:32:12Z","receivedAt":"2014-07-29T09:32:12Z","isPatch":false,"sender":{"key":"david.braden@softwire.com","avatar":null},"body":"Yeah, that works. Thank you very much\n\nDavid\n\n\n-----Original Message-----\nFrom: Jeff King [mailto:peff@peff.net]\nSent: 29 July 2014 10:27\nTo: David Braden\nCc: git@vger.kernel.org\nSubject: Re: git-svn authors file and SVN users with ‘=’ in the username\n\nOn Tue, Jul 29, 2014 at 08:35:26AM +0000, David Braden wrote:\n\n> Yeah, the --authors-prog does work.  Is there a way to save the\n> configuration though so you don't have to add it everytime time you\n> rebase or dcommit?\n\nI think that git-svn's config reader uses the command-line options as a template, and automatically reads \"--authors-prog\" from \"svn.authorsprog\". I didn't test it, though.\n\n-Peff\n\nDavid Braden\nTel : 020 7485 7500 ext 3199 | Fax : 020 7485 7575\n\nsoftwire\nSunday Times Best Small Companies - UK top 25 four years running\nWeb : www.softwire.com<http://www.softwire.com/> | Addr : 325 Highgate Studios, 53-79 Highgate Road, London NW5 1TL\nSoftwire Technology Limited. Registered in England no. 3824658. Registered Office : 13 Station Road, London N3 2SB\n"}]}