[Bps-public-commit] r14782 - in Pushmi/trunk: bin lib/Pushmi lib/Pushmi/Apache lib/Pushmi/Command t

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Aug 5 11:30:59 EDT 2008


Author: alexmv
Date: Tue Aug  5 11:30:58 2008
New Revision: 14782

Modified:
   Pushmi/trunk/   (props changed)
   Pushmi/trunk/bin/pushmi
   Pushmi/trunk/lib/Pushmi/Apache/AuthCache.pm
   Pushmi/trunk/lib/Pushmi/Apache/RelayProvider.pm
   Pushmi/trunk/lib/Pushmi/Command.pm
   Pushmi/trunk/lib/Pushmi/Command/Runhook.pm
   Pushmi/trunk/lib/Pushmi/Command/Tryauth.pm
   Pushmi/trunk/lib/Pushmi/Command/Verify.pm
   Pushmi/trunk/lib/Pushmi/Config.pm
   Pushmi/trunk/lib/Pushmi/Test.pm
   Pushmi/trunk/t/auth-relayed.t
   Pushmi/trunk/t/auth.t
   Pushmi/trunk/t/basic.t
   Pushmi/trunk/t/concurrency.t
   Pushmi/trunk/t/lock.t
   Pushmi/trunk/t/verify.t

Log:
 r35324 at kohr-ah:  chmrr | 2008-08-05 11:30:39 -0400
  * Kill tabs with a vengance


Modified: Pushmi/trunk/bin/pushmi
==============================================================================
--- Pushmi/trunk/bin/pushmi	(original)
+++ Pushmi/trunk/bin/pushmi	Tue Aug  5 11:30:58 2008
@@ -21,8 +21,8 @@
     GetOptions ('v|version' => \$show_version) or exit;
 
     if ($show_version || ($cmd && $cmd eq 'version')) {
-	print loc("This is pushmi, version %1\n", $Pushmi::VERSION);
-	exit 0;
+        print loc("This is pushmi, version %1\n", $Pushmi::VERSION);
+        exit 0;
     }
 }
 

Modified: Pushmi/trunk/lib/Pushmi/Apache/AuthCache.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Apache/AuthCache.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Apache/AuthCache.pm	Tue Aug  5 11:30:58 2008
@@ -20,7 +20,7 @@
         require Pushmi::Config;
 
         $memd = Pushmi::Config->memcached;
-	$logger = Pushmi::Config->logger('pushmi.authcache');
+        $logger = Pushmi::Config->logger('pushmi.authcache');
     }
 
     my ( $status, $password ) = $r->get_basic_auth_pw;

Modified: Pushmi/trunk/lib/Pushmi/Apache/RelayProvider.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Apache/RelayProvider.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Apache/RelayProvider.pm	Tue Aug  5 11:30:58 2008
@@ -32,11 +32,11 @@
                 . $r->user
                 . "' '$password'" );
 
-	$memd->set( $r->user, $password, 30 ) unless $?;
-	return Apache2::Const::OK unless $?;
+        $memd->set( $r->user, $password, 30 ) unless $?;
+        return Apache2::Const::OK unless $?;
 
-	$r->note_basic_auth_failure;
-	return Apache2::Const::HTTP_UNAUTHORIZED;
+        $r->note_basic_auth_failure;
+        return Apache2::Const::HTTP_UNAUTHORIZED;
     }
 
     # refresh

Modified: Pushmi/trunk/lib/Pushmi/Command.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Command.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Command.pm	Tue Aug  5 11:30:58 2008
@@ -27,7 +27,7 @@
           SVN::Client::get_ssl_server_trust_prompt_provider(
                 \&SVK::Config::_ssl_server_trust_prompt
           ),
-	  SVN::Client::get_simple_prompt_provider( $auth, 0 ) ]
+          SVN::Client::get_simple_prompt_provider( $auth, 0 ) ]
     });
 }
 
@@ -62,11 +62,11 @@
 
     # compat
     for ($self->subcommands) {
-	if (delete $self->{$_}) {
-	    my $cmd = 'Pushmi::Command::'.ucfirst($_);
-	    $cmd->require or die "can't require $cmd: $@";
-	    return (bless $self, $cmd)->run(@_);
-	}
+        if (delete $self->{$_}) {
+            my $cmd = 'Pushmi::Command::'.ucfirst($_);
+            $cmd->require or die "can't require $cmd: $@";
+            return (bless $self, $cmd)->run(@_);
+        }
     }
 
     no warnings 'redefine';
@@ -119,7 +119,7 @@
     my ($cred, $realm, $default_username, $may_save, $pool) = @_;
     my $config = Pushmi::Config->config;
     Pushmi::Command->logger->logdie("unable to get username from config file.")
-	unless defined $config->{username};
+        unless defined $config->{username};
     $cred->username($config->{username});
     $cred->password($config->{password});
     $cred->may_save(0);

Modified: Pushmi/trunk/lib/Pushmi/Command/Runhook.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Command/Runhook.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Command/Runhook.pm	Tue Aug  5 11:30:58 2008
@@ -16,8 +16,8 @@
     my $pushmi = Pushmi::Mirror->new( path => $repospath );
     my $txn = $pushmi->repos->fs->open_txn($self->{txnname}) or die 'no such txn';
     if ($txn->prop('svk:commit')) {
-	$txn->change_prop('svk:commit', undef);
-	exit 0;
+        $txn->change_prop('svk:commit', undef);
+        exit 0;
     }
 
     my $base = $txn->base_revision;
@@ -55,18 +55,18 @@
     # delay because of the server latency of the first response
     _get_password();
     my ($editor, $inspector, %arg) = $t->get_editor(notee => 1,
-						    callback => sub {},
-						    caller => '',
+                                                    callback => sub {},
+                                                    caller => '',
                                                     lock_tokens => $locks,
-						    message  => $txn->prop('svn:log'));
+                                                    message  => $txn->prop('svn:log'));
     my $mirror = $pushmi->master;
 
     require Pushmi::Editor::Locker;
     $editor = Pushmi::Editor::Locker->new
