[Bps-public-commit] r15850 - in SVN-Mirror/trunk: lib/SVN lib/SVN/Mirror
clkao at bestpractical.com
clkao at bestpractical.com
Mon Sep 8 07:38:13 EDT 2008
Author: clkao
Date: Mon Sep 8 07:38:13 2008
New Revision: 15850
Modified:
SVN-Mirror/trunk/ (props changed)
SVN-Mirror/trunk/META.yml
SVN-Mirror/trunk/Makefile.PL
SVN-Mirror/trunk/lib/SVN/Mirror.pm
SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm
Log:
r380 at mtl: clkao | 2006-10-04 06:28:40 +0800
* Use a custom transaction to commit the mirror rev, and have the
revision property set via txn for atomicy.
* If svk:notify-commit is set on rev 0, set the svk:commit property on
the txn.
* Bump svn requirement to 1.2.0.
Modified: SVN-Mirror/trunk/META.yml
==============================================================================
--- SVN-Mirror/trunk/META.yml (original)
+++ SVN-Mirror/trunk/META.yml Mon Sep 8 07:38:13 2008
@@ -12,8 +12,8 @@
Class::Accessor: 0
Date::Format: 0
File::chdir: 0
- SVN::Core: 1.0.7
+ SVN::Core: 1.2.0
SVN::Simple::Edit: 0
Term::ReadKey: 0
URI::Escape: 0
-version: 0.71
+version: 0.72
Modified: SVN-Mirror/trunk/Makefile.PL
==============================================================================
--- SVN-Mirror/trunk/Makefile.PL (original)
+++ SVN-Mirror/trunk/Makefile.PL Mon Sep 8 07:38:13 2008
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-my $required_svn = '1.0.7';
+my $required_svn = '1.2.0';
use inc::Module::Install;
Modified: SVN-Mirror/trunk/lib/SVN/Mirror.pm
==============================================================================
--- SVN-Mirror/trunk/lib/SVN/Mirror.pm (original)
+++ SVN-Mirror/trunk/lib/SVN/Mirror.pm Mon Sep 8 07:38:13 2008
@@ -1,6 +1,6 @@
#!/usr/bin/perl
package SVN::Mirror;
-our $VERSION = '0.71';
+our $VERSION = '0.72';
use SVN::Core;
use SVN::Repos;
use SVN::Fs;
Modified: SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm
==============================================================================
--- SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm (original)
+++ SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm Mon Sep 8 07:38:13 2008
@@ -1,6 +1,6 @@
package SVN::Mirror::Ra;
@ISA = ('SVN::Mirror');
-$VERSION = '0.71';
+$VERSION = '0.72';
use strict;
use SVN::Core;
use SVN::Repos;
@@ -321,11 +321,6 @@
sub committed {
my ($self, $revmap, $date, $sourcerev, $rev) = @_;
- $self->{fs}->change_rev_prop($rev, 'svn:date', $date);
- # sync remote headrev too
- $self->{fs}->change_rev_prop($rev, 'svm:headrev', $revmap."$self->{rsource_uuid}:$sourcerev\n");
- $self->{fs}->change_rev_prop($rev, 'svm:incomplete', '*')
- if $self->{rev_incomplete};
$self->{headrev} = $rev;
$self->unlock ('mirror');
@@ -361,9 +356,20 @@
$revmap = $self->_revmap ($rev, $ra) if $self->_relayed;
$revmap ||= '';
+ my $txn = $self->{repos}->fs_begin_txn_for_commit
+ ($self->{fs}->youngest_rev, $author, $msg);
+ $txn->change_prop('svk:commit', '*')
+ if $self->{fs}->revision_prop(0, 'svk:notify-commit');
+
+ $txn->change_prop('svn:date', $date);
+ # XXX: sync remote headrev too
+ $txn->change_prop('svm:headrev', $revmap."$self->{rsource_uuid}:$rev\n");
+ $txn->change_prop('svm:incomplete', '*')
+ if $self->{rev_incomplete};
+
my $editor = SVN::Mirror::Ra::NewMirrorEditor->new
- ($self->{repos}->get_commit_editor
- ('', $self->{target_path}, $author, $msg,
+ ($self->{repos}->get_commit_editor2
+ ($txn, '', $self->{target_path}, $author, $msg,
sub { $newrev = $_[0];
$self->committed ($revmap, $date, $rev, @_) }));
More information about the Bps-public-commit
mailing list