{"thread":{"id":"43459","subject":"Re: [RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree'","startedAt":"2006-12-15T18:44:24Z","lastAt":"2006-12-16T21:44:56Z","messageCount":6,"participants":["Eric Wong","Seth Falcon","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"297070","messageId":"20061215184424.GA1442@localdomain","threadId":"43459","inReplyTo":"20061213202142.GE8179@localdomain","subject":"Re: [RFC] requiring Perl SVN libraries for git-svn","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-15T18:44:24Z","receivedAt":"2006-12-15T18:44:24Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> Are there any git-svn users out there who would be seriously hurt if I\n> dropped support for using the svn command-line client in git-svn?\n\nOne additional comment is that the dcommit command (much favored over\n'git svn commit') does not currently work with the command-line client.\n\n-- \n"},{"id":"294968","messageId":"m28xh8amxa.fsf@ziti.local","threadId":"43459","inReplyTo":"20061215184424.GA1442@localdomain","subject":"Re: [RFC] requiring Perl SVN libraries for git-svn","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-12-15T21:06:57Z","receivedAt":"2006-12-15T21:06:57Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Eric Wong <normalperson@yhbt.net> wrote:\n>> Are there any git-svn users out there who would be seriously hurt if I\n>> dropped support for using the svn command-line client in git-svn?\n>\n> One additional comment is that the dcommit command (much favored over\n> 'git svn commit') does not currently work with the command-line\n> client.\n\nWhich IMO, suggests that you should drop command-line support asap.\nThose wanting command-line support are most likely to be beginning\nusers who almost certainly want to be using dcommit.\n\n(that makes $0.04)\n\n"},{"id":"298134","messageId":"11662558881347-git-send-email-normalperson@yhbt.net","threadId":"43459","inReplyTo":"m28xh8amxa.fsf@ziti.local","subject":"[RFC/PATCH 1/2] git-svn: remove support for the svn command-line client","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-16T07:58:07Z","receivedAt":"2006-12-16T07:58:07Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Using the command-line client was great for prototyping and\ngetting something working quickly.  Eventually I found time\nto study the library documentation and add support for using\nthe libraries which are much faster and more flexible when\nit comes to supporting new features.\n\nNote that we require version 1.1 of the SVN libraries, whereas\nwe supported the command-line svn client down to version 1.0.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\nNote: this requires the Git.pm usage patch I posted earlier\n\n git-svn.perl                           |  883 ++------------------------------\n t/Makefile                             |   10 +-\n t/lib-git-svn.sh                       |   15 +-\n t/t9100-git-svn-basic.sh               |    4 +-\n t/t9104-git-svn-follow-parent.sh       |    7 -\n t/t9105-git-svn-commit-diff.sh         |    7 -\n t/t9106-git-svn-commit-diff-clobber.sh |    7 -\n 7 files changed, 51 insertions(+), 882 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex f453c9a..077e920 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -32,17 +32,20 @@ my %SKIP = ( 'svn:wc:ra_dav:version-url' => 1,\n );\n \n sub fatal (@) { print STDERR @_; exit 1 }\n-# If SVN:: library support is added, please make the dependencies\n-# optional and preserve the capability to use the command-line client.\n-# use eval { require SVN::... } to make it lazy load\n-# We don't use any modules not in the standard Perl distribution:\n+require SVN::Core; # use()-ing this causes segfaults for me... *shrug*\n+require SVN::Ra;\n+require SVN::Delta;\n+if ($SVN::Core::VERSION lt '1.1.0') {\n+\tfatal \"Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)\\n\";\n+}\n+push @SVN::Git::Editor::ISA, 'SVN::Delta::Editor';\n+push @SVN::Git::Fetcher::ISA, 'SVN::Delta::Editor';\n+*SVN::Git::Fetcher::process_rm = *process_rm;\n use Carp qw/croak/;\n use IO::File qw//;\n use File::Basename qw/dirname basename/;\n use File::Path qw/mkpath/;\n use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev pass_through/;\n-use File::Spec qw//;\n-use File::Copy qw/copy/;\n use POSIX qw/strftime/;\n use IPC::Open3;\n use Memoize;\n@@ -52,22 +55,7 @@ memoize('revisions_eq');\n memoize('cmt_metadata');\n memoize('get_commit_time');\n \n-my ($SVN, $_use_lib);\n-\n-sub nag_lib {\n-\tprint STDERR <<EOF;\n-! Please consider installing the SVN Perl libraries (version 1.1.0 or\n-! newer).  You will generally get better performance and fewer bugs,\n-! especially if you:\n-! 1) have a case-insensitive filesystem\n-! 2) replace symlinks with files (and vice-versa) in commits\n-\n-EOF\n-}\n-\n-$_use_lib = 1 unless $ENV{GIT_SVN_NO_LIB};\n-libsvn_load();\n-nag_lib() unless $_use_lib;\n+my ($SVN);\n \n my $_optimize_commits = 1 unless $ENV{GIT_SVN_NO_OPTIMIZE_COMMITS};\n my $sha1 = qr/[a-f\\d]{40}/;\n@@ -84,7 +72,7 @@ my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,\n \t$_username, $_config_dir, $_no_auth_cache, $_xfer_delta,\n \t$_pager, $_color);\n my (@_branch_from, %tree_map, %users, %rusers, %equiv);\n-my ($_svn_co_url_revs, $_svn_pg_peg_revs, $_svn_can_do_switch);\n+my ($_svn_can_do_switch);\n my @repo_path_split_cache;\n \n my %fc_opts = ( 'no-ignore-externals' => \\$_no_ignore_ext,\n@@ -193,7 +181,6 @@ usage(1) unless defined $cmd;\n init_vars();\n load_authors() if $_authors;\n load_all_refs() if $_branch_all_refs;\n-svn_compat_check() unless $_use_lib;\n migration_check() unless $cmd =~ /^(?:init|rebuild|multi-init|commit-diff)$/;\n $cmd{$cmd}->[0]->(@ARGV);\n exit 0;\n@@ -281,32 +268,6 @@ sub rebuild {\n \t\t$newest_rev = $rev if ($rev > $newest_rev);\n \t}\n \tcommand_close_pipe($rev_list, $ctx);\n-\n-\tgoto out if $_use_lib;\n-\tif (!chdir $SVN_WC) {\n-\t\tsvn_cmd_checkout($SVN_URL, $latest, $SVN_WC);\n-\t\tchdir $SVN_WC or croak $!;\n-\t}\n-\n-\tmy $pid = fork;\n-\tdefined $pid or croak $!;\n-\tif ($pid == 0) {\n-\t\tmy @svn_up = qw(svn up);\n-\t\tpush @svn_up, '--ignore-externals' unless $_no_ignore_ext;\n-\t\tsys(@svn_up,\"-r$newest_rev\");\n-\t\t$ENV{GIT_INDEX_FILE} = $GIT_SVN_INDEX;\n-\t\tindex_changes();\n-\t\texec('git-write-tree') or croak $!;\n-\t}\n-\twaitpid $pid, 0;\n-\tcroak $? if $?;\n-out:\n-\tif ($_upgrade) {\n-\t\tprint STDERR <<\"\";\n-Keeping deprecated refs/head/$GIT_SVN-HEAD for now.  Please remove it\n-when you have upgraded your tools and habits to use refs/remotes/$GIT_SVN\n-\n-\t}\n }\n \n sub init {\n@@ -335,69 +296,13 @@ sub init {\n sub fetch {\n \tcheck_upgrade_needed();\n \t$SVN_URL ||= file_to_s(\"$GIT_SVN_DIR/info/url\");\n-\tmy $ret = $_use_lib ? fetch_lib(@_) : fetch_cmd(@_);\n+\tmy $ret = fetch_lib(@_);\n \tif ($ret->{commit} && !verify_ref('refs/heads/master^0')) {\n \t\tcommand_noisy(qw(update-ref refs/heads/master),$ret->{commit});\n \t}\n \treturn $ret;\n }\n \n-sub fetch_cmd {\n-\tmy (@parents) = @_;\n-\tmy @log_args = -d $SVN_WC ? ($SVN_WC) : ($SVN_URL);\n-\tunless ($_revision) {\n-\t\t$_revision = -d $SVN_WC ? 'BASE:HEAD' : '0:HEAD';\n-\t}\n-\tpush @log_args, \"-r$_revision\";\n-\tpush @log_args, '--stop-on-copy' unless $_no_stop_copy;\n-\n-\tmy $svn_log = svn_log_raw(@log_args);\n-\n-\tmy $base = next_log_entry($svn_log) or croak \"No base revision!\\n\";\n-\t# don't need last_revision from grab_base_rev() because\n-\t# user could've specified a different revision to skip (they\n-\t# didn't want to import certain revisions into git for whatever\n-\t# reason, so trust $base->{revision} instead.\n-\tmy (undef, $last_commit) = svn_grab_base_rev();\n-\tunless (-d $SVN_WC) {\n-\t\tsvn_cmd_checkout($SVN_URL,$base->{revision},$SVN_WC);\n-\t\tchdir $SVN_WC or croak $!;\n-\t\tread_uuid();\n-\t\t$last_commit = git_commit($base, @parents);\n-\t\tassert_tree($last_commit);\n-\t} else {\n-\t\tchdir $SVN_WC or croak $!;\n-\t\tread_uuid();\n-\t\t# looks like a user manually cp'd and svn switch'ed\n-\t\tunless ($last_commit) {\n-\t\t\tsys(qw/svn revert -R ./);\n-\t\t\tassert_svn_wc_clean($base->{revision});\n-\t\t\t$last_commit = git_commit($base, @parents);\n-\t\t\tassert_tree($last_commit);\n-\t\t}\n-\t}\n-\tmy @svn_up = qw(svn up);\n-\tpush @svn_up, '--ignore-externals' unless $_no_ignore_ext;\n-\tmy $last = $base;\n-\twhile (my $log_msg = next_log_entry($svn_log)) {\n-\t\tif ($last->{revision} >= $log_msg->{revision}) {\n-\t\t\tcroak \"Out of order: last >= current: \",\n-\t\t\t\t\"$last->{revision} >= $log_msg->{revision}\\n\";\n-\t\t}\n-\t\t# Revert is needed for cases like:\n-\t\t# https://svn.musicpd.org/Jamming/trunk (r166:167), but\n-\t\t# I can't seem to reproduce something like that on a test...\n-\t\tsys(qw/svn revert -R ./);\n-\t\tassert_svn_wc_clean($last->{revision});\n-\t\tsys(@svn_up,\"-r$log_msg->{revision}\");\n-\t\t$last_commit = git_commit($log_msg, $last_commit, @parents);\n-\t\t$last = $log_msg;\n-\t}\n-\tclose $svn_log->{fh};\n-\t$last->{commit} = $last_commit;\n-\treturn $last;\n-}\n-\n sub fetch_lib {\n \tmy (@parents) = @_;\n \t$SVN_URL ||= file_to_s(\"$GIT_SVN_DIR/info/url\");\n@@ -498,35 +403,10 @@ sub commit {\n \t\t\tdie \"Failed to rev-parse $c\\n\";\n \t\t}\n \t}\n-\t$_use_lib ? commit_lib(@revs) : commit_cmd(@revs);\n+\tcommit_lib(@revs);\n \tprint \"Done committing \",scalar @revs,\" revisions to SVN\\n\";\n }\n \n-sub commit_cmd {\n-\tmy (@revs) = @_;\n-\n-\tchdir $SVN_WC or croak \"Unable to chdir $SVN_WC: $!\\n\";\n-\tmy $info = svn_info('.');\n-\tmy $fetched = fetch();\n-\tif ($info->{Revision} != $fetched->{revision}) {\n-\t\tprint STDERR \"There are new revisions that were fetched \",\n-\t\t\t\t\"and need to be merged (or acknowledged) \",\n-\t\t\t\t\"before committing.\\n\";\n-\t\texit 1;\n-\t}\n-\t$info = svn_info('.');\n-\tread_uuid($info);\n-\tmy $last = $fetched;\n-\tforeach my $c (@revs) {\n-\t\tmy $mods = svn_checkout_tree($last, $c);\n-\t\tif (scalar @$mods == 0) {\n-\t\t\tprint \"Skipping, no changes detected\\n\";\n-\t\t\tnext;\n-\t\t}\n-\t\t$last = svn_commit_tree($last, $c);\n-\t}\n-}\n-\n sub commit_lib {\n \tmy (@revs) = @_;\n \tmy ($r_last, $cmt_last) = svn_grab_base_rev();\n@@ -649,32 +529,6 @@ sub dcommit {\n \n sub show_ignore {\n \t$SVN_URL ||= file_to_s(\"$GIT_SVN_DIR/info/url\");\n-\t$_use_lib ? show_ignore_lib() : show_ignore_cmd();\n-}\n-\n-sub show_ignore_cmd {\n-\trequire File::Find or die $!;\n-\tif (defined $_revision) {\n-\t\tdie \"-r/--revision option doesn't work unless the Perl SVN \",\n-\t\t\t\"libraries are used\\n\";\n-\t}\n-\tchdir $SVN_WC or croak $!;\n-\tmy %ign;\n-\tFile::Find::find({wanted=>sub{if(lstat $_ && -d _ && -d \"$_/.svn\"){\n-\t\ts#^\\./##;\n-\t\t@{$ign{$_}} = svn_propget_base('svn:ignore', $_);\n-\t\t}}, no_chdir=>1},'.');\n-\n-\tprint \"\\n# /\\n\";\n-\tforeach (@{$ign{'.'}}) { print '/',$_ if /\\S/ }\n-\tdelete $ign{'.'};\n-\tforeach my $i (sort keys %ign) {\n-\t\tprint \"\\n# \",$i,\"\\n\";\n-\t\tforeach (@{$ign{$i}}) { print '/',$i,'/',$_ if /\\S/ }\n-\t}\n-}\n-\n-sub show_ignore_lib {\n \tmy $repo;\n \t$SVN ||= libsvn_connect($SVN_URL);\n \tmy $r = defined $_revision ? $_revision : $SVN->get_latest_revnum;\n@@ -706,11 +560,7 @@ sub graft_branches {\n \t\t\t}\n \t\t}\n \t\tunless ($_no_graft_copy) {\n-\t\t\tif ($_use_lib) {\n-\t\t\t\tgraft_file_copy_lib($grafts,$l_map,$u);\n-\t\t\t} else {\n-\t\t\t\tgraft_file_copy_cmd($grafts,$l_map,$u);\n-\t\t\t}\n+\t\t\tgraft_file_copy_lib($grafts,$l_map,$u);\n \t\t}\n \t}\n \tgraft_tree_joins($grafts);\n@@ -838,10 +688,6 @@ sub commit_diff_usage {\n }\n \n sub commit_diff {\n-\tif (!$_use_lib) {\n-\t\tprint STDERR \"commit-diff must be used with SVN libraries\\n\";\n-\t\texit 1;\n-\t}\n \tmy $ta = shift or commit_diff_usage();\n \tmy $tb = shift or commit_diff_usage();\n \tif (!eval { $SVN_URL = shift || file_to_s(\"$GIT_SVN_DIR/info/url\") }) {\n@@ -1042,8 +888,7 @@ sub complete_url_ls_init {\n \t\t}\n \t\t$var = $url . $var;\n \t}\n-\tchomp(my @ls = $_use_lib ? libsvn_ls_fullurl($var)\n-\t\t\t\t: safe_qx(qw/svn ls --non-interactive/, $var));\n+\tmy @ls = libsvn_ls_fullurl($var);\n \tmy $old = $GIT_SVN;\n \tdefined(my $pid = fork) or croak $!;\n \tif (!$pid) {\n@@ -1156,37 +1001,6 @@ sub graft_tree_joins {\n \t});\n }\n \n-# this isn't funky-filename safe, but good enough for now...\n-sub graft_file_copy_cmd {\n-\tmy ($grafts, $l_map, $u) = @_;\n-\tmy $paths = $l_map->{$u};\n-\tmy $pfx = common_prefix([keys %$paths]);\n-\t$SVN_URL ||= $u.$pfx;\n-\tmy $pid = open my $fh, '-|';\n-\tdefined $pid or croak $!;\n-\tunless ($pid) {\n-\t\tmy @exec = qw/svn log -v/;\n-\t\tpush @exec, \"-r$_revision\" if defined $_revision;\n-\t\texec @exec, $u.$pfx or croak $!;\n-\t}\n-\tmy ($r, $mp) = (undef, undef);\n-\twhile (<$fh>) {\n-\t\tchomp;\n-\t\tif (/^\\-{72}$/) {\n-\t\t\t$mp = $r = undef;\n-\t\t} elsif (/^r(\\d+) \\| /) {\n-\t\t\t$r = $1 unless defined $r;\n-\t\t} elsif (/^Changed paths:/) {\n-\t\t\t$mp = 1;\n-\t\t} elsif ($mp && m#^   [AR] /(\\S.*?) \\(from /(\\S+?):(\\d+)\\)$#) {\n-\t\t\tmy ($p1, $p0, $r0) = ($1, $2, $3);\n-\t\t\tmy $c = find_graft_path_commit($paths, $p1, $r);\n-\t\t\tnext unless $c;\n-\t\t\tfind_graft_path_parents($grafts, $paths, $c, $p0, $r0);\n-\t\t}\n-\t}\n-}\n-\n sub graft_file_copy_lib {\n \tmy ($grafts, $l_map, $u) = @_;\n \tmy $tree_paths = $l_map->{$u};\n@@ -1277,15 +1091,9 @@ sub graft_merge_msg {\n \n sub read_uuid {\n \treturn if $SVN_UUID;\n-\tif ($_use_lib) {\n-\t\tmy $pool = SVN::Pool->new;\n-\t\t$SVN_UUID = $SVN->get_uuid($pool);\n-\t\t$pool->clear;\n-\t} else {\n-\t\tmy $info = shift || svn_info('.');\n-\t\t$SVN_UUID = $info->{'Repository UUID'} or\n-\t\t\t\t\tcroak \"Repository UUID unreadable\\n\";\n-\t}\n+\tmy $pool = SVN::Pool->new;\n+\t$SVN_UUID = $SVN->get_uuid($pool);\n+\t$pool->clear;\n }\n \n sub verify_ref {\n@@ -1293,19 +1101,6 @@ sub verify_ref {\n \teval { command_oneline([ 'rev-parse', $ref ], { STDERR => 0 }) };\n }\n \n-sub quiet_run {\n-\tmy $pid = fork;\n-\tdefined $pid or croak $!;\n-\tif (!$pid) {\n-\t\topen my $null, '>', '/dev/null' or croak $!;\n-\t\topen STDERR, '>&', $null or croak $!;\n-\t\topen STDOUT, '>&', $null or croak $!;\n-\t\texec @_ or croak $!;\n-\t}\n-\twaitpid $pid, 0;\n-\treturn $?;\n-}\n-\n sub repo_path_split {\n \tmy $full_url = shift;\n \t$full_url =~ s#/+$##;\n@@ -1317,21 +1112,8 @@ sub repo_path_split {\n \t\t\treturn ($u, $full_url);\n \t\t}\n \t}\n-\tif ($_use_lib) {\n-\t\tmy $tmp = libsvn_connect($full_url);\n-\t\treturn ($tmp->{repos_root}, $tmp->{svn_path});\n-\t} else {\n-\t\tmy ($url, $path) = ($full_url =~ m!^([a-z\\+]+://[^/]*)(.*)$!i);\n-\t\t$path =~ s#^/+##;\n-\t\tmy @paths = split(m#/+#, $path);\n-\t\twhile (quiet_run(qw/svn ls --non-interactive/, $url)) {\n-\t\t\tmy $n = shift @paths || last;\n-\t\t\t$url .= \"/$n\";\n-\t\t}\n-\t\tpush @repo_path_split_cache, qr/^(\\Q$url\\E)/;\n-\t\t$path = join('/',@paths);\n-\t\treturn ($url, $path);\n-\t}\n+\tmy $tmp = libsvn_connect($full_url);\n+\treturn ($tmp->{repos_root}, $tmp->{svn_path});\n }\n \n sub setup_git_svn {\n@@ -1347,31 +1129,6 @@ sub setup_git_svn {\n \n }\n \n-sub assert_svn_wc_clean {\n-\treturn if $_use_lib;\n-\tmy ($svn_rev) = @_;\n-\tcroak \"$svn_rev is not an integer!\\n\" unless ($svn_rev =~ /^\\d+$/);\n-\tmy $lcr = svn_info('.')->{'Last Changed Rev'};\n-\tif ($svn_rev != $lcr) {\n-\t\tprint STDERR \"Checking for copy-tree ... \";\n-\t\tmy @diff = grep(/^Index: /,(safe_qx(qw(svn diff),\n-\t\t\t\t\t\t\"-r$lcr:$svn_rev\")));\n-\t\tif (@diff) {\n-\t\t\tcroak \"Nope!  Expected r$svn_rev, got r$lcr\\n\";\n-\t\t} else {\n-\t\t\tprint STDERR \"OK!\\n\";\n-\t\t}\n-\t}\n-\tmy @status = grep(!/^Performing status on external/,(`svn status`));\n-\t@status = grep(!/^\\s*$/,@status);\n-\t@status = grep(!/^X/,@status) if $_no_ignore_ext;\n-\tif (scalar @status) {\n-\t\tprint STDERR \"Tree ($SVN_WC) is not clean:\\n\";\n-\t\tprint STDERR $_ foreach @status;\n-\t\tcroak;\n-\t}\n-}\n-\n sub get_tree_from_treeish {\n \tmy ($treeish) = @_;\n \tcroak \"Not a sha1: $treeish\\n\" unless $treeish =~ /^$sha1$/o;\n@@ -1393,28 +1150,8 @@ sub get_tree_from_treeish {\n \treturn $expected;\n }\n \n-sub assert_tree {\n-\treturn if $_use_lib;\n-\tmy ($treeish) = @_;\n-\tmy $expected = get_tree_from_treeish($treeish);\n-\n-\tmy $tmpindex = $GIT_SVN_INDEX.'.assert-tmp';\n-\tif (-e $tmpindex) {\n-\t\tunlink $tmpindex or croak $!;\n-\t}\n-\tmy $old_index = set_index($tmpindex);\n-\tindex_changes(1);\n-\tmy $tree = command_oneline('write-tree');\n-\trestore_index($old_index);\n-\tif ($tree ne $expected) {\n-\t\tcroak \"Tree mismatch, Got: $tree, Expected: $expected\\n\";\n-\t}\n-\tunlink $tmpindex;\n-}\n-\n sub get_diff {\n \tmy ($from, $treeish) = @_;\n-\tassert_tree($from);\n \tprint \"diff-tree $from $treeish\\n\";\n \tmy @diff_tree = qw(diff-tree -z -r);\n \tif ($_cp_similarity) {\n@@ -1465,145 +1202,6 @@ sub get_diff {\n \treturn \\@mods;\n }\n \n-sub svn_check_prop_executable {\n-\tmy $m = shift;\n-\treturn if -l $m->{file_b};\n-\tif ($m->{mode_b} =~ /755$/) {\n-\t\tchmod((0755 &~ umask),$m->{file_b}) or croak $!;\n-\t\tif ($m->{mode_a} !~ /755$/) {\n-\t\t\tsys(qw(svn propset svn:executable 1), $m->{file_b});\n-\t\t}\n-\t\t-x $m->{file_b} or croak \"$m->{file_b} is not executable!\\n\";\n-\t} elsif ($m->{mode_b} !~ /755$/ && $m->{mode_a} =~ /755$/) {\n-\t\tsys(qw(svn propdel svn:executable), $m->{file_b});\n-\t\tchmod((0644 &~ umask),$m->{file_b}) or croak $!;\n-\t\t-x $m->{file_b} and croak \"$m->{file_b} is executable!\\n\";\n-\t}\n-}\n-\n-sub svn_ensure_parent_path {\n-\tmy $dir_b = dirname(shift);\n-\tsvn_ensure_parent_path($dir_b) if ($dir_b ne File::Spec->curdir);\n-\tmkpath([$dir_b]) unless (-d $dir_b);\n-\tsys(qw(svn add -N), $dir_b) unless (-d \"$dir_b/.svn\");\n-}\n-\n-sub precommit_check {\n-\tmy $mods = shift;\n-\tmy (%rm_file, %rmdir_check, %added_check);\n-\n-\tmy %o = ( D => 0, R => 1, C => 2, A => 3, M => 3, T => 3 );\n-\tforeach my $m (sort { $o{$a->{chg}} <=> $o{$b->{chg}} } @$mods) {\n-\t\tif ($m->{chg} eq 'R') {\n-\t\t\tif (-d $m->{file_b}) {\n-\t\t\t\terr_dir_to_file(\"$m->{file_a} => $m->{file_b}\");\n-\t\t\t}\n-\t\t\t# dir/$file => dir/file/$file\n-\t\t\tmy $dirname = dirname($m->{file_b});\n-\t\t\twhile ($dirname ne File::Spec->curdir) {\n-\t\t\t\tif ($dirname ne $m->{file_a}) {\n-\t\t\t\t\t$dirname = dirname($dirname);\n-\t\t\t\t\tnext;\n-\t\t\t\t}\n-\t\t\t\terr_file_to_dir(\"$m->{file_a} => $m->{file_b}\");\n-\t\t\t}\n-\t\t\t# baz/zzz => baz (baz is a file)\n-\t\t\t$dirname = dirname($m->{file_a});\n-\t\t\twhile ($dirname ne File::Spec->curdir) {\n-\t\t\t\tif ($dirname ne $m->{file_b}) {\n-\t\t\t\t\t$dirname = dirname($dirname);\n-\t\t\t\t\tnext;\n-\t\t\t\t}\n-\t\t\t\terr_dir_to_file(\"$m->{file_a} => $m->{file_b}\");\n-\t\t\t}\n-\t\t}\n-\t\tif ($m->{chg} =~ /^(D|R)$/) {\n-\t\t\tmy $t = $1 eq 'D' ? 'file_b' : 'file_a';\n-\t\t\t$rm_file{ $m->{$t} } = 1;\n-\t\t\tmy $dirname = dirname( $m->{$t} );\n-\t\t\tmy $basename = basename( $m->{$t} );\n-\t\t\t$rmdir_check{$dirname}->{$basename} = 1;\n-\t\t} elsif ($m->{chg} =~ /^(?:A|C)$/) {\n-\t\t\tif (-d $m->{file_b}) {\n-\t\t\t\terr_dir_to_file($m->{file_b});\n-\t\t\t}\n-\t\t\tmy $dirname = dirname( $m->{file_b} );\n-\t\t\tmy $basename = basename( $m->{file_b} );\n-\t\t\t$added_check{$dirname}->{$basename} = 1;\n-\t\t\twhile ($dirname ne File::Spec->curdir) {\n-\t\t\t\tif ($rm_file{$dirname}) {\n-\t\t\t\t\terr_file_to_dir($m->{file_b});\n-\t\t\t\t}\n-\t\t\t\t$dirname = dirname $dirname;\n-\t\t\t}\n-\t\t}\n-\t}\n-\treturn (\\%rmdir_check, \\%added_check);\n-\n-\tsub err_dir_to_file {\n-\t\tmy $file = shift;\n-\t\tprint STDERR \"Node change from directory to file \",\n-\t\t\t\t\"is not supported by Subversion: \",$file,\"\\n\";\n-\t\texit 1;\n-\t}\n-\tsub err_file_to_dir {\n-\t\tmy $file = shift;\n-\t\tprint STDERR \"Node change from file to directory \",\n-\t\t\t\t\"is not supported by Subversion: \",$file,\"\\n\";\n-\t\texit 1;\n-\t}\n-}\n-\n-\n-sub svn_checkout_tree {\n-\tmy ($from, $treeish) = @_;\n-\tmy $mods = get_diff($from->{commit}, $treeish);\n-\treturn $mods unless (scalar @$mods);\n-\tmy ($rm, $add) = precommit_check($mods);\n-\n-\tmy %o = ( D => 1, R => 0, C => -1, A => 3, M => 3, T => 3 );\n-\tforeach my $m (sort { $o{$a->{chg}} <=> $o{$b->{chg}} } @$mods) {\n-\t\tif ($m->{chg} eq 'C') {\n-\t\t\tsvn_ensure_parent_path( $m->{file_b} );\n-\t\t\tsys(qw(svn cp),\t\t$m->{file_a}, $m->{file_b});\n-\t\t\tapply_mod_line_blob($m);\n-\t\t\tsvn_check_prop_executable($m);\n-\t\t} elsif ($m->{chg} eq 'D') {\n-\t\t\tsys(qw(svn rm --force), $m->{file_b});\n-\t\t} elsif ($m->{chg} eq 'R') {\n-\t\t\tsvn_ensure_parent_path( $m->{file_b} );\n-\t\t\tsys(qw(svn mv --force), $m->{file_a}, $m->{file_b});\n-\t\t\tapply_mod_line_blob($m);\n-\t\t\tsvn_check_prop_executable($m);\n-\t\t} elsif ($m->{chg} eq 'M') {\n-\t\t\tapply_mod_line_blob($m);\n-\t\t\tsvn_check_prop_executable($m);\n-\t\t} elsif ($m->{chg} eq 'T') {\n-\t\t\tsvn_check_prop_executable($m);\n-\t\t\tapply_mod_line_blob($m);\n-\t\t\tif ($m->{mode_a} =~ /^120/ && $m->{mode_b} !~ /^120/) {\n-\t\t\t\tsys(qw(svn propdel svn:special), $m->{file_b});\n-\t\t\t} else {\n-\t\t\t\tsys(qw(svn propset svn:special *),$m->{file_b});\n-\t\t\t}\n-\t\t} elsif ($m->{chg} eq 'A') {\n-\t\t\tsvn_ensure_parent_path( $m->{file_b} );\n-\t\t\tapply_mod_line_blob($m);\n-\t\t\tsys(qw(svn add), $m->{file_b});\n-\t\t\tsvn_check_prop_executable($m);\n-\t\t} else {\n-\t\t\tcroak \"Invalid chg: $m->{chg}\\n\";\n-\t\t}\n-\t}\n-\n-\tassert_tree($treeish);\n-\tif ($_rmdir) { # remove empty directories\n-\t\thandle_rmdir($rm, $add);\n-\t}\n-\tassert_tree($treeish);\n-\treturn $mods;\n-}\n-\n sub libsvn_checkout_tree {\n \tmy ($from, $treeish, $ed) = @_;\n \tmy $mods = get_diff($from, $treeish);\n@@ -1621,44 +1219,6 @@ sub libsvn_checkout_tree {\n \treturn $mods;\n }\n \n-# svn ls doesn't work with respect to the current working tree, but what's\n-# in the repository.  There's not even an option for it... *sigh*\n-# (added files don't show up and removed files remain in the ls listing)\n-sub svn_ls_current {\n-\tmy ($dir, $rm, $add) = @_;\n-\tchomp(my @ls = safe_qx('svn','ls',$dir));\n-\tmy @ret = ();\n-\tforeach (@ls) {\n-\t\ts#/$##; # trailing slashes are evil\n-\t\tpush @ret, $_ unless $rm->{$dir}->{$_};\n-\t}\n-\tif (exists $add->{$dir}) {\n-\t\tpush @ret, keys %{$add->{$dir}};\n-\t}\n-\treturn \\@ret;\n-}\n-\n-sub handle_rmdir {\n-\tmy ($rm, $add) = @_;\n-\n-\tforeach my $dir (sort {length $b <=> length $a} keys %$rm) {\n-\t\tmy $ls = svn_ls_current($dir, $rm, $add);\n-\t\tnext if (scalar @$ls);\n-\t\tsys(qw(svn rm --force),$dir);\n-\n-\t\tmy $dn = dirname $dir;\n-\t\t$rm->{ $dn }->{ basename $dir } = 1;\n-\t\t$ls = svn_ls_current($dn, $rm, $add);\n-\t\twhile (scalar @$ls == 0 && $dn ne File::Spec->curdir) {\n-\t\t\tsys(qw(svn rm --force),$dn);\n-\t\t\t$dir = basename $dn;\n-\t\t\t$dn = dirname $dn;\n-\t\t\t$rm->{ $dn }->{ $dir } = 1;\n-\t\t\t$ls = svn_ls_current($dn, $rm, $add);\n-\t\t}\n-\t}\n-}\n-\n sub get_commit_message {\n \tmy ($commit, $commit_msg) = (@_);\n \tmy %log_msg = ( msg => '' );\n@@ -1704,56 +1264,6 @@ sub set_svn_commit_env {\n \t}\n }\n \n-sub svn_commit_tree {\n-\tmy ($last, $commit) = @_;\n-\tmy $commit_msg = \"$GIT_SVN_DIR/.svn-commit.tmp.$$\";\n-\tmy $log_msg = get_commit_message($commit, $commit_msg);\n-\tmy ($oneline) = ($log_msg->{msg} =~ /([^\\n\\r]+)/);\n-\tprint \"Committing $commit: $oneline\\n\";\n-\n-\tset_svn_commit_env();\n-\tmy @ci_output = safe_qx(qw(svn commit -F),$commit_msg);\n-\t$ENV{LC_ALL} = 'C';\n-\tunlink $commit_msg;\n-\tmy ($committed) = ($ci_output[$#ci_output] =~ /(\\d+)/);\n-\tif (!defined $committed) {\n-\t\tmy $out = join(\"\\n\",@ci_output);\n-\t\tprint STDERR \"W: Trouble parsing \\`svn commit' output:\\n\\n\",\n-\t\t\t\t$out, \"\\n\\nAssuming English locale...\";\n-\t\t($committed) = ($out =~ /^Committed revision \\d+\\./sm);\n-\t\tdefined $committed or die \" FAILED!\\n\",\n-\t\t\t\"Commit output failed to parse committed revision!\\n\",\n-\t\tprint STDERR \" OK\\n\";\n-\t}\n-\n-\tmy @svn_up = qw(svn up);\n-\tpush @svn_up, '--ignore-externals' unless $_no_ignore_ext;\n-\tif ($_optimize_commits && ($committed == ($last->{revision} + 1))) {\n-\t\tpush @svn_up, \"-r$committed\";\n-\t\tsys(@svn_up);\n-\t\tmy $info = svn_info('.');\n-\t\tmy $date = $info->{'Last Changed Date'} or die \"Missing date\\n\";\n-\t\tif ($info->{'Last Changed Rev'} != $committed) {\n-\t\t\tcroak \"$info->{'Last Changed Rev'} != $committed\\n\"\n-\t\t}\n-\t\tmy ($Y,$m,$d,$H,$M,$S,$tz) = ($date =~\n-\t\t\t\t\t/(\\d{4})\\-(\\d\\d)\\-(\\d\\d)\\s\n-\t\t\t\t\t (\\d\\d)\\:(\\d\\d)\\:(\\d\\d)\\s([\\-\\+]\\d+)/x)\n-\t\t\t\t\t or croak \"Failed to parse date: $date\\n\";\n-\t\t$log_msg->{date} = \"$tz $Y-$m-$d $H:$M:$S\";\n-\t\t$log_msg->{author} = $info->{'Last Changed Author'};\n-\t\t$log_msg->{revision} = $committed;\n-\t\t$log_msg->{msg} .= \"\\n\";\n-\t\t$log_msg->{parents} = [ $last->{commit} ];\n-\t\t$log_msg->{commit} = git_commit($log_msg, $commit);\n-\t\treturn $log_msg;\n-\t}\n-\t# resync immediately\n-\tpush @svn_up, \"-r$last->{revision}\";\n-\tsys(@svn_up);\n-\treturn fetch(\"$committed=$commit\");\n-}\n-\n sub rev_list_raw {\n \tmy ($fh, $c) = command_output_pipe(qw/rev-list --pretty=raw/, @_);\n \treturn { fh => $fh, ctx => $c, t => { } };\n@@ -1782,177 +1292,6 @@ sub next_rev_list_entry {\n \treturn ($x != $rl->{t}) ? $x : undef;\n }\n \n-# read the entire log into a temporary file (which is removed ASAP)\n-# and store the file handle + parser state\n-sub svn_log_raw {\n-\tmy (@log_args) = @_;\n-\tmy $log_fh = IO::File->new_tmpfile or croak $!;\n-\tmy $pid = fork;\n-\tdefined $pid or croak $!;\n-\tif (!$pid) {\n-\t\topen STDOUT, '>&', $log_fh or croak $!;\n-\t\texec (qw(svn log), @log_args) or croak $!\n-\t}\n-\twaitpid $pid, 0;\n-\tcroak $? if $?;\n-\tseek $log_fh, 0, 0 or croak $!;\n-\treturn { state => 'sep', fh => $log_fh };\n-}\n-\n-sub next_log_entry {\n-\tmy $log = shift; # retval of svn_log_raw()\n-\tmy $ret = undef;\n-\tmy $fh = $log->{fh};\n-\n-\twhile (<$fh>) {\n-\t\tchomp;\n-\t\tif (/^\\-{72}$/) {\n-\t\t\tif ($log->{state} eq 'msg') {\n-\t\t\t\tif ($ret->{lines}) {\n-\t\t\t\t\t$ret->{msg} .= $_.\"\\n\";\n-\t\t\t\t\tunless(--$ret->{lines}) {\n-\t\t\t\t\t\t$log->{state} = 'sep';\n-\t\t\t\t\t}\n-\t\t\t\t} else {\n-\t\t\t\t\tcroak \"Log parse error at: $_\\n\",\n-\t\t\t\t\t\t$ret->{revision},\n-\t\t\t\t\t\t\"\\n\";\n-\t\t\t\t}\n-\t\t\t\tnext;\n-\t\t\t}\n-\t\t\tif ($log->{state} ne 'sep') {\n-\t\t\t\tcroak \"Log parse error at: $_\\n\",\n-\t\t\t\t\t\"state: $log->{state}\\n\",\n-\t\t\t\t\t$ret->{revision},\n-\t\t\t\t\t\"\\n\";\n-\t\t\t}\n-\t\t\t$log->{state} = 'rev';\n-\n-\t\t\t# if we have an empty log message, put something there:\n-\t\t\tif ($ret) {\n-\t\t\t\t$ret->{msg} ||= \"\\n\";\n-\t\t\t\tdelete $ret->{lines};\n-\t\t\t\treturn $ret;\n-\t\t\t}\n-\t\t\tnext;\n-\t\t}\n-\t\tif ($log->{state} eq 'rev' && s/^r(\\d+)\\s*\\|\\s*//) {\n-\t\t\tmy $rev = $1;\n-\t\t\tmy ($author, $date, $lines) = split(/\\s*\\|\\s*/, $_, 3);\n-\t\t\t($lines) = ($lines =~ /(\\d+)/);\n-\t\t\t$date = '1970-01-01 00:00:00 +0000'\n-\t\t\t\tif ($_ignore_nodate && $date eq '(no date)');\n-\t\t\tmy ($Y,$m,$d,$H,$M,$S,$tz) = ($date =~\n-\t\t\t\t\t/(\\d{4})\\-(\\d\\d)\\-(\\d\\d)\\s\n-\t\t\t\t\t (\\d\\d)\\:(\\d\\d)\\:(\\d\\d)\\s([\\-\\+]\\d+)/x)\n-\t\t\t\t\t or croak \"Failed to parse date: $date\\n\";\n-\t\t\t$ret = {\trevision => $rev,\n-\t\t\t\t\tdate => \"$tz $Y-$m-$d $H:$M:$S\",\n-\t\t\t\t\tauthor => $author,\n-\t\t\t\t\tlines => $lines,\n-\t\t\t\t\tmsg => '' };\n-\t\t\tif (defined $_authors && ! defined $users{$author}) {\n-\t\t\t\tdie \"Author: $author not defined in \",\n-\t\t\t\t\t\t\"$_authors file\\n\";\n-\t\t\t}\n-\t\t\t$log->{state} = 'msg_start';\n-\t\t\tnext;\n-\t\t}\n-\t\t# skip the first blank line of the message:\n-\t\tif ($log->{state} eq 'msg_start' && /^$/) {\n-\t\t\t$log->{state} = 'msg';\n-\t\t} elsif ($log->{state} eq 'msg') {\n-\t\t\tif ($ret->{lines}) {\n-\t\t\t\t$ret->{msg} .= $_.\"\\n\";\n-\t\t\t\tunless (--$ret->{lines}) {\n-\t\t\t\t\t$log->{state} = 'sep';\n-\t\t\t\t}\n-\t\t\t} else {\n-\t\t\t\tcroak \"Log parse error at: $_\\n\",\n-\t\t\t\t\t$ret->{revision},\"\\n\";\n-\t\t\t}\n-\t\t}\n-\t}\n-\treturn $ret;\n-}\n-\n-sub svn_info {\n-\tmy $url = shift || $SVN_URL;\n-\n-\tmy $pid = open my $info_fh, '-|';\n-\tdefined $pid or croak $!;\n-\n-\tif ($pid == 0) {\n-\t\texec(qw(svn info),$url) or croak $!;\n-\t}\n-\n-\tmy $ret = {};\n-\t# only single-lines seem to exist in svn info output\n-\twhile (<$info_fh>) {\n-\t\tchomp $_;\n-\t\tif (m#^([^:]+)\\s*:\\s*(\\S.*)$#) {\n-\t\t\t$ret->{$1} = $2;\n-\t\t\tpush @{$ret->{-order}}, $1;\n-\t\t}\n-\t}\n-\tclose $info_fh or croak $?;\n-\treturn $ret;\n-}\n-\n-sub sys { system(@_) == 0 or croak $? }\n-\n-sub do_update_index {\n-\tmy ($z_cmd, $cmd, $no_text_base) = @_;\n-\n-\tmy ($p, $pctx) = command_output_pipe(@$z_cmd);\n-\n-\tmy ($ui, $uctx) = command_input_pipe('update-index',\n-\t                                     \"--$cmd\",'-z','--stdin');\n-\tlocal $/ = \"\\0\";\n-\twhile (my $x = <$p>) {\n-\t\tchomp $x;\n-\t\tif (!$no_text_base && lstat $x && ! -l _ &&\n-\t\t\t\tsvn_propget_base('svn:keywords', $x)) {\n-\t\t\tmy $mode = -x _ ? 0755 : 0644;\n-\t\t\tmy ($v,$d,$f) = File::Spec->splitpath($x);\n-\t\t\tmy $tb = File::Spec->catfile($d, '.svn', 'tmp',\n-\t\t\t\t\t\t'text-base',\"$f.svn-base\");\n-\t\t\t$tb =~ s#^/##;\n-\t\t\tunless (-f $tb) {\n-\t\t\t\t$tb = File::Spec->catfile($d, '.svn',\n-\t\t\t\t\t\t'text-base',\"$f.svn-base\");\n-\t\t\t\t$tb =~ s#^/##;\n-\t\t\t}\n-\t\t\tmy @s = stat($x);\n-\t\t\tunlink $x or croak $!;\n-\t\t\tcopy($tb, $x);\n-\t\t\tchmod(($mode &~ umask), $x) or croak $!;\n-\t\t\tutime $s[8], $s[9], $x;\n-\t\t}\n-\t\tprint $ui $x,\"\\0\";\n-\t}\n-\tcommand_close_pipe($p, $pctx);\n-\tcommand_close_pipe($ui, $uctx);\n-}\n-\n-sub index_changes {\n-\treturn if $_use_lib;\n-\n-\tif (!-f \"$GIT_SVN_DIR/info/exclude\") {\n-\t\topen my $fd, '>>', \"$GIT_SVN_DIR/info/exclude\" or croak $!;\n-\t\tprint $fd '.svn',\"\\n\";\n-\t\tclose $fd or croak $!;\n-\t}\n-\tmy $no_text_base = shift;\n-\tdo_update_index([qw/diff-files --name-only -z/],\n-\t\t\t'remove',\n-\t\t\t$no_text_base);\n-\tdo_update_index([qw/ls-files -z --others/,\n-\t\t\t\t\"--exclude-from=$GIT_SVN_DIR/info/exclude\"],\n-\t\t\t'add',\n-\t\t\t$no_text_base);\n-}\n-\n sub s_to_file {\n \tmy ($str, $file, $mode) = @_;\n \topen my $fd,'>',$file or croak $!;\n@@ -1978,18 +1317,6 @@ sub assert_revision_unknown {\n \t}\n }\n \n-sub trees_eq {\n-\tmy ($x, $y) = @_;\n-\tmy @x = command(qw/cat-file commit/,$x);\n-\tmy @y = command(qw/cat-file commit/,$y);\n-\tif (($y[0] ne $x[0]) || $x[0] ne \"tree $sha1\"\n-\t\t             || $y[0] ne \"tree $sha1\") {\n-\t\tprint STDERR \"Trees not equal: $y[0] != $x[0]\\n\";\n-\t\treturn 0\n-\t}\n-\treturn 1;\n-}\n-\n sub git_commit {\n \tmy ($log_msg, @parents) = @_;\n \tassert_revision_unknown($log_msg->{revision});\n@@ -2014,12 +1341,10 @@ sub git_commit {\n \tmy $tree = $log_msg->{tree};\n \tif (!defined $tree) {\n \t\tmy $index = set_index($GIT_SVN_INDEX);\n-\t\tindex_changes();\n \t\t$tree = command_oneline('write-tree');\n \t\tcroak $? if $?;\n \t\trestore_index($index);\n \t}\n-\n \t# just in case we clobber the existing ref, we still want that ref\n \t# as our parent:\n \tif (my $cur = verify_ref(\"refs/remotes/$GIT_SVN^0\")) {\n@@ -2104,102 +1429,6 @@ sub set_commit_env {\n \t$ENV{GIT_AUTHOR_DATE} = $ENV{GIT_COMMITTER_DATE} = $log_msg->{date};\n }\n \n-sub apply_mod_line_blob {\n-\tmy $m = shift;\n-\tif ($m->{mode_b} =~ /^120/) {\n-\t\tblob_to_symlink($m->{sha1_b}, $m->{file_b});\n-\t} else {\n-\t\tblob_to_file($m->{sha1_b}, $m->{file_b});\n-\t}\n-}\n-\n-sub blob_to_symlink {\n-\tmy ($blob, $link) = @_;\n-\tdefined $link or croak \"\\$link not defined!\\n\";\n-\tcroak \"Not a sha1: $blob\\n\" unless $blob =~ /^$sha1$/o;\n-\tif (-l $link || -f _) {\n-\t\tunlink $link or croak $!;\n-\t}\n-\n-\tmy $dest = `git-cat-file blob $blob`; # no newline, so no chomp\n-\tsymlink $dest, $link or croak $!;\n-}\n-\n-sub blob_to_file {\n-\tmy ($blob, $file) = @_;\n-\tdefined $file or croak \"\\$file not defined!\\n\";\n-\tcroak \"Not a sha1: $blob\\n\" unless $blob =~ /^$sha1$/o;\n-\tif (-l $file || -f _) {\n-\t\tunlink $file or croak $!;\n-\t}\n-\n-\topen my $blob_fh, '>', $file or croak \"$!: $file\\n\";\n-\tmy $pid = fork;\n-\tdefined $pid or croak $!;\n-\n-\tif ($pid == 0) {\n-\t\topen STDOUT, '>&', $blob_fh or croak $!;\n-\t\texec('git-cat-file','blob',$blob) or croak $!;\n-\t}\n-\twaitpid $pid, 0;\n-\tcroak $? if $?;\n-\n-\tclose $blob_fh or croak $!;\n-}\n-\n-sub safe_qx {\n-\tmy $pid = open my $child, '-|';\n-\tdefined $pid or croak $!;\n-\tif ($pid == 0) {\n-\t\texec(@_) or croak $!;\n-\t}\n-\tmy @ret = (<$child>);\n-\tclose $child or croak $?;\n-\tdie $? if $?; # just in case close didn't error out\n-\treturn wantarray ? @ret : join('',@ret);\n-}\n-\n-sub svn_compat_check {\n-\tif ($_follow_parent) {\n-\t\tprint STDERR 'E: --follow-parent functionality is only ',\n-\t\t\t\t\"available when SVN libraries are used\\n\";\n-\t\texit 1;\n-\t}\n-\tmy @co_help = safe_qx(qw(svn co -h));\n-\tunless (grep /ignore-externals/,@co_help) {\n-\t\tprint STDERR \"W: Installed svn version does not support \",\n-\t\t\t\t\"--ignore-externals\\n\";\n-\t\t$_no_ignore_ext = 1;\n-\t}\n-\tif (grep /usage: checkout URL\\[\\@REV\\]/,@co_help) {\n-\t\t$_svn_co_url_revs = 1;\n-\t}\n-\tif (grep /\\[TARGET\\[\\@REV\\]\\.\\.\\.\\]/, `svn propget -h`) {\n-\t\t$_svn_pg_peg_revs = 1;\n-\t}\n-\n-\t# I really, really hope nobody hits this...\n-\tunless (grep /stop-on-copy/, (safe_qx(qw(svn log -h)))) {\n-\t\tprint STDERR <<'';\n-W: The installed svn version does not support the --stop-on-copy flag in\n-   the log command.\n-   Lets hope the directory you're tracking is not a branch or tag\n-   and was never moved within the repository...\n-\n-\t\t$_no_stop_copy = 1;\n-\t}\n-}\n-\n-# *sigh*, new versions of svn won't honor -r<rev> without URL@<rev>,\n-# (and they won't honor URL@<rev> without -r<rev>, too!)\n-sub svn_cmd_checkout {\n-\tmy ($url, $rev, $dir) = @_;\n-\tmy @cmd = ('svn','co', \"-r$rev\");\n-\tpush @cmd, '--ignore-externals' unless $_no_ignore_ext;\n-\t$url .= \"\\@$rev\" if $_svn_co_url_revs;\n-\tsys(@cmd, $url, $dir);\n-}\n-\n sub check_upgrade_needed {\n \tif (!-r $REVDB) {\n \t\t-d $GIT_SVN_DIR or mkpath([$GIT_SVN_DIR]);\n@@ -2277,12 +1506,6 @@ sub rload_authors {\n \tclose $authors or croak $!;\n }\n \n-sub svn_propget_base {\n-\tmy ($p, $f) = @_;\n-\t$f .= '@BASE' if $_svn_pg_peg_revs;\n-\treturn safe_qx(qw/svn propget/, $p, $f);\n-}\n-\n sub git_svn_each {\n \tmy $sub = shift;\n \tforeach (command(qw/rev-parse --symbolic --all/)) {\n@@ -2682,33 +1905,6 @@ sub show_commit_normal {\n \t}\n }\n \n-sub libsvn_load {\n-\treturn unless $_use_lib;\n-\t$_use_lib = eval {\n-\t\trequire SVN::Core;\n-\t\tif ($SVN::Core::VERSION lt '1.1.0') {\n-\t\t\tdie \"Need SVN::Core 1.1.0 or better \",\n-\t\t\t\t\t\"(got $SVN::Core::VERSION) \",\n-\t\t\t\t\t\"Falling back to command-line svn\\n\";\n-\t\t}\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\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-\t\t\t\t\t$SVN::Node::dir.$SVN::Node::unknown.\n-\t\t\t\t\t$SVN::Auth::SSL::CNMISMATCH.\n-\t\t\t\t\t$SVN::Auth::SSL::NOTYETVALID.\n-\t\t\t\t\t$SVN::Auth::SSL::EXPIRED.\n-\t\t\t\t\t$SVN::Auth::SSL::UNKNOWNCA.\n-\t\t\t\t\t$SVN::Auth::SSL::OTHER;\n-\t\t1;\n-\t};\n-}\n-\n sub _simple_prompt {\n \tmy ($cred, $realm, $default_username, $may_save, $pool) = @_;\n \t$may_save = undef if $_no_auth_cache;\n@@ -3231,18 +2427,11 @@ sub revisions_eq {\n \tmy ($path, $r0, $r1) = @_;\n \treturn 1 if $r0 == $r1;\n \tmy $nr = 0;\n-\tif ($_use_lib) {\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, 0, 1, sub {$nr++}, $pool);\n-\t\t$pool->clear;\n-\t} else {\n-\t\tmy ($url, undef) = repo_path_split($SVN_URL);\n-\t\tmy $svn_log = svn_log_raw(\"$url/$path\",\"-r$r0:$r1\");\n-\t\twhile (next_log_entry($svn_log)) { $nr++ }\n-\t\tclose $svn_log->{fh};\n-\t}\n+\t# should be OK to use Pool here (r1 - r0) should be small\n+\tmy $pool = SVN::Pool->new;\n+\tlibsvn_get_log($SVN, [$path], $r0, $r1,\n+\t\t\t0, 0, 1, sub {$nr++}, $pool);\n+\t$pool->clear;\n \treturn 0 if ($nr > 1);\n \treturn 1;\n }\n@@ -3526,6 +2715,19 @@ sub copy_remote_ref {\n \t\t\t\t\"refs/remotes/$GIT_SVN on $origin\\n\";\n \t}\n }\n+\n+{\n+\tmy $kill_stupid_warnings = $SVN::Node::none.$SVN::Node::file.\n+\t\t\t\t$SVN::Node::dir.$SVN::Node::unknown.\n+\t\t\t\t$SVN::Node::none.$SVN::Node::file.\n+\t\t\t\t$SVN::Node::dir.$SVN::Node::unknown.\n+\t\t\t\t$SVN::Auth::SSL::CNMISMATCH.\n+\t\t\t\t$SVN::Auth::SSL::NOTYETVALID.\n+\t\t\t\t$SVN::Auth::SSL::EXPIRED.\n+\t\t\t\t$SVN::Auth::SSL::UNKNOWNCA.\n+\t\t\t\t$SVN::Auth::SSL::OTHER;\n+}\n+\n package SVN::Git::Fetcher;\n use vars qw/@ISA/;\n use strict;\n@@ -3963,13 +3165,7 @@ __END__\n \n Data structures:\n \n-$svn_log hashref (as returned by svn_log_raw)\n-{\n-\tfh => file handle of the log file,\n-\tstate => state of the log file parser (sep/msg/rev/msg_start...)\n-}\n-\n-$log_msg hashref as returned by next_log_entry($svn_log)\n+$log_msg hashref as returned by libsvn_log_entry()\n {\n \tmsg => 'whitespace-formatted log entry\n ',\t\t\t\t\t\t# trailing newline is preserved\n@@ -3978,7 +3174,6 @@ $log_msg hashref as returned by next_log_entry($svn_log)\n \tauthor => 'committer name'\n };\n \n-\n @mods = array of diff-index line hashes, each element represents one line\n \tof diff-index output\n \ndiff --git a/t/Makefile b/t/Makefile\nindex c9bd9a4..250a190 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -23,13 +23,9 @@ clean:\n \n # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL\n full-svn-test:\n-\t$(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_DELTA_FETCH=1 \\\n-\t\t\t\t\tGIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C\n-\t$(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C\n-\t$(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \\\n-\t\t\t\t\t\t\tLC_ALL=en_US.UTF-8\n-\t$(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \\\n-\t\t\t\t\t\t\tLC_ALL=en_US.UTF-8\n+\t$(MAKE) $(TSVN) GIT_SVN_DELTA_FETCH=1 \\\n+\t\t\t\tGIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C\n+\t$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8\n \n .PHONY: $(T) clean\n .NOTPARALLEL:\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 63c6703..99ada71 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -7,17 +7,18 @@ then\n \texit\n fi\n \n-GIT_DIR=$PWD/.git\n-GIT_SVN_DIR=$GIT_DIR/svn/git-svn\n-SVN_TREE=$GIT_SVN_DIR/svn-tree\n-\n-perl -e 'use SVN::Core' >/dev/null 2>&1\n+perl -e 'use SVN::Core; $SVN::Core::VERSION gt \"1.1.0\" or die' >/dev/null 2>&1\n if test $? -ne 0\n then\n-   echo 'Perl SVN libraries not found, tests requiring those will be skipped'\n-   GIT_SVN_NO_LIB=1\n+\ttest_expect_success 'Perl SVN libraries not found, skipping test' :\n+\ttest_done\n+\texit\n fi\n \n+GIT_DIR=$PWD/.git\n+GIT_SVN_DIR=$GIT_DIR/svn/git-svn\n+SVN_TREE=$GIT_SVN_DIR/svn-tree\n+\n svnadmin >/dev/null 2>&1\n if test $? -ne 1\n then\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex f9de232..0fc462e 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -229,9 +229,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e\n tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4\n EOF\n \n-if test -z \"$GIT_SVN_NO_LIB\" || test \"$GIT_SVN_NO_LIB\" -eq 0; then\n-\techo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected\n-fi\n+echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected\n \n test_expect_success \"$name\" \"diff -u a expected\"\n \ndiff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh\nindex 01488ff..8d2e2fe 100755\n--- a/t/t9104-git-svn-follow-parent.sh\n+++ b/t/t9104-git-svn-follow-parent.sh\n@@ -6,13 +6,6 @@\n test_description='git-svn --follow-parent fetching'\n . ./lib-git-svn.sh\n \n-if test -n \"$GIT_SVN_NO_LIB\" && test \"$GIT_SVN_NO_LIB\" -ne 0\n-then\n-\techo 'Skipping: --follow-parent needs SVN libraries'\n-\ttest_done\n-\texit 0\n-fi\n-\n test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\ndiff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh\nindex 746c827..6323c7e 100755\n--- a/t/t9105-git-svn-commit-diff.sh\n+++ b/t/t9105-git-svn-commit-diff.sh\n@@ -4,13 +4,6 @@\n test_description='git-svn commit-diff'\n . ./lib-git-svn.sh\n \n-if test -n \"$GIT_SVN_NO_LIB\" && test \"$GIT_SVN_NO_LIB\" -ne 0\n-then\n-\techo 'Skipping: commit-diff needs SVN libraries'\n-\ttest_done\n-\texit 0\n-fi\n-\n test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\ndiff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh\nindex 58698b3..59b6425 100755\n--- a/t/t9106-git-svn-commit-diff-clobber.sh\n+++ b/t/t9106-git-svn-commit-diff-clobber.sh\n@@ -4,13 +4,6 @@\n test_description='git-svn commit-diff clobber'\n . ./lib-git-svn.sh\n \n-if test -n \"$GIT_SVN_NO_LIB\" && test \"$GIT_SVN_NO_LIB\" -ne 0\n-then\n-\techo 'Skipping: commit-diff clobber needs SVN libraries'\n-\ttest_done\n-\texit 0\n-fi\n-\n test_expect_success 'initialize repo' \"\n \tmkdir import &&\n \tcd import &&\n-- \n1.4.4.2.g0817\n"},{"id":"297602","messageId":"11662558902535-git-send-email-normalperson@yhbt.net","threadId":"43459","inReplyTo":"m28xh8amxa.fsf@ziti.local","subject":"[RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-16T07:58:08Z","receivedAt":"2006-12-16T07:58:08Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"'set-tree' probably accurately describes what the command\nformerly known as 'commit' does.\n\nI'm not entirely sure that 'dcommit' should be renamed to 'commit'\njust yet...  Perhaps 'push' or 'push-changes'?\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n Documentation/git-svn.txt     |   20 ++++++++++----------\n git-svn.perl                  |   12 ++++++------\n t/t9100-git-svn-basic.sh      |   22 +++++++++++-----------\n t/t9101-git-svn-props.sh      |    2 +-\n t/t9102-git-svn-deep-rmdir.sh |    2 +-\n 5 files changed, 29 insertions(+), 29 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex c589a98..f5f57e8 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -64,7 +64,7 @@ manually joining branches on commit.\n \tagainst the latest changes in the SVN repository.\n \tAn optional command-line argument may be specified as an\n \talternative to HEAD.\n-\tThis is advantageous over 'commit' (below) because it produces\n+\tThis is advantageous over 'set-tree' (below) because it produces\n \tcleaner, more linear history.\n \n 'log'::\n@@ -89,7 +89,7 @@ manually joining branches on commit.\n \n \tAny other arguments are passed directly to `git log'\n \n-'commit'::\n+'set-tree'::\n \tYou should consider using 'dcommit' instead of this command.\n \tCommit specified commit or tree objects to SVN.  This relies on\n \tyour imported fetch data being up-to-date.  This makes\n@@ -172,7 +172,7 @@ This can allow you to make partial mirrors when running fetch.\n -::\n --stdin::\n \n-Only used with the 'commit' command.\n+Only used with the 'set-tree' command.\n \n Read a list of commits from stdin and commit them in reverse\n order.  Only the leading sha1 is read from each line, so\n@@ -180,7 +180,7 @@ git-rev-list --pretty=oneline output can be used.\n \n --rmdir::\n \n-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.\n+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.\n \n Remove directories from the SVN tree if there are no files left\n behind.  SVN can version empty directories, and they are not\n@@ -193,7 +193,7 @@ repo-config key: svn.rmdir\n -e::\n --edit::\n \n-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.\n+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.\n \n Edit the commit message before committing to SVN.  This is off by\n default for objects that are commits, and forced on when committing\n@@ -204,7 +204,7 @@ repo-config key: svn.edit\n -l<num>::\n --find-copies-harder::\n \n-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.\n+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.\n \n They are both passed directly to git-diff-tree see\n gitlink:git-diff-tree[1] for more information.\n@@ -276,7 +276,7 @@ ADVANCED OPTIONS\n \n -b<refname>::\n --branch <refname>::\n-Used with 'fetch', 'dcommit' or 'commit'.\n+Used with 'fetch', 'dcommit' or 'set-tree'.\n \n This can be used to join arbitrary git branches to remotes/git-svn\n on new commits where the tree object is equivalent.\n@@ -392,11 +392,11 @@ REBASE VS. PULL\n ---------------\n \n Originally, git-svn recommended that the remotes/git-svn branch be\n-pulled from.  This is because the author favored 'git-svn commit B'\n-to commit a single head rather than the 'git-svn commit A..B' notation\n+pulled from.  This is because the author favored 'git-svn set-tree B'\n+to commit a single head rather than the 'git-svn set-tree A..B' notation\n to commit multiple commits.\n \n-If you use 'git-svn commit A..B' to commit several diffs and you do not\n+If you use 'git-svn set-tree A..B' to commit several diffs and you do not\n have the latest remotes/git-svn merged into my-branch, you should use\n 'git rebase' to update your work branch instead of 'git pull'.  'pull'\n can cause non-linear history to be flattened when committing into SVN,\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 077e920..07748bc 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -107,7 +107,12 @@ my %cmd = (\n \tinit => [ \\&init, \"Initialize a repo for tracking\" .\n \t\t\t  \" (requires URL argument)\",\n \t\t\t  \\%init_opts ],\n-\tcommit => [ \\&commit, \"Commit git revisions to SVN\",\n+\tdcommit => [ \\&dcommit, 'Commit several diffs to merge with upstream',\n+\t\t\t{ 'merge|m|M' => \\$_merge,\n+\t\t\t  'strategy|s=s' => \\$_strategy,\n+\t\t\t  'dry-run|n' => \\$_dry_run,\n+\t\t\t%cmt_opts } ],\n+\t'set-tree' => [ \\&commit, \"Set an SVN repository to a git tree-ish\",\n \t\t\t{\t'stdin|' => \\$_stdin, %cmt_opts, %fc_opts, } ],\n \t'show-ignore' => [ \\&show_ignore, \"Show svn:ignore listings\",\n \t\t\t{ 'revision|r=i' => \\$_revision } ],\n@@ -150,11 +155,6 @@ my %cmd = (\n \t\t\t  'file|F=s' => \\$_file,\n \t\t\t  'revision|r=s' => \\$_revision,\n \t\t\t%cmt_opts } ],\n-\tdcommit => [ \\&dcommit, 'Commit several diffs to merge with upstream',\n-\t\t\t{ 'merge|m|M' => \\$_merge,\n-\t\t\t  'strategy|s=s' => \\$_strategy,\n-\t\t\t  'dry-run|n' => \\$_dry_run,\n-\t\t\t%cmt_opts } ],\n );\n \n my $cmd;\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex 0fc462e..0edf19e 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -56,7 +56,7 @@ git update-index --add --remove dir/a/b/c/d/e/file dir/file file\n git commit -m \"$name\"\n \n test_expect_success \"$name\" \\\n-    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch &&\n+    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch &&\n      svn up $SVN_TREE &&\n      test -d $SVN_TREE/dir && test ! -d $SVN_TREE/dir/a\"\n \n@@ -70,7 +70,7 @@ git update-index --add dir/file/file\n git commit -m \"$name\"\n \n test_expect_failure \"$name\" \\\n-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch' \\\n+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch' \\\n     || true\n \n \n@@ -85,7 +85,7 @@ git update-index --add -- bar\n git commit -m \"$name\"\n \n test_expect_failure \"$name\" \\\n-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch2' \\\n+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2' \\\n     || true\n \n \n@@ -100,7 +100,7 @@ git-update-index --add bar/zzz/yyy\n git commit -m \"$name\"\n \n test_expect_failure \"$name\" \\\n-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch3' \\\n+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3' \\\n     || true\n \n \n@@ -115,7 +115,7 @@ git update-index --add -- dir\n git commit -m \"$name\"\n \n test_expect_failure \"$name\" \\\n-    'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch4' \\\n+    'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4' \\\n     || true\n \n \n@@ -127,7 +127,7 @@ git update-index exec.sh\n git commit -m \"$name\"\n \n test_expect_success \"$name\" \\\n-    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n+    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n      svn up $SVN_TREE &&\n      test ! -x $SVN_TREE/exec.sh\"\n \n@@ -138,7 +138,7 @@ git update-index exec.sh\n git commit -m \"$name\"\n \n test_expect_success \"$name\" \\\n-    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n+    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n      svn up $SVN_TREE &&\n      test -x $SVN_TREE/exec.sh\"\n \n@@ -153,7 +153,7 @@ then\n \tgit commit -m \"$name\"\n \n \ttest_expect_success \"$name\" \\\n-\t    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n+\t    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n \t     svn up $SVN_TREE &&\n \t     test -L $SVN_TREE/exec.sh\"\n \n@@ -164,7 +164,7 @@ then\n \tgit commit -m \"$name\"\n \n \ttest_expect_success \"$name\" \\\n-\t    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n+\t    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n \t     svn up $SVN_TREE &&\n \t     test -x $SVN_TREE/bar/zzz &&\n \t     test -L $SVN_TREE/exec-2.sh\"\n@@ -177,7 +177,7 @@ then\n \tgit commit -m \"$name\"\n \n \ttest_expect_success \"$name\" \\\n-\t    \"git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n+\t    \"git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&\n \t     svn up $SVN_TREE &&\n \t     test -f $SVN_TREE/exec-2.sh &&\n \t     test ! -L $SVN_TREE/exec-2.sh &&\n@@ -192,7 +192,7 @@ then\n \tgit update-index exec-2.sh\n \tgit commit -m 'Ã©Ã¯â'\n \texport LC_ALL=\"$GIT_SVN_LC_ALL\"\n-\ttest_expect_success \"$name\" \"git-svn commit HEAD\"\n+\ttest_expect_success \"$name\" \"git-svn set-tree HEAD\"\n \tunset LC_ALL\n else\n \techo \"UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)\"\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex a5a235f..5543b07 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -74,7 +74,7 @@ test_expect_success \"$name\" \\\n \t'git checkout -b mybranch remotes/git-svn &&\n \techo Hi again >> kw.c &&\n \tgit commit -a -m \"test keywoards ignoring\" &&\n-\tgit-svn commit remotes/git-svn..mybranch &&\n+\tgit-svn set-tree remotes/git-svn..mybranch &&\n \tgit pull . remotes/git-svn'\n \n expect='/* $Id$ */'\ndiff --git a/t/t9102-git-svn-deep-rmdir.sh b/t/t9102-git-svn-deep-rmdir.sh\nindex d693d18..572aaed 100755\n--- a/t/t9102-git-svn-deep-rmdir.sh\n+++ b/t/t9102-git-svn-deep-rmdir.sh\n@@ -21,7 +21,7 @@ test_expect_success 'mirror via git-svn' \"\n test_expect_success 'Try a commit on rmdir' \"\n \tgit rm -f deeply/nested/directory/number/2/another &&\n \tgit commit -a -m 'remove another' &&\n-\tgit-svn commit --rmdir HEAD &&\n+\tgit-svn set-tree --rmdir HEAD &&\n \tsvn ls -R $svnrepo | grep ^deeply/nested/directory/number/1\n \t\"\n \n-- \n1.4.4.2.g0817\n"},{"id":"296508","messageId":"7vbqm4ezv8.fsf@assigned-by-dhcp.cox.net","threadId":"43459","inReplyTo":"11662558902535-git-send-email-normalperson@yhbt.net","subject":"Re: [RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree'","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-16T13:26:03Z","receivedAt":"2006-12-16T13:26:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> 'set-tree' probably accurately describes what the command\n> formerly known as 'commit' does.\n>\n> I'm not entirely sure that 'dcommit' should be renamed to 'commit'\n> just yet...  Perhaps 'push' or 'push-changes'?\n\nI think Pasky did such a three-way rename to avoid breaking\npeople's fingers.  I thought it was a reasonable transition\nstrategy, but some people might say its only effect was to break\npeople's fingers not just once but twice, so Pasky himself\nand/or Cogito users may have some input on this.\n\nWe are talking about major UI change between 1.4 series and\nv1.5.0 on the core Porcelain-ish side, so if you feel confident\nthat things would settle down in a month or so in the git-svn\nfront, it may be a good idea to roll sweeping changes into the\nsame timeframe.\n"},{"id":"294888","messageId":"20061216214455.GC26800@hand.yhbt.net","threadId":"43459","inReplyTo":"7vbqm4ezv8.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC/PATCH 2/2] git-svn: rename 'commit' command to 'set-tree'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-12-16T21:44:56Z","receivedAt":"2006-12-16T21:44:56Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > 'set-tree' probably accurately describes what the command\n> > formerly known as 'commit' does.\n> >\n> > I'm not entirely sure that 'dcommit' should be renamed to 'commit'\n> > just yet...  Perhaps 'push' or 'push-changes'?\n> \n> I think Pasky did such a three-way rename to avoid breaking\n> people's fingers.  I thought it was a reasonable transition\n> strategy, but some people might say its only effect was to break\n> people's fingers not just once but twice, so Pasky himself\n> and/or Cogito users may have some input on this.\n\nGood point about breaking fingers twice.  I don't think 'commit'\naccurately describes any current operation that git-svn does; so the\ncommand can probably go away safely.  I'm guessing that something along\nthe lines of 'push' is probably a better way to describe 'dcommit'.\n\n> We are talking about major UI change between 1.4 series and\n> v1.5.0 on the core Porcelain-ish side, so if you feel confident\n> that things would settle down in a month or so in the git-svn\n> front, it may be a good idea to roll sweeping changes into the\n> same timeframe.\n\nI plan on supporting remotes in the config file; and adding support for\nsvn in git-fetch (wrapping git-svn multi-fetch, which should get faster\nby then)\n\n-- \n"}]}