{"thread":{"id":"43418","subject":"Re: git-svn and empty directories in svn","startedAt":"2006-11-28T05:44:48Z","lastAt":"2006-12-04T21:33:27Z","messageCount":14,"participants":["Eric Wong","Pazu","Seth Falcon","Steven Grimm"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"296988","messageId":"20061128054448.GA396@soma","threadId":"43418","inReplyTo":"loom.20061124T143148-286@post.gmane.org","subject":"[PATCH 1/2] git-svn: enable delta transfers during fetches when using SVN:: libs","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-28T05:44:48Z","receivedAt":"2006-11-28T05:44:48Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This should drastically reduce bandwidth used for network\ntransfers.  This is not enabled for file:// repositories by\ndefault because of the increased CPU usage and I/O needed.\n\nGIT_SVN_DELTA_FETCH may be set to a true value to enable or\nfalse (0) to disable delta transfers regardless of the\nrepository type.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |  194 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--\n 1 files changed, 189 insertions(+), 5 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex d5d9c49..9b86d91 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -68,7 +68,7 @@ my ($_revision,$_stdin,$_no_ignore_ext,$\n \t$_limit, $_verbose, $_incremental, $_oneline, $_l_fmt, $_show_commit,\n \t$_version, $_upgrade, $_authors, $_branch_all_refs, @_opt_m,\n \t$_merge, $_strategy, $_dry_run, $_ignore_nodate, $_non_recursive,\n-\t$_username, $_config_dir, $_no_auth_cache);\n+\t$_username, $_config_dir, $_no_auth_cache, $_xfer_delta);\n my (@_branch_from, %tree_map, %users, %rusers, %equiv);\n my ($_svn_co_url_revs, $_svn_pg_peg_revs);\n my @repo_path_split_cache;\n@@ -2675,6 +2675,9 @@ sub libsvn_load {\n \t\trequire SVN::Ra;\n \t\trequire SVN::Delta;\n \t\tpush @SVN::Git::Editor::ISA, 'SVN::Delta::Editor';\n+\t\tpush @SVN::Git::Fetcher::ISA, 'SVN::Delta::Editor';\n+\t\t*SVN::Git::Fetcher::process_rm = *process_rm;\n+\t\t*SVN::Git::Fetcher::safe_qx = *safe_qx;\n \t\tmy $kill_stupid_warnings = $SVN::Node::none.$SVN::Node::file.\n \t\t\t\t\t$SVN::Node::dir.$SVN::Node::unknown.\n \t\t\t\t\t$SVN::Node::none.$SVN::Node::file.\n@@ -2827,6 +2830,13 @@ sub libsvn_connect {\n \t                      config => $config,\n \t                      pool => SVN::Pool->new,\n \t                      auth_provider_callbacks => $callbacks);\n+\n+\tmy $df = $ENV{GIT_SVN_DELTA_FETCH};\n+\tif (defined $df) {\n+\t\t$_xfer_delta = $df;\n+\t} else {\n+\t\t$_xfer_delta = ($url =~ m#^file://#) ? undef : 1;\n+\t}\n \t$ra->{svn_path} = $url;\n \t$ra->{repos_root} = $ra->get_repos_root;\n \t$ra->{svn_path} =~ s#^\\Q$ra->{repos_root}\\E/*##;\n@@ -2915,6 +2925,24 @@ sub process_rm {\n }\n \n sub libsvn_fetch {\n+\t$_xfer_delta ? libsvn_fetch_delta(@_) : libsvn_fetch_full(@_);\n+}\n+\n+sub libsvn_fetch_delta {\n+\tmy ($last_commit, $paths, $rev, $author, $date, $msg) = @_;\n+\tmy $pool = SVN::Pool->new;\n+\tmy $ed = SVN::Git::Fetcher->new({ c => $last_commit, ra => $SVN,\n+\t                                  paths => $paths });\n+\tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n+\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n+\tmy (undef, $last_rev, undef) = cmt_metadata($last_commit);\n+\t$reporter->set_path('', $last_rev, 0, @lock, $pool);\n+\t$reporter->finish_report($pool);\n+\t$pool->clear;\n+\tlibsvn_log_entry($rev, $author, $date, $msg, [$last_commit]);\n+}\n+\n+sub libsvn_fetch_full {\n \tmy ($last_commit, $paths, $rev, $author, $date, $msg) = @_;\n \topen my $gui, '| git-update-index -z --index-info' or croak $!;\n \tmy @amr;\n@@ -3133,7 +3161,11 @@ sub libsvn_find_parent_branch {\n \t\tunlink $GIT_SVN_INDEX;\n \t\tprint STDERR \"Found branch parent: ($GIT_SVN) $parent\\n\";\n \t\tsys(qw/git-read-tree/, $parent);\n-\t\treturn libsvn_fetch($parent, $paths, $rev,\n+\t\t# I can't seem to get do_switch() to work correctly with\n+\t\t# the SWIG interface (TypeError when passing switch_url...),\n+\t\t# so we'll unconditionally bypass the delta interface here\n+\t\t# for now\n+\t\treturn libsvn_fetch_full($parent, $paths, $rev,\n \t\t\t\t\t$author, $date, $msg);\n \t}\n \tprint STDERR \"Nope, branch point not imported or unknown\\n\";\n@@ -3153,9 +3185,19 @@ sub libsvn_new_tree {\n \t\treturn $log_entry;\n \t}\n \tmy ($paths, $rev, $author, $date, $msg) = @_;\n-\topen my $gui, '| git-update-index -z --index-info' or croak $!;\n-\tlibsvn_traverse($gui, '', $SVN->{svn_path}, $rev);\n-\tclose $gui or croak $?;\n+\tif ($_xfer_delta) {\n+\t\tmy $pool = SVN::Pool->new;\n+\t\tmy $ed = SVN::Git::Fetcher->new({paths => $paths, ra => $SVN});\n+\t\tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n+\t\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n+\t\t$reporter->set_path('', $rev, 1, @lock, $pool);\n+\t\t$reporter->finish_report($pool);\n+\t\t$pool->clear;\n+\t} else {\n+\t\topen my $gui, '| git-update-index -z --index-info' or croak $!;\n+\t\tlibsvn_traverse($gui, '', $SVN->{svn_path}, $rev);\n+\t\tclose $gui or croak $?;\n+\t}\n \treturn libsvn_log_entry($rev, $author, $date, $msg);\n }\n \n@@ -3325,6 +3367,148 @@ sub copy_remote_ref {\n \t\t\t\t\"refs/remotes/$GIT_SVN on $origin\\n\";\n \t}\n }\n+package SVN::Git::Fetcher;\n+use vars qw/@ISA/;\n+use strict;\n+use warnings;\n+use Carp qw/croak/;\n+use IO::File qw//;\n+\n+# file baton members: path, mode_a, mode_b, pool, fh, blob, base\n+sub new {\n+\tmy ($class, $git_svn) = @_;\n+\tmy $self = SVN::Delta::Editor->new;\n+\tbless $self, $class;\n+\topen my $gui, '| git-update-index -z --index-info' or croak $!;\n+\t$self->{gui} = $gui;\n+\t$self->{c} = $git_svn->{c} if exists $git_svn->{c};\n+\tif (my $p = $git_svn->{paths} && $git_svn->{ra}) {\n+\t\tmy $s = $git_svn->{ra}->{svn_path};\n+\t\t$s = length $s ? qr#^/\\Q$s\\E/# : qr#^/#;\n+\t\t$self->{paths} = { map { my $x = $_;\n+\t\t                         $x =~ s/$s//;\n+\t\t                         $x => $p->{$_} } keys %$p };\n+\t}\n+\trequire Digest::MD5;\n+\t$self;\n+}\n+\n+sub delete_entry {\n+\tmy ($self, $path, $rev, $pb) = @_;\n+\tprocess_rm($self->{gui}, $self->{c}, $path);\n+\tundef;\n+}\n+\n+sub open_file {\n+\tmy ($self, $path, $pb, $rev) = @_;\n+\tmy ($mode, $blob) = (safe_qx('git-ls-tree',$self->{c},'--',$path)\n+\t                     =~ /^(\\d{6}) blob ([a-f\\d]{40})\\t/);\n+\t{ path => $path, mode_a => $mode, mode_b => $mode, blob => $blob,\n+\t  pool => SVN::Pool->new };\n+}\n+\n+sub add_file {\n+\tmy ($self, $path, $pb, $cp_path, $cp_rev) = @_;\n+\t{ path => $path, mode_a => 100644, mode_b => 100644,\n+\t  pool => SVN::Pool->new };\n+}\n+\n+sub change_file_prop {\n+\tmy ($self, $fb, $prop, $value) = @_;\n+\tif ($prop eq 'svn:executable') {\n+\t\tif ($fb->{mode_b} != 120000) {\n+\t\t\t$fb->{mode_b} = defined $value ? 100755 : 100644;\n+\t\t}\n+\t} elsif ($prop eq 'svn:special') {\n+\t\t$fb->{mode_b} = defined $value ? 120000 : 100644;\n+\t}\n+\tundef;\n+}\n+\n+sub apply_textdelta {\n+\tmy ($self, $fb, $exp) = @_;\n+\tmy $fh = IO::File->new_tmpfile;\n+\t$fh->autoflush(1);\n+\t# $fh gets auto-closed() by SVN::TxDelta::apply(),\n+\t# (but $base does not,) so dup() it for reading in close_file\n+\topen my $dup, '<&', $fh or croak $!;\n+\tmy $base = IO::File->new_tmpfile;\n+\t$base->autoflush(1);\n+\tif ($fb->{blob}) {\n+\t\tdefined (my $pid = fork) or croak $!;\n+\t\tif (!$pid) {\n+\t\t\topen STDOUT, '>&', $base or croak $!;\n+\t\t\tprint STDOUT 'link ' if ($fb->{mode_a} == 120000);\n+\t\t\texec qw/git-cat-file blob/, $fb->{blob} or croak $!;\n+\t\t}\n+\t\twaitpid $pid, 0;\n+\t\tcroak $? if $?;\n+\n+\t\tif (defined $exp) {\n+\t\t\tseek $base, 0, 0 or croak $!;\n+\t\t\tmy $md5 = Digest::MD5->new;\n+\t\t\t$md5->addfile($base);\n+\t\t\tmy $got = $md5->hexdigest;\n+\t\t\tdie \"Checksum mismatch: $fb->{path} $fb->{blob}\\n\",\n+\t\t\t    \"expected: $exp\\n\",\n+\t\t\t    \"     got: $got\\n\" if ($got ne $exp);\n+\t\t}\n+\t}\n+\tseek $base, 0, 0 or croak $!;\n+\t$fb->{fh} = $dup;\n+\t$fb->{base} = $base;\n+\t[ SVN::TxDelta::apply($base, $fh, undef, $fb->{path}, $fb->{pool}) ];\n+}\n+\n+sub close_file {\n+\tmy ($self, $fb, $exp) = @_;\n+\tmy $hash;\n+\tmy $path = $fb->{path};\n+\tif (my $fh = $fb->{fh}) {\n+\t\tseek($fh, 0, 0) or croak $!;\n+\t\tmy $md5 = Digest::MD5->new;\n+\t\t$md5->addfile($fh);\n+\t\tmy $got = $md5->hexdigest;\n+\t\tdie \"Checksum mismatch: $path\\n\",\n+\t\t    \"expected: $exp\\n    got: $got\\n\" if ($got ne $exp);\n+\t\tseek($fh, 0, 0) or croak $!;\n+\t\tif ($fb->{mode_b} == 120000) {\n+\t\t\tread($fh, my $buf, 5) == 5 or croak $!;\n+\t\t\t$buf eq 'link ' or die \"$path has mode 120000\",\n+\t\t\t                       \"but is not a link\\n\";\n+\t\t}\n+\t\tdefined(my $pid = open my $out,'-|') or die \"Can't fork: $!\\n\";\n+\t\tif (!$pid) {\n+\t\t\topen STDIN, '<&', $fh or croak $!;\n+\t\t\texec qw/git-hash-object -w --stdin/ or croak $!;\n+\t\t}\n+\t\tchomp($hash = do { local $/; <$out> });\n+\t\tclose $out or croak $!;\n+\t\tclose $fh or croak $!;\n+\t\t$hash =~ /^[a-f\\d]{40}$/ or die \"not a sha1: $hash\\n\";\n+\t\tclose $fb->{base} or croak $!;\n+\t} else {\n+\t\t$hash = $fb->{blob} or die \"no blob information\\n\";\n+\t}\n+\t$fb->{pool}->clear;\n+\tmy $gui = $self->{gui};\n+\tprint $gui \"$fb->{mode_b} $hash\\t$path\\0\" or croak $!;\n+\tprint \"\\t\", $self->{paths}->{$path}->action,\n+\t      \"\\t$path\\n\" if defined $self->{paths}->{$path};\n+\tundef;\n+}\n+\n+sub abort_edit {\n+\tmy $self = shift;\n+\tclose $self->{gui};\n+\t$self->SUPER::abort_edit(@_);\n+}\n+\n+sub close_edit {\n+\tmy $self = shift;\n+\tclose $self->{gui} or croak;\n+\t$self->SUPER::close_edit(@_);\n+}\n \n package SVN::Git::Editor;\n use vars qw/@ISA/;\n-- \n1.4.4.1.g22a08\n"},{"id":"295638","messageId":"20061128102958.GA5207@soma","threadId":"43418","inReplyTo":"20061128054448.GA396@soma","subject":"[PATCH 1.1/2] git-svn: fix output reporting from the delta fetcher","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-28T10:29:58Z","receivedAt":"2006-11-28T10:29:58Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"There was nothing printed in the code originally because I left\nout a pair of parentheses.  Nevertheless, the affected code has\nbeen replaced with a more efficient version that respects the -q\nflag as well as requiring less bandwidth.\n\nWe save some bandwidth by not requesting changed paths\ninformation when calling get_log() since we're using the delta\nfetcher.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |   31 +++++++++++++------------------\n 1 files changed, 13 insertions(+), 18 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 9b86d91..1a675c4 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2906,7 +2906,7 @@ sub libsvn_log_entry {\n }\n \n sub process_rm {\n-\tmy ($gui, $last_commit, $f) = @_;\n+\tmy ($gui, $last_commit, $f, $q) = @_;\n \t# remove entire directories.\n \tif (safe_qx('git-ls-tree',$last_commit,'--',$f) =~ /^040000 tree/) {\n \t\tdefined(my $pid = open my $ls, '-|') or croak $!;\n@@ -2917,10 +2917,13 @@ sub process_rm {\n \t\tlocal $/ = \"\\0\";\n \t\twhile (<$ls>) {\n \t\t\tprint $gui '0 ',0 x 40,\"\\t\",$_ or croak $!;\n+\t\t\tprint \"\\tD\\t$_\\n\" unless $q;\n \t\t}\n+\t\tprint \"\\tD\\t$f/\\n\" unless $q;\n \t\tclose $ls or croak $?;\n \t} else {\n \t\tprint $gui '0 ',0 x 40,\"\\t\",$f,\"\\0\" or croak $!;\n+\t\tprint \"\\tD\\t$f\\n\" unless $q;\n \t}\n }\n \n@@ -2931,8 +2934,7 @@ sub libsvn_fetch {\n sub libsvn_fetch_delta {\n \tmy ($last_commit, $paths, $rev, $author, $date, $msg) = @_;\n \tmy $pool = SVN::Pool->new;\n-\tmy $ed = SVN::Git::Fetcher->new({ c => $last_commit, ra => $SVN,\n-\t                                  paths => $paths });\n+\tmy $ed = SVN::Git::Fetcher->new({ c => $last_commit, q => $_q });\n \tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n \tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n \tmy (undef, $last_rev, undef) = cmt_metadata($last_commit);\n@@ -2956,8 +2958,7 @@ sub libsvn_fetch_full {\n \t\t\t$f =~ s#^/##;\n \t\t}\n \t\tif ($m =~ /^[DR]$/) {\n-\t\t\tprint \"\\t$m\\t$f\\n\" unless $_q;\n-\t\t\tprocess_rm($gui, $last_commit, $f);\n+\t\t\tprocess_rm($gui, $last_commit, $f, $_q);\n \t\t\tnext if $m eq 'D';\n \t\t\t# 'R' can be file replacements, too, right?\n \t\t}\n@@ -3174,6 +3175,7 @@ sub libsvn_find_parent_branch {\n \n sub libsvn_get_log {\n \tmy ($ra, @args) = @_;\n+\t$args[4] = 0 if $_xfer_delta && ! $_follow_parent;\n \tif ($SVN::Core::VERSION le '1.2.0') {\n \t\tsplice(@args, 3, 1);\n \t}\n@@ -3187,7 +3189,7 @@ sub libsvn_new_tree {\n \tmy ($paths, $rev, $author, $date, $msg) = @_;\n \tif ($_xfer_delta) {\n \t\tmy $pool = SVN::Pool->new;\n-\t\tmy $ed = SVN::Git::Fetcher->new({paths => $paths, ra => $SVN});\n+\t\tmy $ed = SVN::Git::Fetcher->new({q => $_q});\n \t\tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n \t\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n \t\t$reporter->set_path('', $rev, 1, @lock, $pool);\n@@ -3382,20 +3384,14 @@ sub new {\n \topen my $gui, '| git-update-index -z --index-info' or croak $!;\n \t$self->{gui} = $gui;\n \t$self->{c} = $git_svn->{c} if exists $git_svn->{c};\n-\tif (my $p = $git_svn->{paths} && $git_svn->{ra}) {\n-\t\tmy $s = $git_svn->{ra}->{svn_path};\n-\t\t$s = length $s ? qr#^/\\Q$s\\E/# : qr#^/#;\n-\t\t$self->{paths} = { map { my $x = $_;\n-\t\t                         $x =~ s/$s//;\n-\t\t                         $x => $p->{$_} } keys %$p };\n-\t}\n+\t$self->{q} = $git_svn->{q};\n \trequire Digest::MD5;\n \t$self;\n }\n \n sub delete_entry {\n \tmy ($self, $path, $rev, $pb) = @_;\n-\tprocess_rm($self->{gui}, $self->{c}, $path);\n+\tprocess_rm($self->{gui}, $self->{c}, $path, $self->{q});\n \tundef;\n }\n \n@@ -3404,13 +3400,13 @@ sub open_file {\n \tmy ($mode, $blob) = (safe_qx('git-ls-tree',$self->{c},'--',$path)\n \t                     =~ /^(\\d{6}) blob ([a-f\\d]{40})\\t/);\n \t{ path => $path, mode_a => $mode, mode_b => $mode, blob => $blob,\n-\t  pool => SVN::Pool->new };\n+\t  pool => SVN::Pool->new, action => 'M' };\n }\n \n sub add_file {\n \tmy ($self, $path, $pb, $cp_path, $cp_rev) = @_;\n \t{ path => $path, mode_a => 100644, mode_b => 100644,\n-\t  pool => SVN::Pool->new };\n+\t  pool => SVN::Pool->new, action => 'A' };\n }\n \n sub change_file_prop {\n@@ -3493,8 +3489,7 @@ sub close_file {\n \t$fb->{pool}->clear;\n \tmy $gui = $self->{gui};\n \tprint $gui \"$fb->{mode_b} $hash\\t$path\\0\" or croak $!;\n-\tprint \"\\t\", $self->{paths}->{$path}->action,\n-\t      \"\\t$path\\n\" if defined $self->{paths}->{$path};\n+\tprint \"\\t$fb->{action}\\t$path\\n\" if $fb->{action} && ! $self->{q};\n \tundef;\n }\n \n-- \n1.4.4.1.g22a08\n"},{"id":"295598","messageId":"20061128105017.GA20366@soma","threadId":"43418","inReplyTo":"20061128102958.GA5207@soma","subject":"[PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-28T10:50:17Z","receivedAt":"2006-11-28T10:50:17Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"There was nothing printed in the code originally because I left\nout a pair of parentheses.  Nevertheless, the affected code has\nbeen replaced with a more efficient version that respects the -q\nflag as well as requiring less bandwidth.\n\nWe save some bandwidth by not requesting changed paths\ninformation when calling get_log() since we're using the delta\nfetcher.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\nOops, the previous one (1.1) was broken with the the graft branches test\nThis one fixes it.\n\n git-svn.perl |   35 +++++++++++++++--------------------\n 1 files changed, 15 insertions(+), 20 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 9b86d91..7942bba 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1152,7 +1152,7 @@ sub graft_file_copy_lib {\n \twhile (1) {\n \t\tmy $pool = SVN::Pool->new;\n \t\tlibsvn_get_log(libsvn_dup_ra($SVN), [$path],\n-\t\t               $min, $max, 0, 1, 1,\n+\t\t               $min, $max, 0, 2, 1,\n \t\t\tsub {\n \t\t\t\tlibsvn_graft_file_copies($grafts, $tree_paths,\n \t\t\t\t\t\t\t$path, @_);\n@@ -2906,7 +2906,7 @@ sub libsvn_log_entry {\n }\n \n sub process_rm {\n-\tmy ($gui, $last_commit, $f) = @_;\n+\tmy ($gui, $last_commit, $f, $q) = @_;\n \t# remove entire directories.\n \tif (safe_qx('git-ls-tree',$last_commit,'--',$f) =~ /^040000 tree/) {\n \t\tdefined(my $pid = open my $ls, '-|') or croak $!;\n@@ -2917,10 +2917,13 @@ sub process_rm {\n \t\tlocal $/ = \"\\0\";\n \t\twhile (<$ls>) {\n \t\t\tprint $gui '0 ',0 x 40,\"\\t\",$_ or croak $!;\n+\t\t\tprint \"\\tD\\t$_\\n\" unless $q;\n \t\t}\n+\t\tprint \"\\tD\\t$f/\\n\" unless $q;\n \t\tclose $ls or croak $?;\n \t} else {\n \t\tprint $gui '0 ',0 x 40,\"\\t\",$f,\"\\0\" or croak $!;\n+\t\tprint \"\\tD\\t$f\\n\" unless $q;\n \t}\n }\n \n@@ -2931,8 +2934,7 @@ sub libsvn_fetch {\n sub libsvn_fetch_delta {\n \tmy ($last_commit, $paths, $rev, $author, $date, $msg) = @_;\n \tmy $pool = SVN::Pool->new;\n-\tmy $ed = SVN::Git::Fetcher->new({ c => $last_commit, ra => $SVN,\n-\t                                  paths => $paths });\n+\tmy $ed = SVN::Git::Fetcher->new({ c => $last_commit, q => $_q });\n \tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n \tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n \tmy (undef, $last_rev, undef) = cmt_metadata($last_commit);\n@@ -2956,8 +2958,7 @@ sub libsvn_fetch_full {\n \t\t\t$f =~ s#^/##;\n \t\t}\n \t\tif ($m =~ /^[DR]$/) {\n-\t\t\tprint \"\\t$m\\t$f\\n\" unless $_q;\n-\t\t\tprocess_rm($gui, $last_commit, $f);\n+\t\t\tprocess_rm($gui, $last_commit, $f, $_q);\n \t\t\tnext if $m eq 'D';\n \t\t\t# 'R' can be file replacements, too, right?\n \t\t}\n@@ -3098,7 +3099,7 @@ sub revisions_eq {\n \t\t# should be OK to use Pool here (r1 - r0) should be small\n \t\tmy $pool = SVN::Pool->new;\n \t\tlibsvn_get_log($SVN, [$path], $r0, $r1,\n-\t\t\t\t0, 1, 1, sub {$nr++}, $pool);\n+\t\t\t\t0, 0, 1, sub {$nr++}, $pool);\n \t\t$pool->clear;\n \t} else {\n \t\tmy ($url, undef) = repo_path_split($SVN_URL);\n@@ -3174,6 +3175,7 @@ sub libsvn_find_parent_branch {\n \n sub libsvn_get_log {\n \tmy ($ra, @args) = @_;\n+\t$args[4]-- if $args[4] && $_xfer_delta && ! $_follow_parent;\n \tif ($SVN::Core::VERSION le '1.2.0') {\n \t\tsplice(@args, 3, 1);\n \t}\n@@ -3187,7 +3189,7 @@ sub libsvn_new_tree {\n \tmy ($paths, $rev, $author, $date, $msg) = @_;\n \tif ($_xfer_delta) {\n \t\tmy $pool = SVN::Pool->new;\n-\t\tmy $ed = SVN::Git::Fetcher->new({paths => $paths, ra => $SVN});\n+\t\tmy $ed = SVN::Git::Fetcher->new({q => $_q});\n \t\tmy $reporter = $SVN->do_update($rev, '', 1, $ed, $pool);\n \t\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n \t\t$reporter->set_path('', $rev, 1, @lock, $pool);\n@@ -3382,20 +3384,14 @@ sub new {\n \topen my $gui, '| git-update-index -z --index-info' or croak $!;\n \t$self->{gui} = $gui;\n \t$self->{c} = $git_svn->{c} if exists $git_svn->{c};\n-\tif (my $p = $git_svn->{paths} && $git_svn->{ra}) {\n-\t\tmy $s = $git_svn->{ra}->{svn_path};\n-\t\t$s = length $s ? qr#^/\\Q$s\\E/# : qr#^/#;\n-\t\t$self->{paths} = { map { my $x = $_;\n-\t\t                         $x =~ s/$s//;\n-\t\t                         $x => $p->{$_} } keys %$p };\n-\t}\n+\t$self->{q} = $git_svn->{q};\n \trequire Digest::MD5;\n \t$self;\n }\n \n sub delete_entry {\n \tmy ($self, $path, $rev, $pb) = @_;\n-\tprocess_rm($self->{gui}, $self->{c}, $path);\n+\tprocess_rm($self->{gui}, $self->{c}, $path, $self->{q});\n \tundef;\n }\n \n@@ -3404,13 +3400,13 @@ sub open_file {\n \tmy ($mode, $blob) = (safe_qx('git-ls-tree',$self->{c},'--',$path)\n \t                     =~ /^(\\d{6}) blob ([a-f\\d]{40})\\t/);\n \t{ path => $path, mode_a => $mode, mode_b => $mode, blob => $blob,\n-\t  pool => SVN::Pool->new };\n+\t  pool => SVN::Pool->new, action => 'M' };\n }\n \n sub add_file {\n \tmy ($self, $path, $pb, $cp_path, $cp_rev) = @_;\n \t{ path => $path, mode_a => 100644, mode_b => 100644,\n-\t  pool => SVN::Pool->new };\n+\t  pool => SVN::Pool->new, action => 'A' };\n }\n \n sub change_file_prop {\n@@ -3493,8 +3489,7 @@ sub close_file {\n \t$fb->{pool}->clear;\n \tmy $gui = $self->{gui};\n \tprint $gui \"$fb->{mode_b} $hash\\t$path\\0\" or croak $!;\n-\tprint \"\\t\", $self->{paths}->{$path}->action,\n-\t      \"\\t$path\\n\" if defined $self->{paths}->{$path};\n+\tprint \"\\t$fb->{action}\\t$path\\n\" if $fb->{action} && ! $self->{q};\n \tundef;\n }\n \n-- \n1.4.4.1.g22a08\n"},{"id":"297277","messageId":"9e7ab7380611280445r4ebe344cw69cbc18a74c6122f@mail.gmail.com","threadId":"43418","inReplyTo":"20061128105017.GA20366@soma","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-11-28T12:45:24Z","receivedAt":"2006-11-28T12:45:24Z","isPatch":true,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"I've tried applying the patch, and running init'ing a new git-svn\nrepository for my project. The initial commit was fetched OK (and very\nfast!), but now I get the following error trying to fetch any later\nrevision:\n\nError from SVN, (200003): Incomplete data: Delta source ended unexpectedly\n at /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/SVN/Ra.pm line 157\n512 at /Users/pazu/bin/git-svn line 448\n        main::fetch_lib() called at /Users/pazu/bin/git-svn line 319\n        main::fetch() called at /Users/pazu/bin/git-svn line 178\n\nI'm on Mac OS X 10.4.8 (Intel), with perl 5.8.8 compiled from\nmacports, and SVN perl bindings from subversion 1.4.0, also compiled\nfrom macports. git was built from 'master' plus your patches.\n\n"},{"id":"298090","messageId":"9e7ab7380611280732k4e940380tbf2a96146807d671@mail.gmail.com","threadId":"43418","inReplyTo":"9e7ab7380611280445r4ebe344cw69cbc18a74c6122f@mail.gmail.com","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-11-28T15:32:56Z","receivedAt":"2006-11-28T15:32:56Z","isPatch":true,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"On 11/28/06, Pazu <pazu@pazu.com.br> wrote:\n\n> Error from SVN, (200003): Incomplete data: Delta source ended unexpectedly\n>  at /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/SVN/Ra.pm line 157\n> 512 at /Users/pazu/bin/git-svn line 448\n>         main::fetch_lib() called at /Users/pazu/bin/git-svn line 319\n>         main::fetch() called at /Users/pazu/bin/git-svn line 178\n\nI've added some debug statements to git-svn and found more\ninformation. Apparently, this error is happening because\nSVN::Git::Fetcher is trying to open a file that hasn't been fetched by\ngit-svn yet. Now, *why* this is happening, I don't know. Maybe\nsomething happened while fetching the initial revision.\n\nHere's the output from my \"debug\" run:\n\nCreating fetcher for revision 9785a6fc2d61a6f9b702bb8e2dd81b11415e6e92\nStarting update on revision 11159\nOpening CamelEar/config/glconfig.xml@11143\nError from SVN, (200003): Incomplete data: Delta source ended unexpectedly\n\nHere, SVN::Git::Fetcher received a request to open\nCamelEar/config/glconfig.xml, but:\n\nmini:~/devel/camel-git pazu$ git-ls-tree\n9785a6fc2d61a6f9b702bb8e2dd81b11415e6e92\n040000 tree 9a02a43ec34e88d4cee64d322354a49c8f6063e2    BungeIntegrationService\n040000 tree 6e0bc09356f480f8b6ec782420c4af322ed3bc0a\nBungeIntegrationServiceClient\n040000 tree 5da3e715525c9b436fdf9a9dfb4de2bffd8e5ff3    CamelService\n040000 tree a2d36b9cc469a52aea4f2422ffab30b9a1ee67de    CamelServiceClient\n040000 tree 3d550fad4dcf09a8d45c5e5808dac4883854872c    CamelServiceTests\n040000 tree 1fcd2416b4c8494c066abc38051db5244ee801cd    CamelWeb\n040000 tree d2e30726674b22e06b4ec07aa68b49f925609c85    Reports\n040000 tree 007c4ded31cf16418a7fb0b2ffbe2b796e7ce11e    Servers\n100644 blob da2d34be7d44fff5cf70702edc61fd8b6057a14a    _root.iml\n100644 blob 6219148365613fd6195b8558376455c3379bbd6e    bg-cam.ipr\n100644 blob 25d3fbab0971940cf2cdbe399fd2b79cb21de1b5    build.xml\n100644 blob abc91fc1b268a3610a927125b88c1ad05c095d95    checkout-svn-build.sh\n100644 blob 475a5dc68c8e0eaaac3a182c078c04b947825469    cvs-checkout.xml\n\nNotice that there's no \"CamelEar\" directory. For some reason, it\nwasn't fetched in the initial revision. Now, just to make sure this\nisn't svn fault:\n\nmini:~/devel/camel-git pazu$ svn ls -r11143\nhttps://tech.bga.bunge.com/BungeHomeExt/GLS/trunk/java/bg-cam\n.cvsignore\nBungeIntegrationEar/\nBungeIntegrationService/\nBungeIntegrationServiceClient/\nCamelEar/\nCamelService/\nCamelServiceClient/\nCamelServiceTests/\nCamelWeb/\nReports/\nServers/\nServers_W6/\n_root.iml\nbg-cam.ipr\nbuild.ws.properties.example\nbuild.xml\ncheckout-build.sh\ncheckout-svn-build.sh\ncvs-checkout.xml\nsvn-checkout.xml\n\nSo yeah, CamelEar was supposed to exist in this revision, but for some\nreason, git-svn missed it. I'll keep trying to find why that happened\n-- my bets are on a broken network connection during the initial\nfetch, with git-svn accepting what it got so far as the initial\nrevision, instead of reporting the broken connection.\n\n"},{"id":"296499","messageId":"m2bqmr1rnw.fsf@ziti.fhcrc.org","threadId":"43418","inReplyTo":"9e7ab7380611280732k4e940380tbf2a96146807d671@mail.gmail.com","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-28T16:07:15Z","receivedAt":"2006-11-28T16:07:15Z","isPatch":true,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Pazu <pazu@pazu.com.br> writes:\n> Notice that there's no \"CamelEar\" directory. For some reason, it\n> wasn't fetched in the initial revision. Now, just to make sure this\n> isn't svn fault:\n>\n> mini:~/devel/camel-git pazu$ svn ls -r11143\n> https://tech.bga.bunge.com/BungeHomeExt/GLS/trunk/java/bg-cam\n> .cvsignore\n> BungeIntegrationEar/\n> BungeIntegrationService/\n> BungeIntegrationServiceClient/\n> CamelEar/\n\nIs CamelEar an empty directory (or was it an empty directory in the\nfirst fetch) by any chance?\n\nI think that presently git-svn does not create empty dirs when pulling\nfrom svn.  It would be nice to have such directories created since\nsome projects will expect the empty dir to be there (no need to track\nit in git, IMO).\n\n"},{"id":"295445","messageId":"9e7ab7380611280856i1542090dhd284b5567fa2b19@mail.gmail.com","threadId":"43418","inReplyTo":"m2bqmr1rnw.fsf@ziti.fhcrc.org","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-11-28T16:56:29Z","receivedAt":"2006-11-28T16:56:29Z","isPatch":true,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"On 11/28/06, Seth Falcon <sethfalcon@gmail.com> wrote:\n\n> Is CamelEar an empty directory (or was it an empty directory in the\n> first fetch) by any chance?\n\nNo, neither. The directory isn't empty on the requested revision, nor\nin the initial revision. Anyways…\n\nI've tried to init and fetch the repository again, and guess what, it\nworked. So my bet that this was caused by a broken connection during\nthe initial fetch was probably right -- I'll try to \"force\" a broken\nconnection and see what happens…\n\nHmmm.…\n\nmini:/tmp pazu$ git-svn init\nhttps://tech.bga.bunge.com/BungeHomeExt/GLS/trunk/java/bg-cam\nmini:/tmp pazu$ git-svn fetch\n        A       bg-cam.ipr\n        A       CamelWeb/CamelWeb.iml\n        A       CamelWeb/.classpath\n        A       CamelWeb/JavaSource/.emptyDir\n        A       CamelWeb/.serverPreference\n        A       CamelWeb/.website-config\n        ...\n        <<Here I turned AirPort off>>\nCommitting initial tree d14cd2aca9a6f15fdc8875212776c6a7cd111341\nr8618 = 5a994a730da8dc8141fd116100a773061b7d4212\nCreating fetcher for revision 5a994a730da8dc8141fd116100a773061b7d4212\nStarting update on revision 9236\nOpening CamelService/ejbModule/com/bunge/logistics/elevator/service/util/ElevatorConstants.java@8618\nError from SVN, (200003): Incomplete data: Delta source ended unexpectedly\n\nWhen I deactivated AirPort, git-svn hang for a long while, but it\nfinally timed out and just saved what it got so far as the initial\nrevision. Then when git-svn tried to fetch the next revision, it ended\nup trying to open a file that wasn't checked out during the (broken)\ninitial fetch.\n\nWell, it seems I've found the problem. Unfortunately I have no idea\nhow to fix that… I'll read some subversion books and source code to\nfigure that out.\n\n"},{"id":"298519","messageId":"20061128201605.GA1369@localdomain","threadId":"43418","inReplyTo":"m2bqmr1rnw.fsf@ziti.fhcrc.org","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-28T20:16:05Z","receivedAt":"2006-11-28T20:16:05Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Seth Falcon <sethfalcon@gmail.com> wrote:\n> Pazu <pazu@pazu.com.br> writes:\n> > Notice that there's no \"CamelEar\" directory. For some reason, it\n> > wasn't fetched in the initial revision. Now, just to make sure this\n> > isn't svn fault:\n> >\n> > mini:~/devel/camel-git pazu$ svn ls -r11143\n> > https://tech.bga.bunge.com/BungeHomeExt/GLS/trunk/java/bg-cam\n> > .cvsignore\n> > BungeIntegrationEar/\n> > BungeIntegrationService/\n> > BungeIntegrationServiceClient/\n> > CamelEar/\n> \n> Is CamelEar an empty directory (or was it an empty directory in the\n> first fetch) by any chance?\n> \n> I think that presently git-svn does not create empty dirs when pulling\n> from svn.  It would be nice to have such directories created since\n> some projects will expect the empty dir to be there (no need to track\n> it in git, IMO).\n\nGit itself cannot easily track empty directories (at least as far as\nupdate-index and checkout) goes.\n\nWhat I *can* do is run mktree and to force the creation of tree objects\nwith a 4b825dc642cb6eb9a060e54bf8d69288fbee4904 (empty) sub tree and run\ncommit-tree on it, but checkout/checkout-index would still need to be\nmodified to support it.\n\nIs that something the git community wants?\n\n-- \n"},{"id":"295004","messageId":"9e7ab7380611281247h723a16fapc5a9898e8a4c7e1f@mail.gmail.com","threadId":"43418","inReplyTo":"20061128201605.GA1369@localdomain","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-11-28T20:47:50Z","receivedAt":"2006-11-28T20:47:50Z","isPatch":true,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"On 11/28/06, Eric Wong <normalperson@yhbt.net> wrote:\n\n> Git itself cannot easily track empty directories (at least as far as\n> update-index and checkout) goes.\n> [...]\n> Is that something the git community wants?\n\nNo, I guess not. I detailed the real problem in my previous message,\nand it had nothing to do with empty directories, but with git-svn\nrecording broken revisions from svn. Did you get it, or Trogdor ate my\nemail?\n\n"},{"id":"298144","messageId":"20061128211506.GA4486@hand.yhbt.net","threadId":"43418","inReplyTo":"9e7ab7380611281247h723a16fapc5a9898e8a4c7e1f@mail.gmail.com","subject":"Re: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-28T21:15:07Z","receivedAt":"2006-11-28T21:15:07Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Pazu <pazu@pazu.com.br> wrote:\n> On 11/28/06, Eric Wong <normalperson@yhbt.net> wrote:\n> \n> >Git itself cannot easily track empty directories (at least as far as\n> >update-index and checkout) goes.\n> >[...]\n> >Is that something the git community wants?\n> \n> No, I guess not. I detailed the real problem in my previous message,\n> and it had nothing to do with empty directories, but with git-svn\n> recording broken revisions from svn. Did you get it, or Trogdor ate my\n> email?\n\nOops, I didn't notice the part about git-svn continuing despite a failed\nconnection.  Thanks for poking me again.\nI'll look into how/if abort_edit/close_edit is called and how to deal\nwith a failed network connection.\n\n-- \n"},{"id":"295164","messageId":"m2slg2rzzj.fsf_-_@ziti.fhcrc.org","threadId":"43418","inReplyTo":"20061128201605.GA1369@localdomain","subject":"git-svn and empty directories in svn (was: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher)","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-29T16:15:12Z","receivedAt":"2006-11-29T16:15:12Z","isPatch":true,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Hi Eric, and list,\n\nEric Wong <normalperson@yhbt.net> writes:\n> Seth Falcon <sethfalcon@gmail.com> wrote:\n>> I think that presently git-svn does not create empty dirs when pulling\n>> from svn.  It would be nice to have such directories created since\n>> some projects will expect the empty dir to be there (no need to track\n>> it in git, IMO).\n>\n> Git itself cannot easily track empty directories (at least as far as\n> update-index and checkout) goes.\n>\n> What I *can* do is run mktree and to force the creation of tree objects\n> with a 4b825dc642cb6eb9a060e54bf8d69288fbee4904 (empty) sub tree and run\n> commit-tree on it, but checkout/checkout-index would still need to be\n> modified to support it.\n>\n> Is that something the git community wants?\n\nI recently encountered a situation where code wasn't working for me\nbecause git-svn didn't create an empty dir that is present in svn.\n\nI'm not trying to argue for the sense/anti-sense of tracking empty\ndirs in an scm, but I think this is an issue worth addressing in some\nfashion.  Here's why.\n\nI think there are many potential git users out there who are currently\nsvn users.  And git-svn is a really nice way to get started, but this\nsort of stumbling block could really turn people off.  For example, it\nmade me look pretty dumb when I carelessly complained to my colleague\nabout his code not working and then it turns out to be because my\nsuper-advanced scm tool \"messed things up\".\n\nOne simple thing (I think it would be simple) is that git-svn could\nissue a loud warning when it encounters an empty directory that it is\ngoing to ignore.\n\nI don't understand the implications adding the tracking of empty dirs\nto git.  I suspect it has been discussed before, but haven't yet gone\nfishing in the list archives.  I imagine it would make the argument\neasier for folks wanting to switch a project from svn to git if this\nwasn't one of the differences.  For good or bad, I've often heard this\nsvn feature as a motivator to switch from cvs.\n\n\n+ seth\n"},{"id":"294965","messageId":"20061203014756.GE1369@localdomain","threadId":"43418","inReplyTo":"m2slg2rzzj.fsf_-_@ziti.fhcrc.org","subject":"Re: git-svn and empty directories in svn (was: [PATCH 1.2/2 (fixed)] git-svn: fix output reporting from the delta fetcher)","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-03T01:47:56Z","receivedAt":"2006-12-03T01:47:56Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Seth Falcon <sethfalcon@gmail.com> wrote:\n> Hi Eric, and list,\n> \n> Eric Wong <normalperson@yhbt.net> writes:\n> > Seth Falcon <sethfalcon@gmail.com> wrote:\n> >> I think that presently git-svn does not create empty dirs when pulling\n> >> from svn.  It would be nice to have such directories created since\n> >> some projects will expect the empty dir to be there (no need to track\n> >> it in git, IMO).\n> >\n> > Git itself cannot easily track empty directories (at least as far as\n> > update-index and checkout) goes.\n> >\n> > What I *can* do is run mktree and to force the creation of tree objects\n> > with a 4b825dc642cb6eb9a060e54bf8d69288fbee4904 (empty) sub tree and run\n> > commit-tree on it, but checkout/checkout-index would still need to be\n> > modified to support it.\n> >\n> > Is that something the git community wants?\n> \n> I recently encountered a situation where code wasn't working for me\n> because git-svn didn't create an empty dir that is present in svn.\n> \n> I'm not trying to argue for the sense/anti-sense of tracking empty\n> dirs in an scm, but I think this is an issue worth addressing in some\n> fashion.  Here's why.\n> \n> I think there are many potential git users out there who are currently\n> svn users.  And git-svn is a really nice way to get started, but this\n> sort of stumbling block could really turn people off.  For example, it\n> made me look pretty dumb when I carelessly complained to my colleague\n> about his code not working and then it turns out to be because my\n> super-advanced scm tool \"messed things up\".\n> \n> One simple thing (I think it would be simple) is that git-svn could\n> issue a loud warning when it encounters an empty directory that it is\n> going to ignore.\n> \n> I don't understand the implications adding the tracking of empty dirs\n> to git.  I suspect it has been discussed before, but haven't yet gone\n> fishing in the list archives.  I imagine it would make the argument\n> easier for folks wanting to switch a project from svn to git if this\n> wasn't one of the differences.  For good or bad, I've often heard this\n> svn feature as a motivator to switch from cvs.\n\nI agree that missing empty directories when tracking foreign SVN repos\nis annoying.  I've looked into this a bit more; but ended up\ntrying to reinvent the index :x\n\nSince git-svn misses some other stuff (many property settings,\nexternals) I'll be working on an internal logging format that can help\ntrack those things.  It'd be nice to have a command like git svn\ncheckout which works like git checkout; but empty directories are\ncreated.\n\n-- \n"},{"id":"297686","messageId":"45724DB0.4060607@midwinter.com","threadId":"43418","inReplyTo":"20061203014756.GE1369@localdomain","subject":"Re: git-svn and empty directories in svn","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2006-12-03T04:08:16Z","receivedAt":"2006-12-03T04:08:16Z","isPatch":false,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Eric Wong wrote:\n> Since git-svn misses some other stuff (many property settings,\n> externals) I'll be working on an internal logging format that can help\n> track those things.  It'd be nice to have a command like git svn\n> checkout which works like git checkout; but empty directories are\n> created.\n\nPresumably once the submodule support is worked out, svn externals could \nbe represented as git-svn-managed submodules, yes?\n\nIn fact, I'd go so far as to say it should be a design goal of the \nsubmodule support: you should be able to indicate somehow that a \nsubmodule is a git clone of some non-git resource, and anything that \niterates through the submodules (e.g. to freshen them from their \nrespective origins) should know how to run git-svn or whatever so it's \nall seamlessly integrated. I suppose that's a special case of making \ngit-svn and friends more tightly integrated with git in general; if the \ngit \"push\" and \"fetch\" commands know to run git-svn instead of talking \nto a remote git repository, then it might Just Work for submodules.\n\nIndependent of the supermodule being managed by git-svn, the \"my \nsoftware depends on externally-managed code\" problem that submodules are \nattempting to address would be solved a lot more comprehensively if the \nremote code base could be an svn repository and git knew enough to run \ngit-svn as appropriate to keep it fresh. (Not just svn, of course; any \nforeign CM system that has an equivalent of git-svn should work.) It'd \nbe pretty cool to have a supermodule that tied together some \nnative-git-managed code, a couple of external svn repositories, and a \nCVS tree or two, all under a single umbrella with the details \nautomatically taken care of by default.\n\n"},{"id":"294677","messageId":"20061204213327.GA9313@localdomain","threadId":"43418","inReplyTo":"45724DB0.4060607@midwinter.com","subject":"Re: git-svn and empty directories in svn","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-04T21:33:27Z","receivedAt":"2006-12-04T21:33:27Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Steven Grimm <koreth@midwinter.com> wrote:\n> Eric Wong wrote:\n> >Since git-svn misses some other stuff (many property settings,\n> >externals) I'll be working on an internal logging format that can help\n> >track those things.  It'd be nice to have a command like git svn\n> >checkout which works like git checkout; but empty directories are\n> >created.\n> \n> Presumably once the submodule support is worked out, svn externals could \n> be represented as git-svn-managed submodules, yes?\n\nYes, that is the plan.  Better integration with native git remotes is\nvery much on the roadmap for git-svn.  I'll have to work on cleaning up\nhow multi-fetch works internally, however.\n\n-- \n"}]}