-	({ _editor => [$editor],
-	   on_close_edit => sub {
-	       $mirror->lock;
-	   } });
+        ({ _editor => [$editor],
+           on_close_edit => sub {
+               $mirror->lock;
+           } });
 
     $editor = SVK::Editor::CopyHandler->new(
         _editor => $editor,
@@ -80,16 +80,16 @@
 
     my $base_rev = $mirror->find_changeset( $t->revision );
     $editor = SVK::Editor::MapRev->new
-	({ _editor => [$editor],
-	   cb_resolve_rev => sub { my ($func, $rev) = @_;
-				   return $func =~ m/^add/ ? $rev : $base_rev } });
+        ({ _editor => [$editor],
+           cb_resolve_rev => sub { my ($func, $rev) = @_;
+                                   return $func =~ m/^add/ ? $rev : $base_rev } });
 
     my $sync_upto;
     my $error;
     ${ $arg{post_handler} } = sub {
-	$self->logger->info("[$repospath] committed as $_[0]");
-	my $token = join(':', $mirror->repos->path, $mirror->_lock_token);
-	$txn->change_prop( 'svk:committed-by' => $token );
+        $self->logger->info("[$repospath] committed as $_[0]");
+        my $token = join(':', $mirror->repos->path, $mirror->_lock_token);
+        $txn->change_prop( 'svk:committed-by' => $token );
         $mirror->_backend->_revmap_prop( $txn, $_[0] );
         $sync_upto = $_[0] - 1;
         $self->logger->debug("post handle decides to sync upto $sync_upto");
@@ -98,21 +98,21 @@
     };
 
     {
-	local $SVN::Error::handler = sub {
-	    $_[0]->clear;
+        local $SVN::Error::handler = sub {
+            $_[0]->clear;
             $self->logger->debug('Fail to replay: '.Carp::longmess);
-	    die $_[0]->message."\n";
-	};
+            die $_[0]->message."\n";
+        };
 
-	eval {
+        eval {
             SVN::Repos::replay2($txn_root, $t->path, 0, 1, $editor, undef);
             $editor->close_edit;
         };
-	if ($error = $@) {
-	    $self->logger->info("[$repospath] Failed to replay txn to mirror: $error");
+        if ($error = $@) {
+            $self->logger->info("[$repospath] Failed to replay txn to mirror: $error");
             eval { $txn->change_prop('pushmi:dead', '*'); 1 }
                 or $self->logger->warn("[$repospath] Unable to mark dead txn as dead.");
-	}
+        }
     }
 
     # we need to switch back to the sync credential
@@ -129,8 +129,8 @@
     $self->logger->info("[$repospath] sync revision $first to $last") if $first;
     if ($error) {
         $self->logger->debug("Unlock on failure");
-	$mirror->unlock;
-	die $error;
+        $mirror->unlock;
+        die $error;
     }
 
     exit 0;
@@ -141,7 +141,7 @@
     return $_cached_password if defined $_cached_password;
 
     Pushmi::Command::Runhook->logger->error_die("unable to get author info from txn")
-	unless defined $AUTHOR;
+        unless defined $AUTHOR;
 
     my $memd = Pushmi::Config->memcached;
     my $logger = Pushmi::Config->logger('pushmi.runhook');

Modified: Pushmi/trunk/lib/Pushmi/Command/Tryauth.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Command/Tryauth.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Command/Tryauth.pm	Tue Aug  5 11:30:58 2008
@@ -19,8 +19,8 @@
     my $pushmi = Pushmi::Mirror->new( path => $repospath );
     my $editor = eval { $pushmi->master->get_commit_editor('', '*should not be committed*', sub {}) };
     if ($editor) {
-	$editor->abort_edit;
-	exit 0;
+        $editor->abort_edit;
+        exit 0;
     }
     exit 1;
 }

Modified: Pushmi/trunk/lib/Pushmi/Command/Verify.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Command/Verify.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Command/Verify.pm	Tue Aug  5 11:30:58 2008
@@ -20,7 +20,7 @@
     my $pushmi = Pushmi::Mirror->new( path => $repospath );
 
     $pushmi->repos->fs->revision_prop(0, 'pushmi:auto-verify')
-	or return;
+        or return;
 
     die "Revision required.\n" unless $self->{revision};
 
@@ -35,8 +35,8 @@
         };
 
     unless ($?) {
-	$self->logger->debug("[$repospath] revision $self->{revision} verified");
-	return;
+        $self->logger->debug("[$repospath] revision $self->{revision} verified");
+        return;
     }
 
     $self->logger->logdie("[$repospath] can't run verify: $!") if $? == -1;
@@ -65,7 +65,7 @@
     my $pushmi = Pushmi::Mirror->new( path => $repospath );
 
     my $rev = $pushmi->repos->fs->revision_prop(0, 'pushmi:inconsistent')
-	or return;
+        or return;
 
     $pushmi->repos->fs->change_rev_prop(0, 'pushmi:inconsistent', undef);
 

Modified: Pushmi/trunk/lib/Pushmi/Config.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Config.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Config.pm	Tue Aug  5 11:30:58 2008
@@ -12,8 +12,8 @@
 
     my $file = $ENV{PUSHMI_CONFIG} || '/etc/pushmi.conf';
     unless (-e $file) {
-	warn "pushmi config $file doesn't exist.\n";
-	return $config = {};
+        warn "pushmi config $file doesn't exist.\n";
+        return $config = {};
     }
     $config = LoadFile($file);
     return $config;

Modified: Pushmi/trunk/lib/Pushmi/Test.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Test.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Test.pm	Tue Aug  5 11:30:58 2008
@@ -34,17 +34,17 @@
     my ($exp, $err) = @_;
     my $line = 0;
     sub {
-	my $output = shift;
-	chomp $output;
-	++$line;
-	unless (@$exp) {
-	    push @$err, "$line: got $output";
-	    return;
-	}
-	my $item = shift @$exp;
-	push @$err, "$line: got ($output), expect ($item)\n"
-	    unless ref($item) ? ($output =~ m/$item/)
-                       	      : ($output eq $item);
+        my $output = shift;
+        chomp $output;
+        ++$line;
+        unless (@$exp) {
+            push @$err, "$line: got $output";
+            return;
+        }
+        my $item = shift @$exp;
+        push @$err, "$line: got ($output), expect ($item)\n"
+            unless ref($item) ? ($output =~ m/$item/)
+                              : ($output eq $item);
     }
 }
 
@@ -62,8 +62,8 @@
     my $ret = run3 [svn_cmd(), ($SVN::Core::VERSION ge '1.5.0'
                             ? '--non-interactive' : ()),
                     @$arg], undef,
-	_mk_cmp_closure($exp_stdout, $stdout_err), # stdout
-	_mk_cmp_closure($exp_stderr, $stdout_err); # stderr
+        _mk_cmp_closure($exp_stdout, $stdout_err), # stdout
+        _mk_cmp_closure($exp_stderr, $stdout_err); # stderr
 
     unless ($ret) {
         diag("Exit value: $?");
@@ -71,13 +71,13 @@
     }
 
     if (@$stdout_err) {
-	@_ = (0, join(' ', 'svn', @$arg));
-	diag("Different in line: ".join(',', @$stdout_err));
-	goto \&ok;
+        @_ = (0, join(' ', 'svn', @$arg));
+        diag("Different in line: ".join(',', @$stdout_err));
+        goto \&ok;
     }
     else {
-	@_ = (1, join(' ', 'svn', @$arg));
-	goto \&ok;
+        @_ = (1, join(' ', 'svn', @$arg));
+        goto \&ok;
     }
 }
 
@@ -139,16 +139,16 @@
 
     $args{extra_modules} ||= [];
     if ($ap_version =~ m/^2\.2/) {
-	$ap_version = '2.2';
-	push @{$args{extra_modules}}, "auth_basic", "authn_file", "authz_user";
+        $ap_version = '2.2';
+        push @{$args{extra_modules}}, "auth_basic", "authn_file", "authz_user";
     }
     else {
-	$ap_version = '2.0';
-	push @{$args{extra_modules}}, "auth";
+        $ap_version = '2.0';
+        push @{$args{extra_modules}}, "auth";
     }
 
     $apache->build({ AP2_VERSION => $ap_version,
-		     required_modules => [ "dav", "dav_svn", "authz_svn", "log_config", @{$args{extra_modules}}]});
+                     required_modules => [ "dav", "dav_svn", "authz_svn", "log_config", @{$args{extra_modules}}]});
 
     push @CLEANUP, sub { $apache->stop };
     return ($apache, "http://localhost:$apache->{port}/svn");
@@ -158,7 +158,7 @@
     my $port = Pushmi::Config->config->{authproxy_port};
     my $memcached_pid;
     my $memcached = can_run('memcached')
-	or die "Can't find memcached";
+        or die "Can't find memcached";
 
     system($memcached, -p => $port, qw(-l 127.0.0.1 -dP), abs_path("t/memcached.pid"));
     die $! if $?;
@@ -169,7 +169,7 @@
     chomp $memcached_pid;
     my $pid = $$;
     push @CLEANUP, sub { return unless $$ == $pid;
-			 diag 'stopping memcached'; kill 'TERM', $memcached_pid if $memcached_pid };
+                         diag 'stopping memcached'; kill 'TERM', $memcached_pid if $memcached_pid };
 }
 
 sub svn_error_txn_outofdate {
@@ -225,7 +225,7 @@
 
 END {
     for (@CLEANUP) {
-	$_->();
+        $_->();
     }
 }
 

Modified: Pushmi/trunk/t/auth-relayed.t
==============================================================================
--- Pushmi/trunk/t/auth-relayed.t	(original)
+++ Pushmi/trunk/t/auth-relayed.t	Tue Aug  5 11:30:58 2008
@@ -91,22 +91,22 @@
 
 system("svn ls $perlbal_url/A");
 is_svn_output(['co', '--non-interactive', '--no-auth-cache', "$perlbal_url/A", $copath],
-	      ['A    t/checkout/auth-relayed-svn/Q',
-	       'A    t/checkout/auth-relayed-svn/Q/qu',
-	       'A    t/checkout/auth-relayed-svn/Q/qz',
-	       'A    t/checkout/auth-relayed-svn/be',
-	       'Checked out revision 3.']);
+              ['A    t/checkout/auth-relayed-svn/Q',
+               'A    t/checkout/auth-relayed-svn/Q/qu',
+               'A    t/checkout/auth-relayed-svn/Q/qz',
+               'A    t/checkout/auth-relayed-svn/be',
+               'Checked out revision 3.']);
 
 is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
-	      [],
-	      [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
+              [],
+              [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
 
 is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'wrong', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
-	      [],
-	      [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
+              [],
+              [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
 
 is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
-	      ['','Committed revision 4.']);
+              ['','Committed revision 4.']);
 
 is($masterdepot->repos->fs->revision_prop(4, 'svn:author'), 'test', 'user is correct');
 is($slavedepot->repos->fs->revision_prop(4, 'svn:author'), 'test', 'user is correct');
@@ -114,5 +114,5 @@
 # XXX why do we need to authenticate as test?? svn_authz is totally crazy
 
 is_svn_output(['sw', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', '--relocate', "$perlbal_url/A", "$master_url/A", $copath],
-	      []);
+              []);
 

Modified: Pushmi/trunk/t/auth.t
==============================================================================
--- Pushmi/trunk/t/auth.t	(original)
+++ Pushmi/trunk/t/auth.t	Tue Aug  5 11:30:58 2008
@@ -70,12 +70,12 @@
 
 run_pushmi('sync', $slavedepot->repospath);
 is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'mkdir', "$perlbal_url/orzzzz"],
-	      [],
-	      [qr{svn: .*403 Forbidden}]);
+              [],
+              [qr{svn: .*403 Forbidden}]);
 
 #sleep 1 while 1;
 is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'mkdir', "$perlbal_url/X/mmmm"],
-	      ['','Committed revision 4.']);
+              ['','Committed revision 4.']);
 diag $slave_url;
 
 is($masterdepot->repos->fs->revision_prop(4, 'svn:author'), 'test', 'user is correct');
@@ -85,34 +85,34 @@
 my ($copath,  $corpath)  = get_copath('auth-svn');
 
 is_svn_output(['co', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', "$slave_url/X", $copath],
-	      ['A    t/checkout/auth-svn/mmmm',
-	       'Checked out revision 4.']);
+              ['A    t/checkout/auth-svn/mmmm',
+               'Checked out revision 4.']);
 
 overwrite_file("$copath/fileA.txt", "fnord");
 
 is_svn_output(['add', "$copath/fileA.txt"],
-	      ['A         t/checkout/auth-svn/fileA.txt']);
+              ['A         t/checkout/auth-svn/fileA.txt']);
 
 sub svn_error_authz_failure {
     my ($url, $path) = @_;
 
     # XXX: older svn error message:
-#	       "svn: OPTIONS request failed on '/svn/X'",
-#	       "svn: OPTIONS of '/svn/X': authorization failed (http://localhost:$perlbal_port)"]);
+#              "svn: OPTIONS request failed on '/svn/X'",
+#              "svn: OPTIONS of '/svn/X': authorization failed (http://localhost:$perlbal_port)"]);
 
     return "svn: OPTIONS of '$url$path': authorization failed ($url)";
 }
 
 is_svn_output(['ci', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => '', -m => 'commit a single file', $copath],
-	      [],
-	      ["svn: Commit failed (details follow):",
+              [],
+              ["svn: Commit failed (details follow):",
                svn_error_authz_failure("http://localhost:$perlbal_port", '/svn/X')
                ]);
 
 is_svn_output(['ci', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'commit a single file', $copath],
-	      ['Adding         t/checkout/auth-svn/fileA.txt',
-	       'Transmitting file data .',
-	       'Committed revision 5.']);
+              ['Adding         t/checkout/auth-svn/fileA.txt',
+               'Transmitting file data .',
+               'Committed revision 5.']);
 
 
 
@@ -120,15 +120,15 @@
 
 
 is_svn_output(['ci', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'commit a single file', $copath],
-	      ['Sending        t/checkout/auth-svn/fileA.txt',
-	       'Transmitting file data .',
-	       'Committed revision 6.']);
+              ['Sending        t/checkout/auth-svn/fileA.txt',
+               'Transmitting file data .',
+               'Committed revision 6.']);
 
 is_svn_output(['rm', "$copath/mmmm"],
-	      ['D         t/checkout/auth-svn/mmmm']);
+              ['D         t/checkout/auth-svn/mmmm']);
 
 
 is_svn_output(['ci', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'commit a single file', $copath],
-	      ['Deleting       t/checkout/auth-svn/mmmm',
-	       '',
-	       'Committed revision 7.']);
+              ['Deleting       t/checkout/auth-svn/mmmm',
+               '',
+               'Committed revision 7.']);

Modified: Pushmi/trunk/t/basic.t
==============================================================================
--- Pushmi/trunk/t/basic.t	(original)
+++ Pushmi/trunk/t/basic.t	Tue Aug  5 11:30:58 2008
@@ -13,41 +13,41 @@
     $muri, $repos, undef, $copath, undef ) = build_basic_test_ok();
 
 is_output($svk, 'sync', ['//'],
-	  ["Syncing $uri"]);
+          ["Syncing $uri"]);
 
 is_svn_output(['co', $muri, $copath],
-	      ['A    t/checkout/basic-svn/A',
-	       'Checked out revision 1.']);
+              ['A    t/checkout/basic-svn/A',
+               'Checked out revision 1.']);
 chdir($copath);
 overwrite_file("fromsvn.txt", "orz\n");
 is_svn_output(['add', 'fromsvn.txt'],
-	      ['A         fromsvn.txt']);
+              ['A         fromsvn.txt']);
 
 is_svn_output(['ci', -m => 'add fromsvn'],
-	      ['Adding         fromsvn.txt',
-	       'Transmitting file data .',
-	       'Committed revision 2.']);
+              ['Adding         fromsvn.txt',
+               'Transmitting file data .',
+               'Committed revision 2.']);
 is($srepos->fs->youngest_rev, 2, 'committed via hook');
 
 is_output($svk, 'mkdir', ['-m', 'X', '/test/X'],
-	  ['Committed revision 3.']);
+          ['Committed revision 3.']);
 
 append_file("fromsvn.txt", "second orz\n");
 is_svn_output(['ci', -m => 'update fromsvn'],
-	     ['Sending        fromsvn.txt',
-	      'Transmitting file data .',
-	      'Committed revision 4.']);
+             ['Sending        fromsvn.txt',
+              'Transmitting file data .',
+              'Committed revision 4.']);
 is($srepos->fs->youngest_rev, 4, 'non-conflicting commit');
 
 is_svn_output(['up'],
-	      ['A    X',
-	       'Updated to revision 4.']);;
+              ['A    X',
+               'Updated to revision 4.']);;
 ok(-d 'X', 'catch up changes happened before commit');
 
 $svk->co('/test/', $scorpath);
 append_file("$scorpath/fromsvn.txt", "this gets in first\n");
 is_output($svk, 'ci', [-m => 'commit that gets in', $scorpath],
-	  ['Committed revision 5.']);
+          ['Committed revision 5.']);
 is($srepos->fs->youngest_rev, 5);
 ## vanilla svn:
 ## svn: Commit failed (details follow):
@@ -56,9 +56,9 @@
 append_file("fromsvn.txt", "to conflict\n");
 
 is_svn_output(['ci', -m => 'trying to commit outdated change from svn'],
-	      ['Sending        fromsvn.txt',
-	       'Transmitting file data .'],
-	      ['svn: Commit failed (details follow):',
+              ['Sending        fromsvn.txt',
+               'Transmitting file data .'],
+              ['svn: Commit failed (details follow):',
                svn_error_commit_hook(255,
                                      svn_error_txn_outofdate('/fromsvn.txt', '5-1')),
                '']);
@@ -67,13 +67,13 @@
 is($repos->fs->youngest_rev, 5, "svn didn't commit through, but updates mirror");
 
 is_svn_output(['ci', -m => 'trying to commit outdated change from svn'],
-	      ['Sending        fromsvn.txt'],
-	      ['svn: Commit failed (details follow):',
-	       'svn: '.svn_error_txn_outofdate('/fromsvn.txt', '5-1')]);
+              ['Sending        fromsvn.txt'],
+              ['svn: Commit failed (details follow):',
+               'svn: '.svn_error_txn_outofdate('/fromsvn.txt', '5-1')]);
 
 is_svn_output(['up'],
-	      ['C    fromsvn.txt',
-	       'Updated to revision 5.']);
+              ['C    fromsvn.txt',
+               'Updated to revision 5.']);
 # svn 1.5 changes the conflict tmp file
 my $conflict_mine = -e 'fromsvn.txt.mine.txt' ? 'fromsvn.txt.mine.txt' : 'fromsvn.txt.mine';
 ok(-e $conflict_mine, 'conflict in svn up');
@@ -81,25 +81,25 @@
 unlink('fromsvn.txt');
 rename($conflict_mine, 'fromsvn.txt');
 is_svn_output(['resolved', 'fromsvn.txt'],
-	      [q{Resolved conflicted state of 'fromsvn.txt'}]);
+              [q{Resolved conflicted state of 'fromsvn.txt'}]);
 is_svn_output(['ci', -m => 'commit merged change from svn'],
-	      ['Sending        fromsvn.txt',
-	       'Transmitting file data .',
-	       'Committed revision 6.']);
+              ['Sending        fromsvn.txt',
+               'Transmitting file data .',
+               'Committed revision 6.']);
 is($srepos->fs->youngest_rev, 6, "svn commits through");
 is($repos->fs->youngest_rev, 6, "svn commit through, but updates mirror");
 
 is_svn_output(['mv', 'A', 'B'],
-	      ['A         B',
-	       'D         A']);
+              ['A         B',
+               'D         A']);
 is_svn_output(['ci', -m => 'commit a rename'],
-	      ['Deleting       A',
-	       'Adding         B', '',
-	       'Committed revision 7.']);
+              ['Deleting       A',
+               'Adding         B', '',
+               'Committed revision 7.']);
 is_output($svk, 'log', [ -qvr => '7', '/test/' ],
-	  [ qr'.*',
-	    qr'.*',
-	    'Changed paths:', '  D  /A',
-	    '  A  /B (from /A:5)', qr'.*' ]);
+          [ qr'.*',
+            qr'.*',
+            'Changed paths:', '  D  /A',
+            '  A  /B (from /A:5)', qr'.*' ]);
 
 

Modified: Pushmi/trunk/t/concurrency.t
==============================================================================
--- Pushmi/trunk/t/concurrency.t	(original)
+++ Pushmi/trunk/t/concurrency.t	Tue Aug  5 11:30:58 2008
@@ -13,15 +13,15 @@
     $muri, $repos, undef, $copath, undef ) = build_basic_test_ok();
 
 is_svn_output(['co', $muri, $copath],
-	      ['A    t/checkout/basic-svn/A',
-	       'Checked out revision 1.']);
+              ['A    t/checkout/basic-svn/A',
+               'Checked out revision 1.']);
 chdir($copath);
 
 overwrite_file("fromsvn.txt", "orz\n");
 append_file("fromsvn.txt", "line line line line line line line line\n") for 1..100000;
 use Time::HiRes qw(time sleep);
 is_svn_output(['add', 'fromsvn.txt'],
-	      ['A         fromsvn.txt']);
+              ['A         fromsvn.txt']);
 
 if ( fork() == 0 ) {
 
@@ -42,7 +42,7 @@
 
 sleep 0.5;
 is_svn_output(['mkdir', -m => 'race!', "$muri/mkdir"],
-	      ['', qr'Committed revision \d.'], []);
+              ['', qr'Committed revision \d.'], []);
 
 
 wait;
@@ -50,13 +50,13 @@
 my $m_log2 = $output;
 chomp $m_log2;
 is_output($svk, 'pg', ['svn:log', '--revprop', '-r2', '/test/'],
-	 [$m_log2]);
+         [$m_log2]);
 
 $svk->pg('svn:log', '--revprop', '-r3', '//');
 my $m_log3 = $output;
 chomp $m_log3;
 is_output($svk, 'pg', ['svn:log', '--revprop', '-r3', '/test/'],
-	 [$m_log3]);
+         [$m_log3]);
 
 is($srepos->fs->youngest_rev, 3, 'committed via hook');
 

Modified: Pushmi/trunk/t/lock.t
==============================================================================
--- Pushmi/trunk/t/lock.t	(original)
+++ Pushmi/trunk/t/lock.t	Tue Aug  5 11:30:58 2008
@@ -18,16 +18,16 @@
     $muri, $repos, undef, $copath, undef ) = build_basic_test_ok();
 
 is_svn_output(['co', $muri, $copath],
-	      ['A    t/checkout/basic-svn/A',
-	       'Checked out revision 1.']);
+              ['A    t/checkout/basic-svn/A',
+               'Checked out revision 1.']);
 chdir($copath);
 overwrite_file("fromsvn.txt", "orz\n");
 is_svn_output(['add', 'fromsvn.txt'],
-	      ['A         fromsvn.txt']);
+              ['A         fromsvn.txt']);
 is_svn_output(['ci', -m => 'add fromsvn'],
-	      ['Adding         fromsvn.txt',
-	       'Transmitting file data .',
-	       'Committed revision 2.']);
+              ['Adding         fromsvn.txt',
+               'Transmitting file data .',
+               'Committed revision 2.']);
 is($srepos->fs->youngest_rev, 2, 'committed via hook');
 
 is_svn_output(['lock', -m => 'lock from slave', 'fromsvn.txt'],

Modified: Pushmi/trunk/t/verify.t
==============================================================================
--- Pushmi/trunk/t/verify.t	(original)
+++ Pushmi/trunk/t/verify.t	Tue Aug  5 11:30:58 2008
@@ -22,9 +22,9 @@
 
     my $perl = join(' ', $^X, map { "'-I$_'" } @INC);
     my $config = { username => 'test',
-		   password => 'test',
-		   authproxy_port => 8123,
-		   verify_mirror => "$perl $verify_mirror"};
+                   password => 'test',
+                   authproxy_port => 8123,
+                   verify_mirror => "$perl $verify_mirror"};
 
     print $f Dump($config);
 
@@ -43,27 +43,27 @@
     $muri, $repos, undef, $copath, undef ) = build_basic_test_ok();
 
 is_output($svk, 'sync', ['//'],
-	  ["Syncing $uri"]);
+          ["Syncing $uri"]);
 
 is_svn_output(['co', $muri, $copath],
-	      ['A    t/checkout/basic-svn/A',
-	       'Checked out revision 1.']);
+              ['A    t/checkout/basic-svn/A',
+               'Checked out revision 1.']);
 chdir($copath);
 overwrite_file("fromsvn.txt", "orz\n");
 is_svn_output(['add', 'fromsvn.txt'],
-	      ['A         fromsvn.txt']);
+              ['A         fromsvn.txt']);
 
 is_svn_output(['ci', -m => 'add fromsvn'],
-	      ['Adding         fromsvn.txt',
-	       'Transmitting file data .',
-	       'Committed revision 2.']);
+              ['Adding         fromsvn.txt',
+               'Transmitting file data .',
+               'Committed revision 2.']);
 
 
 $svk->mkdir('-m', 'more dir', '/test/newdir');
 is_output($svk, 'sync', ['//'],
-	  ["Syncing $uri",
+          ["Syncing $uri",
            'Retrieving log information from 3 to 3',
-	   'Committed revision 3 from revision 3.']);
+           'Committed revision 3 from revision 3.']);
 
 my $depot = $svk->{xd}->find_depot('');
 $depot->repos->fs->change_rev_prop(0, 'pushmi:auto-verify', '*');
@@ -73,9 +73,9 @@
 append_file("fromsvn.txt", "orz\n");
 
 is_svn_output(['ci', -m => 'add fromsvn'],
-	      ['Sending        fromsvn.txt',
-	       'Transmitting file data .'],
-	      ['svn: Commit failed (details follow):',
+              ['Sending        fromsvn.txt',
+               'Transmitting file data .'],
+              ['svn: Commit failed (details follow):',
                svn_error_commit_hook(255,
                                      "Pushmi slave in inconsistency.  Please use the master repository at $uri",
                                      'and contact your administrator.  Sorry for the inconveniences.'), '']);



More information about the Bps-public-commit mailing list