git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn authors file and SVN users with ‘=’ in the username

From
DBDavid Braden <david.braden@softwire.com>
Date
Jul 28, 2014, 11:33 UTC
Message-ID
<dc3fda62c3e94eba9d29fd4b34f2e7cc@EXCHLONDON2013.zoo.lan>
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.
The code that does the parsing is:
# '<svn username> = real-name <email address>' mapping based on git-svnimport:
sub load_authors {
                open my $authors, '<', $_authors or die "Can't open $_authors $!\n";
                my $log = $cmd eq 'log';
                while (<$authors>) {
                                chomp;
                                next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
                                my ($user, $name, $email) = ($1, $2, $3);
                                if ($log) {
                                                $Git::SVN::Log::rusers{"$name <$email>"} = $user;
                                } else {
                                                $users{$user} = [$name, $email];
                                }
                }
                close $authors or croak $!;
}
How can I work around this limitation?
Thanks

David David Braden Tel : 020 7485 7500 ext 3199 | Fax : 020 7485 7575

softwire Sunday Times Best Small Companies - UK top 25 four years running Web : www.softwire.com<http://www.softwire.com/> | Addr : 325 Highgate Studios, 53-79 Highgate Road, London NW5 1TL Softwire Technology Limited. Registered in England no. 3824658. Registered Office : 13 Station Road, London N3 2SB

Next: Jeff King
Message 1 of 5 in “git-svn authors file and SVN users with ‘=’ in the username”
  1. David BradenJul 28, 2014
  2. Jeff KingJul 28, 2014
  3. David BradenJul 29, 2014
  4. Jeff KingJul 29, 2014
  5. David BradenJul 29, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.