"$trunk_url ($_trunk)\n";
}
init($trunk_url);
- command_noisy('repo-config', 'svn.trunk', $trunk_url);
+ command_noisy('config', 'svn.trunk', $trunk_url);
}
}
$_prefix = '' unless defined $_prefix;
process_commit($_, $r_min, $r_max) foreach reverse @k;
}
out:
- eval { command_close_pipe($log) };
+ close $log;
print '-' x72,"\n" unless $_incremental || $_oneline;
}
return 1 if $_color;
my ($dc, $dcvar);
$dcvar = 'color.diff';
- $dc = `git-repo-config --get $dcvar`;
+ $dc = `git-config --get $dcvar`;
if ($dc eq '') {
# nothing at all; fallback to "diff.color"
$dcvar = 'diff.color';
- $dc = `git-repo-config --get $dcvar`;
+ $dc = `git-config --get $dcvar`;
}
chomp($dc);
if ($dc eq 'auto') {
my $pc;
- $pc = `git-repo-config --get color.pager`;
+ $pc = `git-config --get color.pager`;
if ($pc eq '') {
# does not have it -- fallback to pager.color
- $pc = `git-repo-config --bool --get pager.color`;
+ $pc = `git-config --bool --get pager.color`;
}
else {
- $pc = `git-repo-config --bool --get color.pager`;
+ $pc = `git-config --bool --get color.pager`;
if ($?) {
$pc = 'false';
}
}
return 0 if $dc eq 'never';
return 1 if $dc eq 'always';
- chomp($dc = `git-repo-config --bool --get $dcvar`);
+ chomp($dc = `git-config --bool --get $dcvar`);
return ($dc eq 'true');
}
waitpid $pid, 0;
croak $? if $?;
my ($n) = ($switch =~ /^--(\w+)/);
- command_noisy('repo-config', "svn.$n", $full_url);
+ command_noisy('config', "svn.$n", $full_url);
}
sub common_prefix {
$seen{$commit} = 1;
}
}
- eval { command_close_pipe($pipe) };
+ close $pipe;
}
}
%tree_map = ();
}
-# convert GetOpt::Long specs for use by git-repo-config
+# convert GetOpt::Long specs for use by git-config
sub read_repo_config {
return unless -d $GIT_DIR;
my $opts = shift;
my $v = $opts->{$o};
my ($key) = ($o =~ /^([a-z\-]+)/);
$key =~ s/-//g;
- my $arg = 'git-repo-config';
+ my $arg = 'git-config';
$arg .= ' --int' if ($o =~ /[:=]i$/);
$arg .= ' --bool' if ($o !~ /[:=][sfi]$/);
if (ref $v eq 'ARRAY') {
last unless /^\S/;
}
}
- eval { command_close_pipe($ch) }; # breaking the pipe
+ close $ch; # breaking the pipe
# if real parents are the only ones in the grafts, drop it
next if join(' ',sort keys %$p) eq join(' ',sort keys %x);
} elsif ($tz =~ s/^\-//) {
$s -= tz_to_s_offset($tz);
}
- eval { command_close_pipe($fh) };
+ close $fh;
return $s;
}
die "Can't get commit time for commit: $cmt\n";
$default_username = $_username if defined $_username;
if (defined $default_username && length $default_username) {
if (defined $realm && length $realm) {
- print "Authentication realm: $realm\n";
+ print STDERR "Authentication realm: $realm\n";
+ STDERR->flush;
}
$cred->username($default_username);
} else {
sub _ssl_server_trust_prompt {
my ($cred, $realm, $failures, $cert_info, $may_save, $pool) = @_;
$may_save = undef if $_no_auth_cache;
- print "Error validating server certificate for '$realm':\n";
+ print STDERR "Error validating server certificate for '$realm':\n";
if ($failures & $SVN::Auth::SSL::UNKNOWNCA) {
- print " - The certificate is not issued by a trusted ",
+ print STDERR " - The certificate is not issued by a trusted ",
"authority. Use the\n",
" fingerprint to validate the certificate manually!\n";
}
if ($failures & $SVN::Auth::SSL::CNMISMATCH) {
- print " - The certificate hostname does not match.\n";
+ print STDERR " - The certificate hostname does not match.\n";
}
if ($failures & $SVN::Auth::SSL::NOTYETVALID) {
- print " - The certificate is not yet valid.\n";
+ print STDERR " - The certificate is not yet valid.\n";
}
if ($failures & $SVN::Auth::SSL::EXPIRED) {
- print " - The certificate has expired.\n";
+ print STDERR " - The certificate has expired.\n";
}
if ($failures & $SVN::Auth::SSL::OTHER) {
- print " - The certificate has an unknown error.\n";
+ print STDERR " - The certificate has an unknown error.\n";
}
- printf( "Certificate information:\n".
+ printf STDERR
+ "Certificate information:\n".
" - Hostname: %s\n".
" - Valid: from %s until %s\n".
" - Issuer: %s\n".
" - Fingerprint: %s\n",
map $cert_info->$_, qw(hostname valid_from valid_until
- issuer_dname fingerprint) );
+ issuer_dname fingerprint);
my $choice;
prompt:
- print $may_save ?
+ print STDERR $may_save ?
"(R)eject, accept (t)emporarily or accept (p)ermanently? " :
"(R)eject or accept (t)emporarily? ";
+ STDERR->flush;
$choice = lc(substr(<STDIN> || 'R', 0, 1));
if ($choice =~ /^t$/i) {
$cred->may_save(undef);
sub _ssl_client_cert_prompt {
my ($cred, $realm, $may_save, $pool) = @_;
$may_save = undef if $_no_auth_cache;
- print "Client certificate filename: ";
+ print STDERR "Client certificate filename: ";
+ STDERR->flush;
chomp(my $filename = <STDIN>);
$cred->cert_file($filename);
$cred->may_save($may_save);
my ($cred, $realm, $may_save, $pool) = @_;
$may_save = undef if $_no_auth_cache;
if (defined $realm && length $realm) {
- print "Authentication realm: $realm\n";
+ print STDERR "Authentication realm: $realm\n";
}
my $username;
if (defined $_username) {
$username = $_username;
} else {
- print "Username: ";
+ print STDERR "Username: ";
+ STDERR->flush;
chomp($username = <STDIN>);
}
$cred->username($username);
sub _read_password {
my ($prompt, $realm) = @_;
- print $prompt;
+ print STDERR $prompt;
+ STDERR->flush;
require Term::ReadKey;
Term::ReadKey::ReadMode('noecho');
my $password = '';
$password .= $key;
}
Term::ReadKey::ReadMode('restore');
- print "\n";
+ print STDERR "\n";
+ STDERR->flush;
$password;
}
delete $rm->{join '/', @dn};
}
unless (%$rm) {
- eval { command_close_pipe($fh) };
+ close $fh;
return;
}
}
foreach my $d (sort { $b =~ tr#/#/# <=> $a =~ tr#/#/# } keys %$rm) {
$self->close_directory($bat->{$d}, $p);
my ($dn) = ($d =~ m#^(.*?)/?(?:[^/]+)$#);
- print "\tD+\t/$d/\n" unless $q;
+ print "\tD+\t$d/\n" unless $q;
$self->SUPER::delete_entry($d, $r, $bat->{$dn}, $p);
delete $bat->{$d};
}