@@ -1537,7 +1537,7 @@ sub _rev_list {
1537
1537
@rv ;
1538
1538
}
1539
1539
1540
- sub check_cherry_pick {
1540
+ sub check_cherry_pick2 {
1541
1541
my $base = shift ;
1542
1542
my $tip = shift ;
1543
1543
my $parents = shift ;
@@ -1552,7 +1552,8 @@ sub check_cherry_pick {
1552
1552
delete $commits {$commit };
1553
1553
}
1554
1554
}
1555
- return (keys %commits );
1555
+ my @k = (keys %commits );
1556
+ return (scalar @k , $k [0]);
1556
1557
}
1557
1558
1558
1559
sub has_no_changes {
@@ -1597,7 +1598,7 @@ sub tie_for_persistent_memoization {
1597
1598
mkpath([$cache_path ]) unless -d $cache_path ;
1598
1599
1599
1600
my %lookup_svn_merge_cache ;
1600
- my %check_cherry_pick_cache ;
1601
+ my %check_cherry_pick2_cache ;
1601
1602
my %has_no_changes_cache ;
1602
1603
my %_rev_list_cache;
1603
1604
@@ -1608,11 +1609,11 @@ sub tie_for_persistent_memoization {
1608
1609
LIST_CACHE => [' HASH' => \%lookup_svn_merge_cache ],
1609
1610
;
1610
1611
1611
- tie_for_persistent_memoization(\%check_cherry_pick_cache ,
1612
- " $cache_path /check_cherry_pick " );
1613
- memoize ' check_cherry_pick ' ,
1612
+ tie_for_persistent_memoization(\%check_cherry_pick2_cache ,
1613
+ " $cache_path /check_cherry_pick2 " );
1614
+ memoize ' check_cherry_pick2 ' ,
1614
1615
SCALAR_CACHE => ' FAULT' ,
1615
- LIST_CACHE => [' HASH' => \%check_cherry_pick_cache ],
1616
+ LIST_CACHE => [' HASH' => \%check_cherry_pick2_cache ],
1616
1617
;
1617
1618
1618
1619
tie_for_persistent_memoization(\%has_no_changes_cache ,
@@ -1636,7 +1637,7 @@ sub tie_for_persistent_memoization {
1636
1637
$memoized = 0;
1637
1638
1638
1639
Memoize::unmemoize ' lookup_svn_merge' ;
1639
- Memoize::unmemoize ' check_cherry_pick ' ;
1640
+ Memoize::unmemoize ' check_cherry_pick2 ' ;
1640
1641
Memoize::unmemoize ' has_no_changes' ;
1641
1642
Memoize::unmemoize ' _rev_list' ;
1642
1643
}
@@ -1648,7 +1649,8 @@ sub tie_for_persistent_memoization {
1648
1649
return unless -d $cache_path ;
1649
1650
1650
1651
for my $cache_file ((" $cache_path /lookup_svn_merge" ,
1651
- " $cache_path /check_cherry_pick" ,
1652
+ " $cache_path /check_cherry_pick" , # old
1653
+ " $cache_path /check_cherry_pick2" ,
1652
1654
" $cache_path /has_no_changes" )) {
1653
1655
for my $suffix (qw( yaml db) ) {
1654
1656
my $file = " $cache_file .$suffix " ;
@@ -1817,15 +1819,15 @@ sub find_extra_svn_parents {
1817
1819
}
1818
1820
1819
1821
# double check that there are no missing non-merge commits
1820
- my (@incomplete ) = check_cherry_pick (
1822
+ my ($ninc , $ifirst ) = check_cherry_pick2 (
1821
1823
$merge_base , $merge_tip ,
1822
1824
$parents ,
1823
1825
@all_ranges ,
1824
1826
);
1825
1827
1826
- if ( @incomplete ) {
1827
- warn " W:svn cherry-pick ignored ($spec ) - missing "
1828
- . @incomplete . " commit(s) (eg $incomplete [0] )\n " ;
1828
+ if ($ninc ) {
1829
+ warn " W:svn cherry-pick ignored ($spec ) - missing " .
1830
+ " $ninc commit(s) (eg $ifirst )\n " ;
1829
1831
} else {
1830
1832
warn
1831
1833
" Found merge parent ($spec ): " ,
0 commit comments