Commit 927f0c3a authored by rojanu's avatar rojanu Committed by Frédéric Buclin

Bug 871473: New code hook "before_read" in Migrate.pm

r=LpSolit a=sgreen
parent 45286021
...@@ -153,6 +153,7 @@ sub do_migration { ...@@ -153,6 +153,7 @@ sub do_migration {
} }
$dbh->bz_start_transaction(); $dbh->bz_start_transaction();
$self->before_read();
# Read Other Database # Read Other Database
my $users = $self->users; my $users = $self->users;
my $products = $self->products; my $products = $self->products;
...@@ -544,6 +545,7 @@ sub write_config { ...@@ -544,6 +545,7 @@ sub write_config {
sub after_insert {} sub after_insert {}
sub before_insert {} sub before_insert {}
sub after_read {} sub after_read {}
sub before_read {}
############# #############
# Inserters # # Inserters #
...@@ -1147,6 +1149,11 @@ and yet shouldn't be added to the initial description of the bug when ...@@ -1147,6 +1149,11 @@ and yet shouldn't be added to the initial description of the bug when
translating bugs, then they should be listed here. See L</translate_bug> for translating bugs, then they should be listed here. See L</translate_bug> for
more detail. more detail.
=head2 before_read
This is called before any data is read from the "other bug-tracker".
The default implementation does nothing.
=head2 after_read =head2 after_read
This is run after all data is read from the other bug-tracker, but This is run after all data is read from the other bug-tracker, but
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment