This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch master
in repository sqitch.

commit 622cea93d5b68b37c2168b5bbb534b183536f178
Author: Christian Hofstaedtler <z...@debian.org>
Date:   Mon Jul 4 13:54:31 2016 +0200

    Import patch from upstream to work with newer DateTime
---
 debian/changelog                                   |   3 +
 debian/control                                     |   2 +-
 ...eTime-set-locale-with-DateTime-set_locale.patch | 113 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 4 files changed, 118 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f82b0ad..6095d4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ sqitch (0.9994-1) UNRELEASED; urgency=medium
   [ Christian Hofstaedtler ]
   * Update Standards-Version to 3.9.8
   * New upstream version
+  * Import patch from upstream replacing DateTime::set(locale=>)
+    with DateTime::set_locale() to fix warnings and subsequent
+    failure in testsuite.
 
  -- gregor herrmann <gre...@debian.org>  Sat, 24 Oct 2015 13:47:27 +0200
 
diff --git a/debian/control b/debian/control
index dac495a..1a53bbc 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends-Indep: libcapture-tiny-perl (>= 0.12),
                      libclass-xsaccessor-perl (>= 1.18),
                      libclone-perl,
                      libconfig-gitlike-perl (>= 1.11),
-                     libdatetime-perl,
+                     libdatetime-perl (>= 1.04),
                      libdatetime-timezone-perl,
                      libdbi-perl,
                      libdevel-stacktrace-perl,
diff --git 
a/debian/patches/Replace-DateTime-set-locale-with-DateTime-set_locale.patch 
b/debian/patches/Replace-DateTime-set-locale-with-DateTime-set_locale.patch
new file mode 100644
index 0000000..c742ee3
--- /dev/null
+++ b/debian/patches/Replace-DateTime-set-locale-with-DateTime-set_locale.patch
@@ -0,0 +1,113 @@
+From bdde12a6bb2914533f62532af30da1d85cac88e1 Mon Sep 17 00:00:00 2001
+From: Dave Rolsky <auta...@urth.org>
+Date: Sat, 18 Jun 2016 12:02:51 -0500
+Subject: [PATCH] Use DateTime->set_locale instead of ->set to change the
+ locale
+
+Requires DateTime 1.04+
+---
+ lib/App/Sqitch/DateTime.pm | 7 ++++---
+ t/datetime.t               | 4 ++--
+ t/item_formatter.t         | 2 +-
+ t/log.t                    | 4 ++--
+ t/plan_command.t           | 2 +-
+ 7 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/lib/App/Sqitch/DateTime.pm b/lib/App/Sqitch/DateTime.pm
+index 2ca8565..aca9f39 100644
+--- a/lib/App/Sqitch/DateTime.pm
++++ b/lib/App/Sqitch/DateTime.pm
+@@ -5,6 +5,7 @@ use strict;
+ use warnings;
+ use utf8;
+ use parent 'DateTime';
++use DateTime 1.04;
+ use Locale::TextDomain qw(App-Sqitch);
+ use App::Sqitch::X qw(hurl);
+ use List::Util qw(first);
+@@ -50,17 +51,17 @@ sub as_string {
+     if ( first { $format eq $_ } qw(iso iso8601) ) {
+         return join ' ', $dt->ymd('-'), $dt->hms(':'), $dt->strftime('%z');
+     } elsif ( first { $format eq $_ } qw(rfc rfc2822) ) {
+-        $dt->set( locale => 'en_US' );
++        $dt->set_locale('en_US');
+         ( my $rv = $dt->strftime('%a, %d %b %Y %H:%M:%S %z') ) =~
+             s/\+0000$/-0000/;
+         return $rv;
+     } else {
+         if ($^O eq 'MSWin32') {
+             require Win32::Locale;
+-            $dt->set( locale => Win32::Locale::get_locale() );
++            $dt->set_locale( Win32::Locale::get_locale() );
+         } else {
+             require POSIX;
+-            $dt->set( locale => POSIX::setlocale( POSIX::LC_TIME() ) );
++            $dt->set_locale( POSIX::setlocale( POSIX::LC_TIME() ) );
+         }
+         return $dt->format_cldr($format) if $format =~ s/^cldr://;
+         return $dt->strftime($format) if $format =~ s/^strftime://;
+diff --git a/t/datetime.t b/t/datetime.t
+index 338d789..dd7b2dd 100644
+--- a/t/datetime.t
++++ b/t/datetime.t
+@@ -35,7 +35,7 @@ is_deeply [$dt->as_string_formats], [qw(
+ my $rfc = do {
+     my $clone = $dt->clone;
+     $clone->set_time_zone('local');
+-    $clone->set( locale => 'en_US' );
++    $clone->set_locale('en_US');
+     ( my $rv = $clone->strftime('%a, %d %b %Y %H:%M:%S %z') ) =~ 
s/\+0000$/-0000/;
+     $rv;
+ };
+@@ -49,7 +49,7 @@ my $iso = do {
+ my $ldt = do {
+     my $clone = $dt->clone;
+     $clone->set_time_zone('local');
+-    $clone->set( locale => $LC::TIME );
++    $clone->set_locale($LC::TIME);
+     $clone;
+ };
+ 
+diff --git a/t/item_formatter.t b/t/item_formatter.t
+index 76e74a4..759ae18 100644
+--- a/t/item_formatter.t
++++ b/t/item_formatter.t
+@@ -64,7 +64,7 @@ my $event = {
+     conflicts       => []
+ };
+ 
+-$_->set( locale => $LC::TIME ) for ($local_cdt, $local_pdt);
++$_->set_locale($LC::TIME) for ($local_cdt, $local_pdt);
+ 
+ for my $spec (
+     ['%e', { event => 'deploy' }, 'deploy' ],
+diff --git a/t/log.t b/t/log.t
+index 8d7df7e..0e30b05 100644
+--- a/t/log.t
++++ b/t/log.t
+@@ -317,10 +317,10 @@ for my $spec (
+ # Test all formatting characters.
+ my $local_cdt = $cdt->clone;
+ $local_cdt->set_time_zone('local');
+-$local_cdt->set( locale => $LC::TIME );
++$local_cdt->set_locale($LC::TIME);
+ my $local_pdt = $pdt->clone;
+ $local_pdt->set_time_zone('local');
+-$local_pdt->set( locale => $LC::TIME );
++$local_pdt->set_locale($LC::TIME);
+ 
+ my $formatter = $log->formatter;
+ for my $spec (
+diff --git a/t/plan_command.t b/t/plan_command.t
+index 896e85f..448a0ca 100644
+--- a/t/plan_command.t
++++ b/t/plan_command.t
+@@ -290,7 +290,7 @@ for my $spec (
+ # Test all formatting characters.
+ my $local_pdt = $pdt->clone;
+ $local_pdt->set_time_zone('local');
+-$local_pdt->set( locale => $LC::TIME );
++$local_pdt->set_locale($LC::TIME);
+ 
+ my $formatter = $cmd->formatter;
+ for my $spec (
diff --git a/debian/patches/series b/debian/patches/series
index eae37e5..1182a84 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix-bad-whatis-man.patch
+Replace-DateTime-set-locale-with-DateTime-set_locale.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/sqitch.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to