Skip to content

Instantly share code, notes, and snippets.

@yannk
Created April 2, 2009 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yannk/89345 to your computer and use it in GitHub Desktop.
Save yannk/89345 to your computer and use it in GitHub Desktop.
--- /opt/local/libexec/git-core/git-svn.orig 2009-04-02 11:10:17.000000000 -0700
+++ /opt/local/libexec/git-core/git-svn 2009-04-02 11:24:34.000000000 -0700
@@ -84,6 +84,7 @@
'repack-flags|repack-args|repack-opts=s' =>
\$Git::SVN::_repack_flags,
'use-log-author' => \$Git::SVN::_use_log_author,
+ 'use-svk-log-author' => \$Git::SVN::_use_svk_log_author,
'add-author-from' => \$Git::SVN::_add_author_from,
%remote_opts );
@@ -1365,7 +1366,7 @@
use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent
$_repack $_repack_flags $_use_svm_props $_head
$_use_svnsync_props $no_reuse_existing $_minimize_url
- $_use_log_author $_add_author_from/;
+ $_use_log_author $_add_author_from $_use_svk_log_author/;
use Carp qw/croak/;
use File::Path qw/mkpath/;
use File::Copy qw/copy/;
@@ -2578,6 +2579,14 @@
$log_entry{date} = parse_svn_date($log_entry{date});
$log_entry{log} .= "\n";
my $author = $log_entry{author} = check_author($log_entry{author});
+
+ if ($_use_svk_log_author) {
+ # assume that the importer author is known, because checked first above.
+ # r123@host (orig r1234): author | 2006-05-17 17:07:42 -0700
+ if ($log_entry{log} =~ /\s+r\d+\@.+:\s+(.+)\s+\|\s+/) {
+ $author = $log_entry{author} = check_author($1);
+ }
+ }
my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
: ($author, undef);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment