[Bps-public-commit] r14594 - in Pushmi/branches/lock/lib/Pushmi: .
clkao at bestpractical.com
clkao at bestpractical.com
Tue Jul 29 12:11:52 EDT 2008
Author: clkao
Date: Tue Jul 29 12:11:52 2008
New Revision: 14594
Modified:
Pushmi/branches/lock/lib/Pushmi/Command.pm
Pushmi/branches/lock/lib/Pushmi/Command/Runhook.pm
Pushmi/branches/lock/lib/Pushmi/Command/Runlock.pm
Pushmi/branches/lock/lib/Pushmi/Command/Rununlock.pm
Log:
Make lock related features require svn 1.6.0 on replica.
Modified: Pushmi/branches/lock/lib/Pushmi/Command.pm
==============================================================================
--- Pushmi/branches/lock/lib/Pushmi/Command.pm (original)
+++ Pushmi/branches/lock/lib/Pushmi/Command.pm Tue Jul 29 12:11:52 2008
@@ -103,6 +103,10 @@
return $SVN::_Core::SVN_NO_ERROR;
}
+sub requires_svn_version {
+ my ($self, $version, $message) = @_;
+ die $message."\n" if $SVN::Core::VERSION lt $version;
+}
1;
Modified: Pushmi/branches/lock/lib/Pushmi/Command/Runhook.pm
==============================================================================
--- Pushmi/branches/lock/lib/Pushmi/Command/Runhook.pm (original)
+++ Pushmi/branches/lock/lib/Pushmi/Command/Runhook.pm Tue Jul 29 12:11:52 2008
@@ -3,6 +3,7 @@
use warnings;
use base 'Pushmi::Command';
use SVK::Editor::MapRev;
+use SVK::I18N;
our $AUTHOR;
my $logger = Pushmi::Config->logger('pushmi.runhook');
@@ -46,6 +47,9 @@
}
}
+ $self->requires_svn_version('1.6.0', loc("Commit with locks requires svn 1.6.0 on replica."))
+ if $locks;
+
# XXX: if we reentrant, the mirror will be in deadlock.
$AUTHOR = $txn->prop('svn:author');
$logger->info("[$repospath] committing from txn $self->{txnname} by $AUTHOR");
Modified: Pushmi/branches/lock/lib/Pushmi/Command/Runlock.pm
==============================================================================
--- Pushmi/branches/lock/lib/Pushmi/Command/Runlock.pm (original)
+++ Pushmi/branches/lock/lib/Pushmi/Command/Runlock.pm Tue Jul 29 12:11:52 2008
@@ -2,6 +2,7 @@
use strict;
use warnings;
use base 'Pushmi::Command';
+use SVK::I18N;
my $logger = Pushmi::Config->logger('pushmi.runlock');
sub options {
@@ -15,6 +16,8 @@
my ($self, $repospath) = @_;
die "repospath required" unless $repospath;
+ $self->requires_svn_version('1.6.0', loc("locking requires svn 1.6.0 on replica."));
+
my $pushmi = Pushmi::Mirror->new( path => $repospath );
$pushmi->ensure_consistency;
Modified: Pushmi/branches/lock/lib/Pushmi/Command/Rununlock.pm
==============================================================================
--- Pushmi/branches/lock/lib/Pushmi/Command/Rununlock.pm (original)
+++ Pushmi/branches/lock/lib/Pushmi/Command/Rununlock.pm Tue Jul 29 12:11:52 2008
@@ -2,6 +2,7 @@
use strict;
use warnings;
use base 'Pushmi::Command';
+use SVK::I18N;
my $logger = Pushmi::Config->logger('pushmi.runlock');
sub options {
@@ -15,6 +16,8 @@
my ($self, $repospath) = @_;
die "repospath required" unless $repospath;
+ $self->requires_svn_version('1.6.0', loc("locking requires svn 1.6.0 on replica."));
+
my $pushmi = Pushmi::Mirror->new( path => $repospath );
$pushmi->ensure_consistency;
More information about the Bps-public-commit
mailing list