{
my ($self, $branch, $start_rev) = @_;
my $last_rev = $self->get_last_svn_rev($branch);
- my @ret = ();
+ my $r = undef;
my $nroot = $self->{repos}->fs->revision_root($last_rev);
my $hist = $nroot->node_history($branch);
- while ($hist = $hist->prev(0)) {
- my $crev = $hist->location();
+ while ($hist) {
+ my ($cpath, $crev) = $hist->location();
last unless defined($crev);
last unless $crev > 0;
last unless $crev > $start_rev;
- unshift(@ret, $crev);
+ $r->{$crev}->{rev} = $crev;
+ $r->{$crev}->{branch} = $cpath;
+
+ $hist = $hist->prev(1);
}
- return @ret;
+ return $r;
}
sub svn2git_author($$)
my $last_rev = $r->get_last_svn_rev($svn_branch);
my $start_rev = get_last_svn_rev($last_svn_rev_file, $svn_start_rev);
-my @revs = $r->get_missing_svn_revs($svn_branch, $start_rev);
+my $revs = $r->get_missing_svn_revs($svn_branch, $start_rev);
print "start: $start_rev last: $last_rev\n";
-foreach my $rev (@revs) {
-
+foreach my $rev (sort keys %{$revs}) {
print "Get patch for rev: $rev\n";
- my $p = $r->get_git_patch($svn_branch, $rev);
+ my $p = $r->get_git_patch($revs->{$rev}->{branch}, $rev);
next unless defined($p->{git_patch});