0
  6   ;ˆl–äY>”Je¶¥ < ¸Ó× Ò˜´o�þBÛË4ÑdäiéB ?É344ÏÂÀÌ X    ;‹     �‘ÏNÃ0Æï{
Ÿ‰²ðoCZp@š€H¯«–Ä““RööxE\`'rˆâÏ‰¿_lkÌL™ke® à±Ë¡ríñ¸¬šÒ}à[quCñn2‘[¯Ðe„©¶fžãžé=¼Wk ¾ìû¦sÑ kWš-Ô¨’—�c.L©ÕYÖ˜Ke¦ÊÌþá?��Â5}Ä$·:J°é>1ÝÖ®pÏDaqôw°Ì´)ƒctíXtä˜Îçse¬²ö‡sY'úc?…•zÈÑ… å°'ð]n¤,ª`¼8ÞÁrÞÖÈ-2,¢Û.Qò‡šüA·G)Ty/O$ÆÖ� 8ˆwŽ©O6Äð.‰ÛÛ'Ç	³|³oðeŒÊþ£€/s:Å~s+JRê"ù>HÏúT‹K†qz¡«‡aP{ä ®´µzò˜¯-    6   =ˆl–Ü4ý(TÐ;â�À·q ©‹Fÿ�þDËÎ¬ãDp¢�‘¶�üÿÊƒ|·ÐÁÍ #‡    =#!/usr/bin/perl

# Copyright Â© 2009-2010 RaphaÃ«l Hertzog <hertzog@debian.org>
# Copyright Â© 2012 Guillem Jover <guillem@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

use warnings;
use strict;

use Scalar::Util qw(blessed);
use Getopt::Long qw(:config posix_default bundling_values no_ignorecase);

use Dpkg ();
use Dpkg::Changelog::Debian;
use Dpkg::ErrorHandling;
use Dpkg::Gettext;
use Dpkg::Version;
use Dpkg::Vendor qw(run_vendor_hook);

textdomain('dpkg-dev');

sub merge_entries($$$);
sub merge_block($$$;&);
sub merge_entry_item($$$$);
sub merge_conflict($$);
sub get_conflict_block($$);
sub join_lines($);

BEGIN {
    eval q{
        pop @INC if $INC[-1] eq '.';
        use Algorithm::Merge qw(merge);
    };
    if ($@) {
        *merge = sub {
            my ($o, $a, $b) = @_;
            return @$a if join("\n", @$a) eq join("\n", @$b);
            return get_conflict_block($a, $b);
        };
    }
}

sub version {
    printf g_("Debian %s version %s.\n"), $Dpkg::PROGNAME, $Dpkg::PROGVERSION;

    printf "\n" . g_(
'This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
');
}

sub usage {
    printf g_(
"Usage: %s [<option>...] <old> <new-a> <new-b> [<out>]

Options:
  -m, --merge-prereleases  merge pre-releases together, ignores everything
                             after the last '~' in the version.
      --merge-unreleased   merge UNRELEASED entries together, ignoring their
                             version numbers.
  -?, --help               show this help message.
      --version            show the version.
"), $Dpkg::PROGNAME;
}

my $merge_prereleases;
my $merge_unreleased;

my @options_spec = (
    'help|?' => sub { usage(); exit(0) },
    'version' => sub { version(); exit(0) },
    'merge-prereleases|m' => \$merge_prereleases,
    'merge-unreleased' => \$merge_unreleased,
);

{
    local $SIG{__WARN__} = sub { usageerr($_[0]) };
    GetOptions(@options_spec);
}

my $backport_version_regex = run_vendor_hook('backport-version-regex');

my ($old, $new_a, $new_b, $out_file) = @ARGV;
unless (defined $old and defined $new_a and defined $new_b)
{
    usageerr(g_('needs at least three arguments'));
}
unless (-e $old and -e $new_a and -e $new_b)
{
    usageerr(g_('file arguments need to exist'));
}

my ($cho, $cha, $chb);
$cho = Dpkg::Changelog::Debian->new();
$cho->load($old);
$cha = Dpkg::Changelog::Debian->new();
$cha->load($new_a);
$chb = Dpkg::Changelog::Debian->new();
$chb->load($new_b);

my @o = reverse @$cho;
my @a = reverse @$cha;
my @b = reverse @$chb;

my @result; # Lines to output
my $exitcode = 0; # 1 if conflict encountered

unless (merge_block($cho, $cha, $chb, sub {
			my $changes = shift;
			my $tail = $changes->get_unparsed_tail();
			chomp $tail if defined $tail;
			return $tail;
		    }))
{
    merge_conflict($cha->get_unparsed_tail(), $chb->get_unparsed_tail());
}

while (1) {
    my ($o, $a, $b) = get_items_to_merge();
    last unless defined $o o