diff --git a/.travis.yml b/.travis.yml index 3909d9929..b9b8e6565 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ jobs: - ./dev/prove -lr t - stage: 📈 Coverage - if: branch = master + if: branch = develop services: docker env: COVERAGE=1 before_install: @@ -61,7 +61,7 @@ jobs: - &postgres stage: 🐘 Postgres - if: branch = master + if: branch = develop env: POSTGRES=11 before_install: - source dev/linux-postgres @@ -90,7 +90,7 @@ jobs: # https://sqlite.org/chronology.html - &sqlite stage: 💡 SQLite - if: branch = master + if: branch = develop env: SQLITE=3.26.0 before_install: - source dev/linux-sqlite @@ -140,7 +140,7 @@ jobs: # https://hub.docker.com/_/mariadb - &mysql stage: 🐬 MySQL - if: branch = master + if: branch = develop services: docker env: MYSQL=mysql:8.0 before_install: @@ -170,7 +170,7 @@ jobs: # https://hub.docker.com/r/cjonesy/docker-vertica/tags - &vertica stage: 🔺 Vertica - if: branch = master + if: branch = develop env: VERTICA=9.1.1-0 before_install: - source dev/linux-vertica @@ -189,7 +189,7 @@ jobs: # https://hub.docker.com/r/exasol/docker-db/tags - &exasol stage: ☀️ Exasol - if: branch = master + if: branch = develop env: EXASOL=6.1.1-d1 before_install: - source dev/linux-exasol @@ -202,7 +202,7 @@ jobs: # https://hub.docker.com/r/jacobalberty/firebird/tags - &firebird stage: 🔥 Firebird - if: branch = master + if: branch = develop env: FIREBIRD=3.0 before_install: - source dev/linux-firebird diff --git a/Changes b/Changes index 00fc85302..286611731 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,68 @@ Revision history for Perl extension App::Sqitch +1.0.0 2019-06-04T12:56:22Z + - Fixed test failure due to a hard-coded system error that may be + localized on non-en-US hosts. Thanks to Slaven Rezić for the catch + (#427). + - Now require Test::MockModule 0.17 to silence a warning during testing. + Thanks to Slaven Rezić for the suggestion. + - Fixed an error when Sqitch is run with no arguments. Thanks to Henrik + Tudborg for the report (#428). + - Fixed missing dependency on IO::Pager in the distribution metadata. + - Removed use of File::HomeDir, thanks to a PR from Karen Etheridge + (#433). + - Updated the tagline from "Sane database change management" to "Sensible + database change management" out of sensitivity to those subject to + mental illness (#435). + - Removed double-quoting of SQLite commands on Windows, inadvertently + added by the workaround for Windows quoting in v0.9999. + - Fixed a Snowflake issue where Sqitch failed to recognize the proper + error code for a missing table and therefore an uninitialized registry. + Thanks to @lerouxt and @kulmam92 for the report and fix (#439). + - Added check for project initialization when no engine config can be + found. When run from a directory with no configuration, Sqitch now + reports that the project is not initialized instead of complaining + about a lack of engine config (#437). + - Documented Snowflake key pair authentication in + `sqitch-authentication`, as well as `$SNOWSQL_PRIVATE_KEY_PASSPHRASE` + in `sqitch-environment`. Thanks to Casey Largent for figuring it out + (#441). + - Added the German localization. Thanks to Thomas Iguchi for the pull + request (#451). + - Renamed the French localization from "fr" to "fr_FR", so that systems + will actually find it. + - Added the `ask_yes_no()` method as a replacement for `ask_y_n()`, which + is now deprecated. The new method expects localized responses from the + user when translations are provided. Defaults to the English "yes" and + "no" when no translation is available. Suggested by German translator + Thomas Iguchi (#449). + - Fixed a bug where only project without a URI was allowed in the + registry. Thanks to Conding-Brunna for the report (#450). + - Clarified the role of project URIs for uniqueness: They don't allow + multiple projects with the same name, but do prevent the deployment of + a project with the same name but different URI. + - Fixed an issue where target variables could not be found when a target + name was not lowercase. Thanks to @maximejanssens for the report + (#454). + - Now require Config::GitLike 1.15 or higher. + - Fixed the indentation of variables emitted by the `show` actions of the + `target` and `engine` commands, fixing a "Negative repeat count does + nothing" warning in the process. Thanks to @maximejanssens for the + report (#454). + - Fixed a Snowflake test failure when the current system username has a + space or other character requiring URI escaping. Thanks to Ralph + Andrade for the report (#463). + - Fixed an issue where a wayward newline in some versions of SQLite + prevented Sqitch from parsing the version. Thanks to Kivanc Yazan + for the report (#465) and the fix (#465)! + - Fixed an error when Sqitch was run on a system without a valid + username, such as some Docker environments. Thanks to Ferdinand Salis + for the report (#459)! + - When Sqitch finds the registry does not exist on PostgreSQL, it now + sends a warning to the PostgreSQL log reporting that it will initialize + the database. This is to reduce confusion for folks watching the + PostgreSQL error log while Sqitch runs (#314). + 0.9999 2019-02-01T15:29:40Z [Bug Fixes] - Fixed a test failure with the MySQL max limit value, mostly exhibited @@ -163,9 +226,9 @@ Revision history for Perl extension App::Sqitch directories. - Removed the deprecated core `--engine` option. The `init` command still supports it, while other commands are able to parse the engine name as - an argument — e.g., `sqitch deploy mysql` — or implicitly as part of a - target, as in `sqitch revert db:pg:tryme`. When Sqitch is unable to - determine the engine for a command, the error message no longer + an argument --- e.g., `sqitch deploy mysql` --- or implicitly as part + of a target, as in `sqitch revert db:pg:tryme`. When Sqitch is unable + to determine the engine for a command, the error message no longer mentions `--engine` and instead suggests specifying the engine via the target. This option never triggered an error, but demonstration of its use has been limited to `init` examples. diff --git a/README.md b/README.md index 81ccb4ce1..b528d1ab9 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ things: * No opinions - Sqitch is not integrated with any framework, ORM, or platform. Rather, it - is a standalone change management system with no opinions about your - database engine, application framework, or your development environment. + Sqitch is not tied to any framework, ORM, or platform. Rather, it is a + standalone change management system with no opinions about your database + engine, application framework, or development environment. * Native scripting @@ -34,19 +34,25 @@ things: changes from other Sqitch projects. This ensures proper order of execution, even when you've committed changes to your VCS out-of-order. -* No numbering +* Deployment integrity - Change deployment is managed by maintaining a plan file. As such, there is - no need to number your changes, although you can if you want. Sqitch - doesn't much care how you name your changes. + Sqitch manages changes and dependencies via a plan file, and employs a + [Merkle tree](https://en.wikipedia.org/wiki/Merkle_tree "Wikipedia: “Merkle tree”") + pattern similar to + [Git](https://stackoverflow.com/a/18589734/ "Stack Overflow: “What is the mathematical structure that represents a Git repo”") + and [Blockchain](https://medium.com/byzantine-studio/blockchain-fundamentals-what-is-a-merkle-tree-d44c529391d7 "Medium: “Blockchain Fundamentals #1: What is a Merkle Tree?”") + to ensure deployment integrity. + As such, there is no need to number your changes, although you can if you + want. Sqitch doesn't much care how you name your changes. * Iterative Development - Up until you tag and release your project, you can modify your change - deployment scripts as often as you like. They're not locked in just - because they've been committed to your VCS. This allows you to take an - iterative approach to developing your database schema. Or, better, you can - do test-driven database development. + Up until you [tag](https://sqitch.org/docs/manual/sqitch-tag/) and + [release](https://sqitch.org/docs/manual/sqitch-tag/) your project, you + can modify your change deployment scripts as often as you like. They're + not locked in just because they've been committed to your VCS. This allows + you to take an iterative approach to developing your database schema. Or, + better, you can do test-driven database development. Want to learn more? The best place to start is in the tutorials: diff --git a/bin/sqitch b/bin/sqitch index 85d83d16d..e14a01115 100755 --- a/bin/sqitch +++ b/bin/sqitch @@ -1,5 +1,6 @@ #!perl -w -CAS +# VERSION use POSIX qw(setlocale); BEGIN { if ($^O eq 'MSWin32') { diff --git a/dist.ini b/dist.ini index 690469578..5e05b36de 100644 --- a/dist.ini +++ b/dist.ini @@ -1,8 +1,8 @@ name = App-Sqitch license = MIT copyright_holder = "iovation Inc." +version = v1.0.0 -[VersionFromModule] [GatherDir] [PruneCruft] [ManifestSkip] @@ -17,6 +17,7 @@ copyright_holder = "iovation Inc." [ConfirmRelease] [UploadToCPAN] [RunExtraTests] +[OurPkgVersion] [CPANFile] filename = dist/cpanfile @@ -50,6 +51,7 @@ Template::Tiny = 0.11 DateTime = 1.04 DateTime::TimeZone = 0 Pod::Escapes = 1.04 +IO::Pager = 0.34 [Prereqs / RuntimeRecommends] Pod::Simple = 1.41 diff --git a/dist/sqitch.spec b/dist/sqitch.spec index eb8a82491..8cfa9e68c 100644 --- a/dist/sqitch.spec +++ b/dist/sqitch.spec @@ -1,7 +1,7 @@ Name: sqitch -Version: 0.9999 +Version: 1.0.0 Release: 1%{?dist} -Summary: Sane database change management +Summary: Sensible database change management License: MIT Group: Development/Libraries URL: https://sqitch.org/ @@ -14,7 +14,7 @@ BuildRequires: perl(Carp) BuildRequires: perl(Class::XSAccessor) >= 1.18 BuildRequires: perl(Clone) BuildRequires: perl(Config) -BuildRequires: perl(Config::GitLike) >= 1.11 +BuildRequires: perl(Config::GitLike) >= 1.15 BuildRequires: perl(constant) BuildRequires: perl(DateTime) >= 1.04 BuildRequires: perl(DateTime::TimeZone) @@ -26,7 +26,6 @@ BuildRequires: perl(Encode::Locale) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Copy) BuildRequires: perl(File::Find) -BuildRequires: perl(File::HomeDir) BuildRequires: perl(File::Path) BuildRequires: perl(File::Spec) BuildRequires: perl(File::Temp) @@ -67,7 +66,7 @@ BuildRequires: perl(Test::Dir) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::File) BuildRequires: perl(Test::File::Contents) >= 0.20 -BuildRequires: perl(Test::MockModule) >= 0.05 +BuildRequires: perl(Test::MockModule) >= 0.17 BuildRequires: perl(Test::More) >= 0.94 BuildRequires: perl(Test::NoWarnings) >= 0.083 BuildRequires: perl(Test::Warn) @@ -86,7 +85,7 @@ BuildRequires: perl(warnings) Requires: perl(Class::XSAccessor) >= 1.18 Requires: perl(Clone) Requires: perl(Config) -Requires: perl(Config::GitLike) >= 1.11 +Requires: perl(Config::GitLike) >= 1.15 Requires: perl(constant) Requires: perl(DateTime) >= 1.04 Requires: perl(DateTime::TimeZone) @@ -96,7 +95,6 @@ Requires: perl(Encode) Requires: perl(Encode::Locale) Requires: perl(File::Basename) Requires: perl(File::Copy) -Requires: perl(File::HomeDir) Requires: perl(File::Path) Requires: perl(File::Temp) Requires: perl(Getopt::Long) @@ -182,7 +180,7 @@ rm -rf $RPM_BUILD_ROOT %config %{etcdir}/* %package pg -Summary: Sane database change management for PostgreSQL +Summary: Sensible database change management for PostgreSQL Group: Development/Libraries Requires: sqitch >= %{version} Requires: postgresql >= 8.4.0 @@ -199,7 +197,7 @@ package bundles the Sqitch PostgreSQL support. # No additional files required. %package sqlite -Summary: Sane database change management for SQLite +Summary: Sensible database change management for SQLite Group: Development/Libraries Requires: sqitch >= %{version} Requires: sqlite @@ -216,7 +214,7 @@ package bundles the Sqitch SQLite support. # No additional files required. %package oracle -Summary: Sane database change management for Oracle +Summary: Sensible database change management for Oracle Group: Development/Libraries Requires: sqitch >= %{version} Requires: oracle-instantclient11.2-sqlplus @@ -233,7 +231,7 @@ package bundles the Sqitch Oracle support. # No additional files required. %package mysql -Summary: Sane database change management for MySQL +Summary: Sensible database change management for MySQL Group: Development/Libraries Requires: sqitch >= %{version} Requires: mysql >= 5.0.0 @@ -251,7 +249,7 @@ package bundles the Sqitch MySQL support. # No additional files required. %package firebird -Summary: Sane database change management for Firebird +Summary: Sensible database change management for Firebird Group: Development/Libraries Requires: sqitch >= %{version} Requires: firebird >= 2.5.0 @@ -271,7 +269,7 @@ package bundles the Sqitch Firebird support. # No additional files required. %package vertica -Summary: Sane database change management for Vertica +Summary: Sensible database change management for Vertica Group: Development/Libraries Requires: sqitch >= %{version} Requires: libverticaodbc.so @@ -289,7 +287,7 @@ Sqitch Vertica support. # No additional files required. %package snowflake -Summary: Sane database change management for Snowflake +Summary: Sensible database change management for Snowflake Group: Development/Libraries Requires: sqitch >= %{version} Requires: snowflake-odbc @@ -307,6 +305,13 @@ also be installed. # No additional files required. %changelog +* Tue Jun 4 2019 David E. Wheeler 1.0.0-1 +- Upgrade to v1.0.0. +- Config::GitLike now requires v1.15. +- Test::MockModule now requires v0.17. +- Removed File::HomeDir. +- Changed "sane" to "sensible" in the summary. + * Fri Feb 1 2019 David E. Wheeler 0.9999-1 - Upgrade to v0.9999. - Added requirement for IO::Pager 0.34 or higher. diff --git a/inc/Module/Build/Sqitch.pm b/inc/Module/Build/Sqitch.pm index c17dae250..bfe736366 100644 --- a/inc/Module/Build/Sqitch.pm +++ b/inc/Module/Build/Sqitch.pm @@ -33,7 +33,6 @@ sub new { $p{requires}{'Win32::Locale'} = 0; $p{requires}{'Win32::ShellQuote'} = 0; $p{requires}{'DateTime::TimeZone::Local::Win32'} = 0; - $p{build_requires}{'Config::GitLike'} = '1.15'; } if (eval { require Hash::Merge; 1 } && $Hash::Merge::VERSION eq '0.298') { warn join "\n", ( diff --git a/lib/App/Sqitch.pm b/lib/App/Sqitch.pm index 368519a23..bccd3d1a4 100644 --- a/lib/App/Sqitch.pm +++ b/lib/App/Sqitch.pm @@ -1,6 +1,6 @@ package App::Sqitch; -# ABSTRACT: Sane database change management +# ABSTRACT: Sensible database change management use 5.010; use strict; @@ -23,7 +23,7 @@ use IPC::System::Simple 1.17 qw(runx capturex $EXITVAL); use namespace::autoclean 0.16; use constant ISWIN => $^O eq 'MSWin32'; -our $VERSION = '0.9999'; +# VERSION BEGIN { # Force Locale::TextDomain to encode in UTF-8 and to decode all messages. @@ -83,7 +83,7 @@ has user_name => ( || $ENV{ SQITCH_ORIG_FULLNAME } || do { my $sysname = $self->sysuser || hurl user => __( - 'Cannot find your name; run sqitch config --user user.name "YOUR NAME"' + 'Cannot find your name; run sqitch config --user user.name "YOUR NAME"' ); if (ISWIN) { try { require Win32API::Net } || return $sysname; @@ -93,10 +93,9 @@ has user_name => ( return Encode::decode( locale => $info->{fullName} ); } require User::pwent; - my $name = (User::pwent::getpwnam($sysname)->gecos)[0] - || return $sysname; + my $name = User::pwent::getpwnam($sysname) || return $sysname; require Encode::Locale; - return Encode::decode( locale => $name ); + return Encode::decode( locale => ($name->gecos)[0] ); }; } ); @@ -189,7 +188,7 @@ sub go { my $sqitch = $class->new({ options => $opts, config => $config }); # 4. Find the command. - my $cmd = $sqitch->_find_cmd(\@args); + my $cmd = $class->_find_cmd(\@args); # 5. Instantiate the command object. my $command = $cmd->create({ @@ -292,7 +291,7 @@ sub _parse_core_opts { } sub _find_cmd { - my ( $self, $args ) = @_; + my ( $class, $args ) = @_; my (@tried, $prev); for (my $i = 0; $i <= $#$args; $i++) { my $arg = $args->[$i] or next; @@ -305,17 +304,17 @@ sub _find_cmd { next; } push @tried => $arg; - my $cmd = try { App::Sqitch::Command->class_for($self, $arg) } or next; + my $cmd = try { App::Sqitch::Command->class_for($class, $arg) } or next; splice @{ $args }, $i, 1; return $cmd; } # No valid command found. Report those we tried. - $self->vent(__x( + $class->vent(__x( '"{command}" is not a valid command', command => $_, )) for @tried; - $self->_pod2usage('sqitchcommands'); + $class->_pod2usage('sqitchcommands'); } sub _pod2usage { @@ -421,26 +420,37 @@ sub prompt { return $ans; } -sub ask_y_n { - my $self = shift; - my ($msg, $def) = @_; +sub ask_yes_no { + my ($self, @msg) = (shift, shift); + hurl 'ask_yes_no() called without a prompt message' unless $msg[0]; - hurl 'ask_y_n() called without a prompt message' unless $msg; - hurl 'Invalid default value: ask_y_n() default must be "y" or "n"' - if $def && $def !~ /^[yn]/i; + my $y = __p 'Confirm prompt answer yes', 'Yes'; + my $n = __p 'Confirm prompt answer no', 'No'; + push @msg => $_[0] ? $y : $n if @_; my $answer; my $i = 3; while ($i--) { - $answer = $self->prompt(@_); - return 1 if $answer =~ /^y/i; - return 0 if $answer =~ /^n/i; + $answer = $self->prompt(@msg); + return 1 if $y =~ /^\Q$answer/i; + return 0 if $n =~ /^\Q$answer/i; $self->emit(__ 'Please answer "y" or "n".'); } hurl io => __ 'No valid answer after 3 attempts; aborting'; } +sub ask_y_n { + my $self = shift; + $self->warn('The ask_y_n() method has been deprecated. Use ask_yes_no() instead.'); + return $self->ask_yes_no(@_) unless @_ > 1; + + my ($msg, $def) = @_; + hurl 'Invalid default value: ask_y_n() default must be "y" or "n"' + if $def && $def !~ /^[yn]/i; + return $self->ask_yes_no($msg, $def =~ /^y/i ? 1 : 0); +} + sub spool { my ($self, $fh) = (shift, shift); local $SIG{__WARN__} = sub { }; # Silence warning. @@ -596,7 +606,7 @@ __END__ =head1 Name -App::Sqitch - Sane database change management +App::Sqitch - Sensible database change management =head1 Synopsis @@ -856,17 +866,29 @@ value for the user to accept or to be used if Sqitch is running unattended. An exception will be thrown if there is no prompt message or if Sqitch is unattended and there is no default value. +=head3 C + + if ( $sqitch->ask_yes_no('Are you sure?', 1) ) { # do it! } + +Prompts the user with a "yes" or "no" question. Returns true if the user +replies in the affirmative and false if the reply is in the negative. If the +optional second argument is passed and true, the answer will default to the +affirmative. If the second argument is passed but false, the answer will +default to the negative. When a translation library is in use, the affirmative +and negative replies from the user should be localized variants of "yes" and +"no", and will be matched as such. If no translation library is in use, the +answers will default to the English "yes" and "no". + +If the user inputs an invalid value three times, an exception will be thrown. +An exception will also be thrown if there is no message. As with C, +an exception will be thrown if Sqitch is running unattended and there is no +default. + =head3 C - if ( $sqitch->ask_y_no('Are you sure?', 'y') ) { # do it! } +This method has been deprecated in favor of C and will be +removed in a future version of Sqitch. -Prompts the user with a "yes" or "no" question. Returns true for "yes" and -false for "no". Any answer that begins with case-insensitive "y" or "n" will -be accepted as valid. If the user inputs an invalid value three times, an -exception will be thrown. An exception will also be thrown if there is no -message or if the optional default value does not begin with "y" or "n". As -with C an exception will be thrown if Sqitch is running unattended -and there is no default. =head2 Constants diff --git a/lib/App/Sqitch/Command.pm b/lib/App/Sqitch/Command.pm index 75163534b..93a914195 100644 --- a/lib/App/Sqitch/Command.pm +++ b/lib/App/Sqitch/Command.pm @@ -11,7 +11,7 @@ use Hash::Merge 'merge'; use Moo; use App::Sqitch::Types qw(Sqitch Target); -our $VERSION = '0.9999'; +# VERSION use constant ENGINES => qw( pg diff --git a/lib/App/Sqitch/Command/add.pm b/lib/App/Sqitch/Command/add.pm index dbd7018c4..2ad78625a 100644 --- a/lib/App/Sqitch/Command/add.pm +++ b/lib/App/Sqitch/Command/add.pm @@ -18,7 +18,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; -our $VERSION = '0.9999'; +# VERSION has change_name => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/bundle.pm b/lib/App/Sqitch/Command/bundle.pm index 4025ba346..c63c7b24a 100644 --- a/lib/App/Sqitch/Command/bundle.pm +++ b/lib/App/Sqitch/Command/bundle.pm @@ -17,7 +17,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; -our $VERSION = '0.9999'; +# VERSION has from => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/checkout.pm b/lib/App/Sqitch/Command/checkout.pm index c0f2276db..f327cb1ff 100644 --- a/lib/App/Sqitch/Command/checkout.pm +++ b/lib/App/Sqitch/Command/checkout.pm @@ -16,7 +16,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::RevertDeployCommand'; -our $VERSION = '0.9999'; +# VERSION has client => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/config.pm b/lib/App/Sqitch/Command/config.pm index e53e279e0..26d10234b 100644 --- a/lib/App/Sqitch/Command/config.pm +++ b/lib/App/Sqitch/Command/config.pm @@ -15,7 +15,7 @@ use Type::Utils qw(enum); use namespace::autoclean; extends 'App::Sqitch::Command'; -our $VERSION = '0.9999'; +# VERSION has file => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/deploy.pm b/lib/App/Sqitch/Command/deploy.pm index a18a5d82d..852a6edb9 100644 --- a/lib/App/Sqitch/Command/deploy.pm +++ b/lib/App/Sqitch/Command/deploy.pm @@ -16,7 +16,7 @@ extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/engine.pm b/lib/App/Sqitch/Command/engine.pm index ef1de58fc..cae610c4d 100644 --- a/lib/App/Sqitch/Command/engine.pm +++ b/lib/App/Sqitch/Command/engine.pm @@ -18,7 +18,7 @@ use constant extra_target_keys => qw(target); extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::TargetConfigCommand'; -our $VERSION = '0.9999'; +# VERSION sub _chk_engine($) { my $engine = shift; @@ -222,11 +222,9 @@ sub show { $self->emit(' ', $label_for{verify}, $target->reworked_verify_dir); my $vars = $target->variables; if (%{ $vars }) { - my $len = max map { length } values %{ $vars }; - $len--; - $_ .= ': ' . ' ' x ($len - length $_) for keys %{ $vars }; + my $len = max map { length } keys %{ $vars }; $self->emit(' ', $label_for{variables}); - $self->emit(" $_:" . (' ' x ($len - length $_)) . $vars->{$_}) + $self->emit(" $_: " . (' ' x ($len - length $_)) . $vars->{$_}) for sort { lc $a cmp lc $b } keys %{ $vars }; } else { $self->emit(' ', $label_for{no_variables}); diff --git a/lib/App/Sqitch/Command/help.pm b/lib/App/Sqitch/Command/help.pm index 0438ad042..1456be362 100644 --- a/lib/App/Sqitch/Command/help.pm +++ b/lib/App/Sqitch/Command/help.pm @@ -11,7 +11,7 @@ use Pod::Find; use Moo; extends 'App::Sqitch::Command'; -our $VERSION = '0.9999'; +# VERSION has guide => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/init.pm b/lib/App/Sqitch/Command/init.pm index 01569997b..20860c5e4 100644 --- a/lib/App/Sqitch/Command/init.pm +++ b/lib/App/Sqitch/Command/init.pm @@ -17,7 +17,7 @@ use constant extra_target_keys => qw(engine target); extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::TargetConfigCommand'; -our $VERSION = '0.9999'; +# VERSION sub execute { my ( $self, $project ) = @_; diff --git a/lib/App/Sqitch/Command/log.pm b/lib/App/Sqitch/Command/log.pm index 32a7a6b9e..f6d6969b0 100644 --- a/lib/App/Sqitch/Command/log.pm +++ b/lib/App/Sqitch/Command/log.pm @@ -16,7 +16,7 @@ use Try::Tiny; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION my %FORMATS; $FORMATS{raw} = < ( is => 'ro', diff --git a/lib/App/Sqitch/Command/revert.pm b/lib/App/Sqitch/Command/revert.pm index 4e8eb9793..fbd12270a 100644 --- a/lib/App/Sqitch/Command/revert.pm +++ b/lib/App/Sqitch/Command/revert.pm @@ -15,7 +15,7 @@ extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/rework.pm b/lib/App/Sqitch/Command/rework.pm index ff10af5b4..d3f320110 100644 --- a/lib/App/Sqitch/Command/rework.pm +++ b/lib/App/Sqitch/Command/rework.pm @@ -14,7 +14,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; -our $VERSION = '0.9999'; +# VERSION has change_name => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/show.pm b/lib/App/Sqitch/Command/show.pm index 2d2bbd26d..66fb865be 100644 --- a/lib/App/Sqitch/Command/show.pm +++ b/lib/App/Sqitch/Command/show.pm @@ -13,7 +13,7 @@ use App::Sqitch::Types qw(Bool Str); extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/status.pm b/lib/App/Sqitch/Command/status.pm index 30bad8ba7..feaf155b2 100644 --- a/lib/App/Sqitch/Command/status.pm +++ b/lib/App/Sqitch/Command/status.pm @@ -16,7 +16,7 @@ extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target_name => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/tag.pm b/lib/App/Sqitch/Command/tag.pm index 2b2ad08d4..c4bb4300a 100644 --- a/lib/App/Sqitch/Command/tag.pm +++ b/lib/App/Sqitch/Command/tag.pm @@ -14,7 +14,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; -our $VERSION = '0.9999'; +# VERSION has tag_name => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/target.pm b/lib/App/Sqitch/Command/target.pm index abb59664f..0b72d8467 100644 --- a/lib/App/Sqitch/Command/target.pm +++ b/lib/App/Sqitch/Command/target.pm @@ -18,7 +18,7 @@ use constant extra_target_keys => qw(uri); extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::TargetConfigCommand'; -our $VERSION = '0.9999'; +# VERSION sub configure { # No config; target config is actually targets. @@ -213,11 +213,9 @@ sub show { $self->emit(' ', $label_for{verify}, $target->reworked_verify_dir); my $vars = $target->variables; if (%{ $vars }) { - my $len = max map { length } values %{ $vars }; - $len--; - $_ .= ': ' . ' ' x ($len - length $_) for keys %{ $vars }; + my $len = max map { length } keys %{ $vars }; $self->emit(' ', $label_for{variables}); - $self->emit(" $_:" . (' ' x ($len - length $_)) . $vars->{$_}) + $self->emit(" $_: " . (' ' x ($len - length $_)) . $vars->{$_}) for sort { lc $a cmp lc $b } keys %{ $vars }; } else { $self->emit(' ', $label_for{no_variables}); diff --git a/lib/App/Sqitch/Command/upgrade.pm b/lib/App/Sqitch/Command/upgrade.pm index c04c9c7d7..1117376ce 100644 --- a/lib/App/Sqitch/Command/upgrade.pm +++ b/lib/App/Sqitch/Command/upgrade.pm @@ -14,7 +14,7 @@ use namespace::autoclean; extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Command/verify.pm b/lib/App/Sqitch/Command/verify.pm index 7db42f9fe..6e08cc864 100644 --- a/lib/App/Sqitch/Command/verify.pm +++ b/lib/App/Sqitch/Command/verify.pm @@ -15,7 +15,7 @@ extends 'App::Sqitch::Command'; with 'App::Sqitch::Role::ContextCommand'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Config.pm b/lib/App/Sqitch/Config.pm index 16a80e115..02386f0f0 100644 --- a/lib/App/Sqitch/Config.pm +++ b/lib/App/Sqitch/Config.pm @@ -7,12 +7,12 @@ use warnings; use Path::Class; use Locale::TextDomain qw(App-Sqitch); use App::Sqitch::X qw(hurl); -use Config::GitLike 1.11; +use Config::GitLike 1.15; use utf8; extends 'Config::GitLike'; -our $VERSION = '0.9999'; +# VERSION has '+confname' => ( default => 'sqitch.conf' ); has '+encoding' => ( default => 'UTF-8' ); @@ -21,10 +21,8 @@ has '+encoding' => ( default => 'UTF-8' ); my $SYSTEM_DIR = undef; sub user_dir { - require File::HomeDir; - my $hd = File::HomeDir->my_home or hurl config => __( - "Could not determine home directory" - ); + my $hd = $^O eq 'MSWin32' && "$]" < '5.016' ? $ENV{HOME} || $ENV{USERPROFILE} : (glob('~'))[0]; + hurl config => __("Could not determine home directory") if not $hd; return dir $hd, '.sqitch'; } @@ -56,10 +54,19 @@ sub local_file { sub dir_file { shift->local_file } +# Section keys always have the top section lowercase, and subsections are +# left as-is. +sub _skey($) { + my $key = shift // return ''; + my ($sec, $sub, $name) = Config::GitLike::_split_key($key); + return lc $key unless $sec; + return lc($sec) . '.' . join '.', grep { defined } $sub, $name; +} + sub get_section { my ( $self, %p ) = @_; $self->load unless $self->is_loaded; - my $section = lc $p{section} // ''; + my $section = _skey $p{section}; my $data = $self->data; return { map { @@ -75,6 +82,24 @@ sub initial_key { return ref $key ? $key->[0] : $key; } +sub initialized { + my $self = shift; + $self->load unless $self->is_loaded; + return $self->{_initialized}; +} + +sub load_dirs { + my $self = shift; + local $self->{__loading_dirs} = 1; + $self->SUPER::load_dirs(@_); +} + +sub load_file { + my $self = shift; + $self->{_initialized} ||= $self->{__loading_dirs}; + $self->SUPER::load_file(@_); +} + 1; =head1 Name @@ -137,6 +162,14 @@ will be returned. An alias for C for use by the parent class. +=head3 C + + say 'Project not initialized' unless $config->initialized; + +Returns true if the project configuration file was found, and false if it was +not. Useful for detecting when a command has been run from a directory with no +Sqitch configuration. + =head3 C my $core = $config->get_section(section => 'core'); @@ -157,17 +190,6 @@ Given the lowercase key from the loaded data, this method returns it in its original case. This is like C, only in the case where there are multiple keys (for multivalue keys), only the first key is returned. -=begin comment - -Hide : It is defined in Config::GitLike 1.10, and only defined -here for older versions. - -=head3 C - -Only provided if not inherited from Config::GitLike. - -=end comment - =head1 See Also =over diff --git a/lib/App/Sqitch/DateTime.pm b/lib/App/Sqitch/DateTime.pm index 0efd2ec61..e36598ed2 100644 --- a/lib/App/Sqitch/DateTime.pm +++ b/lib/App/Sqitch/DateTime.pm @@ -11,7 +11,7 @@ use App::Sqitch::X qw(hurl); use List::Util qw(first); use constant ISWIN => $^O eq 'MSWin32'; -our $VERSION = '0.9999'; +# VERSION sub as_string_formats { return qw( diff --git a/lib/App/Sqitch/Engine.pm b/lib/App/Sqitch/Engine.pm index 34b25c3a5..10c3aaa53 100644 --- a/lib/App/Sqitch/Engine.pm +++ b/lib/App/Sqitch/Engine.pm @@ -14,7 +14,7 @@ use App::Sqitch::Types qw(Str Int Sqitch Plan Bool HashRef URI Maybe Target); use namespace::autoclean; use constant registry_release => '1.1'; -our $VERSION = '0.9999'; +# VERSION has sqitch => ( is => 'ro', @@ -300,11 +300,11 @@ sub revert { ident => 'revert:confirm', message => __ 'Nothing reverted', exitval => 1, - } unless $sqitch->ask_y_n(__x( + } unless $sqitch->ask_yes_no(__x( 'Revert changes to {change} from {destination}?', change => $change->format_name_with_tags, destination => $self->destination, - ), $self->prompt_accept ? 'Yes' : 'No' ); + ), $self->prompt_accept ); } } else { @@ -323,10 +323,10 @@ sub revert { ident => 'revert', message => __ 'Nothing reverted', exitval => 1, - } unless $sqitch->ask_y_n(__x( + } unless $sqitch->ask_yes_no(__x( 'Revert all changes from {destination}?', destination => $self->destination, - ), $self->prompt_accept ? 'Yes' : 'No' ); + ), $self->prompt_accept ); } } @@ -1862,8 +1862,8 @@ throws an exception Registers the current project plan in the registry database. The implementation should insert the project name and URI if they have not already -been inserted. If a project with the same name but different URI already -exists, an exception should be thrown. +been inserted. If a project already exists with the same name but different +URI, or a different name and the same URI, an exception should be thrown. =head3 C diff --git a/lib/App/Sqitch/Engine/exasol.pm b/lib/App/Sqitch/Engine/exasol.pm index 55927b497..7f73bd1ef 100644 --- a/lib/App/Sqitch/Engine/exasol.pm +++ b/lib/App/Sqitch/Engine/exasol.pm @@ -15,7 +15,7 @@ use namespace::autoclean; extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION sub _dt($) { require App::Sqitch::DateTime; diff --git a/lib/App/Sqitch/Engine/firebird.pm b/lib/App/Sqitch/Engine/firebird.pm index 5b1a198c1..3f0165ff5 100644 --- a/lib/App/Sqitch/Engine/firebird.pm +++ b/lib/App/Sqitch/Engine/firebird.pm @@ -18,7 +18,7 @@ use namespace::autoclean; extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION has registry_uri => ( is => 'ro', diff --git a/lib/App/Sqitch/Engine/mysql.pm b/lib/App/Sqitch/Engine/mysql.pm index 4033432d8..82b91e093 100644 --- a/lib/App/Sqitch/Engine/mysql.pm +++ b/lib/App/Sqitch/Engine/mysql.pm @@ -16,7 +16,7 @@ use List::MoreUtils qw(firstidx); extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION has uri => ( is => 'ro', diff --git a/lib/App/Sqitch/Engine/oracle.pm b/lib/App/Sqitch/Engine/oracle.pm index 0d814a859..ed17d6d03 100644 --- a/lib/App/Sqitch/Engine/oracle.pm +++ b/lib/App/Sqitch/Engine/oracle.pm @@ -15,7 +15,7 @@ use namespace::autoclean; extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION BEGIN { # We tell the Oracle connector which encoding to use. The last part of the diff --git a/lib/App/Sqitch/Engine/pg.pm b/lib/App/Sqitch/Engine/pg.pm index cf253c301..190f1f760 100644 --- a/lib/App/Sqitch/Engine/pg.pm +++ b/lib/App/Sqitch/Engine/pg.pm @@ -15,7 +15,7 @@ use namespace::autoclean; extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION sub destination { my $self = shift; @@ -380,7 +380,19 @@ sub _dt($) { } sub _no_table_error { - return $DBI::state && $DBI::state eq '42P01'; # undefined_table + return 0 unless $DBI::state && $DBI::state eq '42P01'; # undefined_table + my $dbh = shift->dbh; + my @msg = map { $dbh->quote($_) } ( + __ 'Sqitch registry not initialized', + __ 'Because the "changes" table does not exist, Sqitch will now initialize the database to create its registry tables.', + ); + $dbh->do(sprintf q{DO $$ + BEGIN + SET LOCAL client_min_messages = 'ERROR'; + RAISE WARNING USING ERRCODE = 'undefined_table', MESSAGE = %s, DETAIL = %s; + END; + $$}, @msg) if $dbh->{pg_server_version} >= 90000; + return 1; } sub _no_column_error { diff --git a/lib/App/Sqitch/Engine/snowflake.pm b/lib/App/Sqitch/Engine/snowflake.pm index dd2e2911b..53511ff6f 100644 --- a/lib/App/Sqitch/Engine/snowflake.pm +++ b/lib/App/Sqitch/Engine/snowflake.pm @@ -12,7 +12,7 @@ use App::Sqitch::Types qw(DBH ArrayRef HashRef URIDB Str); extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION sub key { 'snowflake' } sub name { 'Snowflake' } @@ -63,11 +63,11 @@ has _snowcfg => ( isa => HashRef, lazy => 1, default => sub { - require File::HomeDir; - my $hd = File::HomeDir->my_home or return {}; + my $hd = $^O eq 'MSWin32' && "$]" < '5.016' ? $ENV{HOME} || $ENV{USERPROFILE} : (glob('~'))[0]; + return {} if not $hd; my $fn = dir $hd, '.snowsql', 'config'; return {} unless -e $fn; - my $data = App::Sqitch::Config->load_file($fn); + my $data = App::Sqitch::Config->new->load_file($fn); my $cfg = {}; for my $k (keys %{ $data }) { # We only want the default connections config. No named config. @@ -112,6 +112,10 @@ sub _def_user { } sub _def_pass { $ENV{SNOWSQL_PWD} || shift->_snowcfg->{password} } +sub _def_acct { + return $ENV{SNOWSQL_ACCOUNT} || shift->_snowcfg->{accountname} + || hurl engine => __('Cannot determine Snowflake account name'); +} has account => ( is => 'ro', @@ -124,9 +128,7 @@ has account => ( $host =~ s/[.].+//; return $host; } - return $ENV{SNOWSQL_ACCOUNT} || $self->_snowcfg->{accountname} || hurl engine => __( - 'Cannot determine Snowflake account name' - ); + return $self->_def_acct; }, ); @@ -139,7 +141,7 @@ sub _host { } return $ENV{SNOWSQL_HOST} if $ENV{SNOWSQL_HOST}; return join '.', ( - ($ENV{SNOWSQL_ACCOUNT} || $self->_snowcfg->{accountname}), + $self->_def_acct, (grep { $_ } $ENV{SNOWSQL_REGION} || $self->_snowcfg->{region} || ()), 'snowflakecomputing.com', ); @@ -300,7 +302,7 @@ sub initialize { } sub _no_table_error { - return $DBI::state && $DBI::state eq '02000'; # ERRCODE_UNDEFINED_TABLE + return $DBI::state && $DBI::state eq '42S02'; # ERRCODE_UNDEFINED_TABLE } sub _no_column_error { diff --git a/lib/App/Sqitch/Engine/sqlite.pm b/lib/App/Sqitch/Engine/sqlite.pm index 544cb42e8..57831b4db 100644 --- a/lib/App/Sqitch/Engine/sqlite.pm +++ b/lib/App/Sqitch/Engine/sqlite.pm @@ -15,7 +15,7 @@ use namespace::autoclean; extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION has registry_uri => ( is => 'ro', @@ -115,7 +115,7 @@ has _sqlite3 => ( # Make sure we can use this version of SQLite. my @v = split /[.]/ => ( - split / / => $self->sqitch->probe( $self->client, '-version' ) + split / / => scalar $self->sqitch->capture( $self->client, '-version' ) )[0]; hurl sqlite => __x( 'Sqitch requires SQLite 3.3.9 or later; {client} is {version}', @@ -239,9 +239,7 @@ sub run_upgrade { sub _read { my $self = shift; - my $cmd = '.read ' . $self->dbh->quote(shift); - return $cmd unless App::Sqitch::ISWIN; - return $self->sqitch->quote_shell($cmd); + return '.read ' . $self->dbh->quote(shift); } 1; diff --git a/lib/App/Sqitch/Engine/vertica.pm b/lib/App/Sqitch/Engine/vertica.pm index bca3ea252..cb4a9dbbd 100644 --- a/lib/App/Sqitch/Engine/vertica.pm +++ b/lib/App/Sqitch/Engine/vertica.pm @@ -12,7 +12,7 @@ use App::Sqitch::Types qw(DBH ArrayRef); extends 'App::Sqitch::Engine'; -our $VERSION = '0.9999'; +# VERSION sub key { 'vertica' } sub name { 'Vertica' } diff --git a/lib/App/Sqitch/ItemFormatter.pm b/lib/App/Sqitch/ItemFormatter.pm index 89e22f541..196e2892c 100644 --- a/lib/App/Sqitch/ItemFormatter.pm +++ b/lib/App/Sqitch/ItemFormatter.pm @@ -24,7 +24,7 @@ BEGIN { $ENV{ANSI_COLORS_DISABLED} = 1 unless CAN_OUTPUT_COLOR; } -our $VERSION = '0.9999'; +# VERSION has abbrev => ( is => 'ro', diff --git a/lib/App/Sqitch/Plan.pm b/lib/App/Sqitch/Plan.pm index 2fdb21653..cb78cacfa 100644 --- a/lib/App/Sqitch/Plan.pm +++ b/lib/App/Sqitch/Plan.pm @@ -18,7 +18,7 @@ use Moo; use App::Sqitch::Types qw(Str Int HashRef ChangeList LineList Maybe Sqitch URI File Target); use constant SYNTAX_VERSION => '1.0.0'; -our $VERSION = '0.9999'; +# VERSION # Like [:punct:], but excluding _. Copied from perlrecharclass. my $punct = q{-!"#$%&'()*+,./:;<=>?@[\\]^`{|}~}; diff --git a/lib/App/Sqitch/Plan/Blank.pm b/lib/App/Sqitch/Plan/Blank.pm index 4dec8a106..3d1c54e75 100644 --- a/lib/App/Sqitch/Plan/Blank.pm +++ b/lib/App/Sqitch/Plan/Blank.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Moo; extends 'App::Sqitch::Plan::Line'; -our $VERSION = '0.9999'; +# VERSION has '+name' => ( default => '', required => 0 ); diff --git a/lib/App/Sqitch/Plan/Change.pm b/lib/App/Sqitch/Plan/Change.pm index 198759a9c..e4da42df1 100644 --- a/lib/App/Sqitch/Plan/Change.pm +++ b/lib/App/Sqitch/Plan/Change.pm @@ -10,7 +10,7 @@ use App::Sqitch::Plan::Depend; use Locale::TextDomain qw(App-Sqitch); extends 'App::Sqitch::Plan::Line'; -our $VERSION = '0.970'; +# VERSION has _requires => ( is => 'ro', diff --git a/lib/App/Sqitch/Plan/ChangeList.pm b/lib/App/Sqitch/Plan/ChangeList.pm index 5c7e579b3..6f001d4c5 100644 --- a/lib/App/Sqitch/Plan/ChangeList.pm +++ b/lib/App/Sqitch/Plan/ChangeList.pm @@ -7,7 +7,7 @@ use List::Util; use Locale::TextDomain qw(App-Sqitch); use App::Sqitch::X qw(hurl); -our $VERSION = '0.970'; +# VERSION sub new { my $class = shift; diff --git a/lib/App/Sqitch/Plan/Depend.pm b/lib/App/Sqitch/Plan/Depend.pm index dee5f21ec..de48af5ef 100644 --- a/lib/App/Sqitch/Plan/Depend.pm +++ b/lib/App/Sqitch/Plan/Depend.pm @@ -9,7 +9,7 @@ use App::Sqitch::X qw(hurl); use Locale::TextDomain qw(App-Sqitch); use namespace::autoclean; -our $VERSION = '0.9999'; +# VERSION has conflicts => ( is => 'ro', diff --git a/lib/App/Sqitch/Plan/Line.pm b/lib/App/Sqitch/Plan/Line.pm index 9b6ca8980..5f6165ce3 100644 --- a/lib/App/Sqitch/Plan/Line.pm +++ b/lib/App/Sqitch/Plan/Line.pm @@ -8,7 +8,7 @@ use App::Sqitch::Types qw(Str Plan); use App::Sqitch::X qw(hurl); use Locale::TextDomain qw(App-Sqitch); -our $VERSION = '0.9999'; +# VERSION has name => ( is => 'ro', diff --git a/lib/App/Sqitch/Plan/LineList.pm b/lib/App/Sqitch/Plan/LineList.pm index a509de16a..8ce80a9b3 100644 --- a/lib/App/Sqitch/Plan/LineList.pm +++ b/lib/App/Sqitch/Plan/LineList.pm @@ -4,7 +4,7 @@ use 5.010; use strict; use utf8; -our $VERSION = '0.9999'; +# VERSION sub new { my $class = shift; diff --git a/lib/App/Sqitch/Plan/Pragma.pm b/lib/App/Sqitch/Plan/Pragma.pm index 0d9ed367e..fe97b00ac 100644 --- a/lib/App/Sqitch/Plan/Pragma.pm +++ b/lib/App/Sqitch/Plan/Pragma.pm @@ -7,7 +7,7 @@ use Moo; use App::Sqitch::Types qw(Str); extends 'App::Sqitch::Plan::Line'; -our $VERSION = '0.9999'; +# VERSION has value => ( is => 'ro', diff --git a/lib/App/Sqitch/Plan/Tag.pm b/lib/App/Sqitch/Plan/Tag.pm index a46d28994..ebe1be5df 100644 --- a/lib/App/Sqitch/Plan/Tag.pm +++ b/lib/App/Sqitch/Plan/Tag.pm @@ -9,7 +9,7 @@ use Encode; extends 'App::Sqitch::Plan::Line'; -our $VERSION = '0.9999'; +# VERSION sub format_name { '@' . shift->name; diff --git a/lib/App/Sqitch/Role/ConnectingCommand.pm b/lib/App/Sqitch/Role/ConnectingCommand.pm index db1ece042..664fb0c13 100644 --- a/lib/App/Sqitch/Role/ConnectingCommand.pm +++ b/lib/App/Sqitch/Role/ConnectingCommand.pm @@ -7,7 +7,7 @@ use utf8; use Moo::Role; use App::Sqitch::Types qw(ArrayRef); -our $VERSION = '0.9999'; +# VERSION requires 'options'; requires 'configure'; diff --git a/lib/App/Sqitch/Role/ContextCommand.pm b/lib/App/Sqitch/Role/ContextCommand.pm index 5c0f2fee8..b2939bc8e 100644 --- a/lib/App/Sqitch/Role/ContextCommand.pm +++ b/lib/App/Sqitch/Role/ContextCommand.pm @@ -9,7 +9,7 @@ use Path::Class; use App::Sqitch::Types qw(ArrayRef); use Locale::TextDomain qw(App-Sqitch); # XXX Until deprecation removed below. -our $VERSION = '0.9999'; +# VERSION requires 'options'; requires 'configure'; diff --git a/lib/App/Sqitch/Role/DBIEngine.pm b/lib/App/Sqitch/Role/DBIEngine.pm index 02aa7f6bc..8f31601b7 100644 --- a/lib/App/Sqitch/Role/DBIEngine.pm +++ b/lib/App/Sqitch/Role/DBIEngine.pm @@ -11,7 +11,7 @@ use App::Sqitch::X qw(hurl); use Locale::TextDomain qw(App-Sqitch); use namespace::autoclean; -our $VERSION = '0.9999'; +# VERSION requires 'dbh'; requires 'sqitch'; @@ -342,7 +342,7 @@ sub register_project { ); if (@{ $res }) { - # A project with that name is already registreed. Compare URIs. + # A project with that name is already registered. Compare URIs. my $reg_uri = $res->[0]; if ( defined $uri && !defined $reg_uri ) { hurl engine => __x( @@ -367,20 +367,21 @@ sub register_project { # Both are undef, so cool. } } else { - # Does the URI already exist? - my $res = defined $uri ? $dbh->selectcol_arrayref( - 'SELECT project FROM projects WHERE uri = ?', - undef, $uri - ) : $dbh->selectcol_arrayref( - 'SELECT project FROM projects WHERE uri IS NULL', - ); + # No project with that name exists. Check to see if the URI does. + if (defined $uri) { + # Does the URI already exist? + my $res = $dbh->selectcol_arrayref( + 'SELECT project FROM projects WHERE uri = ?', + undef, $uri + ); - hurl engine => __x( - 'Cannot register "{project}" with URI {uri}: project "{reg_proj}" already using that URI', - project => $proj, - uri => $uri, - reg_proj => $res->[0], - ) if @{ $res }; + hurl engine => __x( + 'Cannot register "{project}" with URI {uri}: project "{reg_proj}" already using that URI', + project => $proj, + uri => $uri, + reg_proj => $res->[0], + ) if @{ $res }; + } # Insert the project. my $ts = $self->_ts_default; diff --git a/lib/App/Sqitch/Role/RevertDeployCommand.pm b/lib/App/Sqitch/Role/RevertDeployCommand.pm index 5dbafbfcf..6c1f62eb7 100644 --- a/lib/App/Sqitch/Role/RevertDeployCommand.pm +++ b/lib/App/Sqitch/Role/RevertDeployCommand.pm @@ -17,7 +17,7 @@ requires 'configure'; with 'App::Sqitch::Role::ContextCommand'; with 'App::Sqitch::Role::ConnectingCommand'; -our $VERSION = '0.9999'; +# VERSION has target => ( is => 'ro', diff --git a/lib/App/Sqitch/Role/TargetConfigCommand.pm b/lib/App/Sqitch/Role/TargetConfigCommand.pm index bb80af798..c24a51b2a 100644 --- a/lib/App/Sqitch/Role/TargetConfigCommand.pm +++ b/lib/App/Sqitch/Role/TargetConfigCommand.pm @@ -16,7 +16,7 @@ use File::Path qw(make_path); use namespace::autoclean; use constant extra_target_keys => (); -our $VERSION = '0.9999'; +# VERSION requires 'command'; requires 'options'; diff --git a/lib/App/Sqitch/Target.pm b/lib/App/Sqitch/Target.pm index 5862b35ad..d8ed1262d 100644 --- a/lib/App/Sqitch/Target.pm +++ b/lib/App/Sqitch/Target.pm @@ -11,7 +11,7 @@ use Path::Class qw(dir file); use URI::db; use namespace::autoclean; -our $VERSION = '0.9999'; +# VERSION has name => ( is => 'ro', @@ -246,11 +246,14 @@ sub BUILDARGS { } # No core target, look for an engine key. - $ekey = $config->get( - key => 'core.engine' - ) or hurl target => __( - 'No engine specified; specify via target or core.engine' - ); + $ekey = $config->get( key => 'core.engine' ) or do { + hurl target => __( + 'No engine specified; specify via target or core.engine' + ) if $config->initialized; + hurl target => __( + 'No project configuration found. Run the "init" command to initialize a project' + ); + }; $ekey =~ s/\s+$//; # Find the name in the engine config, or fall back on a simple URI. diff --git a/lib/App/Sqitch/Types.pm b/lib/App/Sqitch/Types.pm index 9dc43833e..8d3703ee3 100644 --- a/lib/App/Sqitch/Types.pm +++ b/lib/App/Sqitch/Types.pm @@ -32,7 +32,7 @@ use App::Sqitch::Config; use Scalar::Util qw(blessed); use List::Util qw(first); -our $VERSION = '0.9999'; +# VERSION # Inherit standard types. BEGIN { extends 'Types::Standard' }; diff --git a/lib/App/Sqitch/X.pm b/lib/App/Sqitch/X.pm index 63203c6b4..95c81cc34 100644 --- a/lib/App/Sqitch/X.pm +++ b/lib/App/Sqitch/X.pm @@ -9,7 +9,7 @@ use Throwable 0.200009; use Sub::Exporter -setup => [qw(hurl)]; use overload '""' => 'as_string'; -our $VERSION = '0.9999'; +# VERSION has message => ( is => 'ro', diff --git a/lib/sqitch-authentication.pod b/lib/sqitch-authentication.pod index 6b3c6c6a7..ac5aaabd0 100644 --- a/lib/sqitch-authentication.pod +++ b/lib/sqitch-authentication.pod @@ -154,7 +154,34 @@ other options, see the L +to create a key pair, then set the following variables in the F<~/.snowsql/config> +file: + + authenticator = SNOWFLAKE_JWT + private_key_path = "path/to/privatekey.p8" + +To connect, set the C<$SNOWSQL_PRIVATE_KEY_PASSPHRASE> environment variable to +the passphrase for the private key, and add these parameters to the query part +of your connection URI: + +=over + +=item * C + +=item * C + +=item * C + +=item * C + +=back + +For example: + + db:snowflake://movera@example.snowflakecomputing.com/flipr?Driver=Snowflake;warehouse=sqitch;authenticator=SNOWFLAKE_JWT;uid=movera;priv_key_file=path/to/privatekey.p8;priv_key_file_pwd=s0up3rs3cre7 =back diff --git a/lib/sqitch-environment.pod b/lib/sqitch-environment.pod index c11ce608b..58c14e837 100644 --- a/lib/sqitch-environment.pod +++ b/lib/sqitch-environment.pod @@ -291,6 +291,11 @@ C<$SQITCH_USERNAME> and the target URI username. The password to use to connect to the server. Superseded by C<$SQITCH_PASSWORD> and the target URI password. +=item C + +The passphrase for the private key file when using key pair authentication. +See L for details. + =item C The role to use when connecting to the server. Superseded by the target URI diff --git a/lib/sqitch-init.pod b/lib/sqitch-init.pod index 2de8a742d..3863b4880 100644 --- a/lib/sqitch-init.pod +++ b/lib/sqitch-init.pod @@ -25,7 +25,8 @@ things that are already there. Optional URI to associate with the project. If present, the URI will be written to the project plan and used for added uniqueness in hashed object -IDs. +IDs, as well as to prevent the deployment of another project with the same +name but different URI. =item C<--engine> @@ -213,19 +214,20 @@ what sorts of things are available to edit. =head1 Examples -Start a new Sqitch project using the SQLite engine, setting the top directory -for the project to F: +Start a new Sqitch project named "quack" using the SQLite engine, setting the +top directory for the project to F: - sqitch init --engine sqlite --top-dir sqlite + sqitch init --engine sqlite --top-dir sqlite quack -Start a new Sqitch project using the PostgreSQL engine, setting the top -directory to F, script extension to C, reworked directory to -C and a version-specific client: +Start a new Sqitch project named "bey" using the PostgreSQL engine, setting +the top directory to F, script extension to C, reworked +directory to C and a version-specific client: sqitch init --engine pg \ --top-dir postgres \ --client /opt/pgsql-9.1/bin/psql \ - --extension ddl --dir reworked=reworked + --extension ddl --dir reworked=reworked \ + bey =head1 See Also diff --git a/lib/sqitch-log.pod b/lib/sqitch-log.pod index 00c9fa1a2..b04fe3823 100644 --- a/lib/sqitch-log.pod +++ b/lib/sqitch-log.pod @@ -1,6 +1,6 @@ =head1 Name -sqitch-log - Show Sqitch change logs +sqitch-log - Show Sqitch change deployment logs =head1 Synopsis diff --git a/lib/sqitch-show.pod b/lib/sqitch-show.pod index 7467655a0..804e9015b 100644 --- a/lib/sqitch-show.pod +++ b/lib/sqitch-show.pod @@ -1,6 +1,6 @@ =head1 Name -sqitch-show - Show object information or change file contents +sqitch-show - Show object information or script contents =head1 Synopsis diff --git a/lib/sqitch.pod b/lib/sqitch.pod index 675edd4bf..5e9d07e4f 100644 --- a/lib/sqitch.pod +++ b/lib/sqitch.pod @@ -2,7 +2,7 @@ =head1 Name -sqitch - Sane database change management +sqitch - Sensible database change management =head1 Synopsis @@ -18,9 +18,9 @@ approaches? A few things: =item No opinions -Sqitch is not integrated with any framework, ORM, or platform. Rather, it is a +Sqitch is not tied to any framework, ORM, or platform. Rather, it is a standalone change management system with no opinions about your database -engine, application framework, or your development environment. +engine, application framework, or development environment. =item Native scripting @@ -46,19 +46,24 @@ Database changes may declare dependencies on other changes -- even on changes from other Sqitch projects. This ensures proper order of execution, even when you've committed changes to your VCS out-of-order. -=item No numbering +=item Deployment integrity + +Sqitch manages changes and dependencies via a plan file, and employs a +L pattern similar to +L and +L +to ensure deployment integrity. As such, there is no need to number your +changes, although you can if you want. Sqitch doesn't much care how you name +your changes. -Change deployment is managed by maintaining a plan file. As such, there is no -need to number your changes, although you can if you want. Sqitch doesn't much -care how you name your changes. =item Iterative Development -Up until you tag and release your project, you can modify your change -deployment scripts as often as you like. They're not locked in just because -they've been committed to your VCS. This allows you to take an iterative -approach to developing your database schema. Or, better, you can do -test-driven database development. +Up until you L and L your project, you +can modify your change deployment scripts as often as you like. They're not +locked in just because they've been committed to your VCS. This allows you to +take an iterative approach to developing your database schema. Or, better, you +can do test-driven database development. =begin comment diff --git a/lib/sqitchtutorial-exasol.pod b/lib/sqitchtutorial-exasol.pod index 7efda57a7..e6672fe7f 100644 --- a/lib/sqitchtutorial-exasol.pod +++ b/lib/sqitchtutorial-exasol.pod @@ -106,7 +106,8 @@ L. Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object -identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: > sqitch init flipr --uri https://github.com/sqitchers/sqitch-exasol-intro/ --engine exasol Created sqitch.conf diff --git a/lib/sqitchtutorial-firebird.pod b/lib/sqitchtutorial-firebird.pod index 0d2683c95..706bae267 100644 --- a/lib/sqitchtutorial-firebird.pod +++ b/lib/sqitchtutorial-firebird.pod @@ -55,7 +55,8 @@ L. Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object -identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: > sqitch init flipr --uri https://github.com/sqitchers/sqitch-firebird-intro/ --engine firebird Created sqitch.conf diff --git a/lib/sqitchtutorial-mysql.pod b/lib/sqitchtutorial-mysql.pod index f231f57f4..8959d0fe6 100644 --- a/lib/sqitchtutorial-mysql.pod +++ b/lib/sqitchtutorial-mysql.pod @@ -54,7 +54,8 @@ in these examples is L sqitch init flipr --uri https://github.com/sqitchers/sqitch-mysql-intro/ --engine mysql Created sqitch.conf diff --git a/lib/sqitchtutorial-oracle.pod b/lib/sqitchtutorial-oracle.pod index 393d95972..98d990b6b 100644 --- a/lib/sqitchtutorial-oracle.pod +++ b/lib/sqitchtutorial-oracle.pod @@ -97,8 +97,9 @@ Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: - > sqitch init flipr --uri https://github.com/sqitchers/sqitch-oracle-intro/ --engine oracle Created sqitch.conf Created sqitch.plan Created deploy/ diff --git a/lib/sqitchtutorial-snowflake.pod b/lib/sqitchtutorial-snowflake.pod index 72bb1c973..7117c5316 100644 --- a/lib/sqitchtutorial-snowflake.pod +++ b/lib/sqitchtutorial-snowflake.pod @@ -74,7 +74,8 @@ L. Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object -identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: > sqitch init flipr --uri https://github.com/sqitchers/sqitch-snowflake-intro/ --engine snowflake Created sqitch.conf diff --git a/lib/sqitchtutorial-sqlite.pod b/lib/sqitchtutorial-sqlite.pod index 6744a4dff..30fb1c13f 100644 --- a/lib/sqitchtutorial-sqlite.pod +++ b/lib/sqitchtutorial-sqlite.pod @@ -54,7 +54,8 @@ in these examples is L sqitch init flipr --uri https://github.com/sqitchers/sqitch-sqlite-intro/ --engine sqlite Created sqitch.conf diff --git a/lib/sqitchtutorial-vertica.pod b/lib/sqitchtutorial-vertica.pod index b6b4ab860..ef6ebdec3 100644 --- a/lib/sqitchtutorial-vertica.pod +++ b/lib/sqitchtutorial-vertica.pod @@ -103,7 +103,8 @@ L. Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object -identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: > sqitch init flipr --uri https://github.com/sqitchers/sqitch-vertica-intro/ --engine vertica Created sqitch.conf diff --git a/lib/sqitchtutorial.pod b/lib/sqitchtutorial.pod index 598539b1a..0eee1f19d 100644 --- a/lib/sqitchtutorial.pod +++ b/lib/sqitchtutorial.pod @@ -53,7 +53,8 @@ used in these examples is L Now that we have a repository, let's get started with Sqitch. Every Sqitch project must have a name associated with it, and, optionally, a unique URI. We recommend including the URI, as it increases the uniqueness of object -identifiers internally, so let's specify one when we initialize Sqitch: +identifiers internally, and will prevent the deployment of a different project +with the same name. So let's specify one when we initialize Sqitch: > sqitch init flipr --uri https://github.com/sqitchers/sqitch-intro/ --engine pg Created sqitch.conf diff --git a/po/App-Sqitch.pot b/po/App-Sqitch.pot index 2845543d9..829dc8da8 100644 --- a/po/App-Sqitch.pot +++ b/po/App-Sqitch.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: App-Sqitch 0.9999\n" +"Project-Id-Version: App-Sqitch v1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-25 10:09-0500\n" +"POT-Creation-Date: 2019-06-04 07:43-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,46 +22,56 @@ msgstr "" msgid "Cannot find your name; run sqitch config --user user.name \"YOUR NAME\"" msgstr "" -#: lib/App/Sqitch.pm:115 +#: lib/App/Sqitch.pm:114 msgid "" "Cannot infer your email address; run sqitch config --user user.email " "you@host.com" msgstr "" -#: lib/App/Sqitch.pm:281 +#: lib/App/Sqitch.pm:280 #, perl-brace-format msgid "Cannot change to directory {directory}: {error}" msgstr "" -#: lib/App/Sqitch.pm:315 lib/App/Sqitch/Command.pm:112 +#: lib/App/Sqitch.pm:314 lib/App/Sqitch/Command.pm:112 #, perl-brace-format msgid "\"{command}\" is not a valid command" msgstr "" -#: lib/App/Sqitch.pm:409 +#: lib/App/Sqitch.pm:408 msgid "" "Sqitch seems to be unattended and there is no default value for this question" msgstr "" -#: lib/App/Sqitch.pm:438 +#: lib/App/Sqitch.pm:427 +msgctxt "Confirm prompt answer yes" +msgid "Yes" +msgstr "" + +#: lib/App/Sqitch.pm:428 +msgctxt "Confirm prompt answer no" +msgid "No" +msgstr "" + +#: lib/App/Sqitch.pm:437 msgid "Please answer \"y\" or \"n\"." msgstr "" -#: lib/App/Sqitch.pm:441 +#: lib/App/Sqitch.pm:440 msgid "No valid answer after 3 attempts; aborting" msgstr "" -#: lib/App/Sqitch.pm:451 lib/App/Sqitch.pm:458 +#: lib/App/Sqitch.pm:461 lib/App/Sqitch.pm:468 #, perl-brace-format msgid "Cannot exec {command}: {error}" msgstr "" -#: lib/App/Sqitch.pm:474 +#: lib/App/Sqitch.pm:484 #, perl-brace-format msgid "Error closing pipe to {command}: {error}" msgstr "" -#: lib/App/Sqitch.pm:478 lib/App/Sqitch/Engine/oracle.pm:758 +#: lib/App/Sqitch.pm:488 lib/App/Sqitch/Engine/oracle.pm:758 #, perl-brace-format msgid "{command} unexpectedly returned exit value {exitval}" msgstr "" @@ -351,28 +361,28 @@ msgstr "" msgid "No Variables" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:255 +#: lib/App/Sqitch/Command/engine.pm:253 #, perl-brace-format msgid "Loading {file}" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:268 +#: lib/App/Sqitch/Command/engine.pm:266 #, perl-brace-format msgid "" "Deprecated {section} found in {file}; to remove it, run\n" " {sqitch} config --file {file} --remove-section {section}" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:280 +#: lib/App/Sqitch/Command/engine.pm:278 msgid " - No engines to update" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:287 +#: lib/App/Sqitch/Command/engine.pm:285 #, perl-brace-format msgid "Cannot update {file}. Please make it writable" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:343 +#: lib/App/Sqitch/Command/engine.pm:341 #, perl-brace-format msgid "" "Migrated {old} to {new}; To remove {old}, run\n" @@ -631,12 +641,12 @@ msgstr "" msgid "URI" msgstr "" -#: lib/App/Sqitch/Command/upgrade.pm:49 +#: lib/App/Sqitch/Command/upgrade.pm:48 #, perl-brace-format msgid "Upgrading registry {registry} to version {version}" msgstr "" -#: lib/App/Sqitch/Command/upgrade.pm:56 +#: lib/App/Sqitch/Command/upgrade.pm:55 #, perl-brace-format msgid "Registry {registry} is up-to-date at version {version}" msgstr "" @@ -646,7 +656,7 @@ msgstr "" msgid "Too many changes specified; verifying from \"{from}\" to \"{to}\"" msgstr "" -#: lib/App/Sqitch/Config.pm:26 +#: lib/App/Sqitch/Config.pm:25 msgid "Could not determine home directory" msgstr "" @@ -656,7 +666,7 @@ msgid "Unknown date format \"{format}\"" msgstr "" #: lib/App/Sqitch/Engine.pm:133 lib/App/Sqitch/Engine.pm:145 -#: lib/App/Sqitch/Target.pm:252 +#: lib/App/Sqitch/Target.pm:251 msgid "No engine specified; specify via target or core.engine" msgstr "" @@ -999,13 +1009,23 @@ msgstr "" msgid "Database name missing in URI \"{uri}\"" msgstr "" -#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:293 +#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:295 #: lib/App/Sqitch/Engine/vertica.pm:142 #, perl-brace-format msgid "Sqitch schema \"{schema}\" already exists" msgstr "" -#: lib/App/Sqitch/Engine/snowflake.pm:128 +#: lib/App/Sqitch/Engine/pg.pm:386 +msgid "Sqitch registry not initialized" +msgstr "" + +#: lib/App/Sqitch/Engine/pg.pm:387 +msgid "" +"Because the \"changes\" table does not exist, Sqitch will now initialize the " +"database to create its registry tables." +msgstr "" + +#: lib/App/Sqitch/Engine/snowflake.pm:117 msgid "Cannot determine Snowflake account name" msgstr "" @@ -1404,17 +1424,23 @@ msgid "" "Cannot initialize because project \"{project}\" already initialized in {file}" msgstr "" -#: lib/App/Sqitch/Target.pm:273 +#: lib/App/Sqitch/Target.pm:254 +msgid "" +"No project configuration found. Run the \"init\" command to initialize a " +"project" +msgstr "" + +#: lib/App/Sqitch/Target.pm:276 #, perl-brace-format msgid "Cannot find target \"{target}\"" msgstr "" -#: lib/App/Sqitch/Target.pm:279 +#: lib/App/Sqitch/Target.pm:282 #, perl-brace-format msgid "No URI associated with target \"{target}\"" msgstr "" -#: lib/App/Sqitch/Target.pm:288 +#: lib/App/Sqitch/Target.pm:291 #, perl-brace-format msgid "No engine specified by URI {uri}; URI must start with \"db:$engine:\"" msgstr "" diff --git a/po/de.po b/po/de_DE.po similarity index 62% rename from po/de.po rename to po/de_DE.po index 2231d48b0..9b5c04305 100644 --- a/po/de.po +++ b/po/de_DE.po @@ -1,104 +1,123 @@ # SOME DESCRIPTIVE TITLE. # This file is put in the public domain. -# FIRST AUTHOR , YEAR. +# Thomas Iguchi , 2019. # msgid "" msgstr "" "Project-Id-Version: Sqitch 0.932\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-25 10:09-0500\n" +"POT-Creation-Date: 2019-06-04 07:43-0400\n" "PO-Revision-Date: 2012-08-31 17:15-0700\n" -"Last-Translator: David Wheeler \n" +"Last-Translator: Thomas Iguchi \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Language: de\n" +"X-Source-Language: C\n" #: lib/App/Sqitch.pm:86 msgid "Cannot find your name; run sqitch config --user user.name \"YOUR NAME\"" msgstr "" +"Kann deinen Namen nicht finden. Führe den folgenden Befehl aus: sqitch " +"config --user user.name \"DEIN NAME\"" -#: lib/App/Sqitch.pm:115 +#: lib/App/Sqitch.pm:114 msgid "" "Cannot infer your email address; run sqitch config --user user.email " "you@host.com" msgstr "" +"Kann deine E-Mail-Adresse nicht finden. Führe den folgenden Befehl aus: " +"sqitch config --user user.email dein.name@domain.com" -#: lib/App/Sqitch.pm:281 +#: lib/App/Sqitch.pm:280 #, perl-brace-format msgid "Cannot change to directory {directory}: {error}" -msgstr "" +msgstr "Konnte nicht in das folgende Verzeichnis wechseln {directory}: {error}" -#: lib/App/Sqitch.pm:315 lib/App/Sqitch/Command.pm:112 +#: lib/App/Sqitch.pm:314 lib/App/Sqitch/Command.pm:112 #, perl-brace-format msgid "\"{command}\" is not a valid command" -msgstr "" +msgstr "\"{command}\" ist ein ungültiger Befehl" -#: lib/App/Sqitch.pm:409 +#: lib/App/Sqitch.pm:408 msgid "" "Sqitch seems to be unattended and there is no default value for this question" msgstr "" +"Sqitch scheint unbeaufsichtigt ausgeführt zu werden, und es steht leider " +"keine Standardantwort für diese Frage zur Verfügung" + +#: lib/App/Sqitch.pm:427 +msgctxt "Confirm prompt answer yes" +msgid "Yes" +msgstr "Ja" + +#: lib/App/Sqitch.pm:428 +msgctxt "Confirm prompt answer no" +msgid "No" +msgstr "Nein" -#: lib/App/Sqitch.pm:438 +#: lib/App/Sqitch.pm:437 msgid "Please answer \"y\" or \"n\"." -msgstr "" +msgstr "Bitte antworte mit \"j\" oder \"n\"" -#: lib/App/Sqitch.pm:441 +#: lib/App/Sqitch.pm:440 msgid "No valid answer after 3 attempts; aborting" -msgstr "" +msgstr "Drei ungültige Antworten in Folge. Breche ab" -#: lib/App/Sqitch.pm:451 lib/App/Sqitch.pm:458 +#: lib/App/Sqitch.pm:461 lib/App/Sqitch.pm:468 #, perl-brace-format msgid "Cannot exec {command}: {error}" -msgstr "" +msgstr "Konnte den Befehl {command} nicht ausführen: {error}" -#: lib/App/Sqitch.pm:474 +#: lib/App/Sqitch.pm:484 #, perl-brace-format msgid "Error closing pipe to {command}: {error}" -msgstr "" +msgstr "Fehler beim Schließen der Pipeline nach {command}: {error}" -#: lib/App/Sqitch.pm:478 lib/App/Sqitch/Engine/oracle.pm:758 +#: lib/App/Sqitch.pm:488 lib/App/Sqitch/Engine/oracle.pm:758 #, perl-brace-format msgid "{command} unexpectedly returned exit value {exitval}" -msgstr "" +msgstr "{command} brach unerwartet ab mit Rückgabewert {exitval}" #: lib/App/Sqitch/Command.pm:282 #, perl-brace-format msgid "Unknown argument \"{arg}\"" msgid_plural "Unknown arguments: {arg}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Unbekanntes Argument \"{arg}\"" +msgstr[1] "Unbekannte Argumente: \"{arg}\"" #: lib/App/Sqitch/Command.pm:294 msgid "Cannot specify both --all and engine, target, or plan arugments" msgstr "" +"Das Argument --all kann nicht mit engine, target oder plan kombiniert werden" #: lib/App/Sqitch/Command/add.pm:103 #, perl-brace-format msgid "Template {template} does not exist" -msgstr "" +msgstr "Vorlage {template} existiert nicht" #: lib/App/Sqitch/Command/add.pm:108 #, perl-brace-format msgid "Template {template} is not a file" -msgstr "" +msgstr "Vorlage {template} ist keine Datei" #: lib/App/Sqitch/Command/add.pm:146 #, perl-brace-format msgid "Cannot find {script} template" -msgstr "" +msgstr "Kann Vorlage {script} nicht finden" #: lib/App/Sqitch/Command/add.pm:225 #, perl-brace-format msgid "Directory \"{dir}\" does not exist" -msgstr "" +msgstr "Verzeichnis \"{dir}\" existert nicht" #: lib/App/Sqitch/Command/add.pm:230 #, perl-brace-format msgid "\"{dir}\" is not a directory" -msgstr "" +msgstr "\"{dir}\" ist kein Verzeichnis" #: lib/App/Sqitch/Command/add.pm:283 #, perl-brace-format @@ -106,26 +125,28 @@ msgid "" "Name \"{name}\" identifies a target; use \"--change {name}\" to use it for " "the change name" msgstr "" +"Der Name \"{name}\" bezeichnet ein Ziel. Verwende \"--change {name}\" um ihn " +"als Änderung anzugeben" #: lib/App/Sqitch/Command/add.pm:331 msgid "add" -msgstr "" +msgstr "hinzufügen" #: lib/App/Sqitch/Command/add.pm:349 #, perl-brace-format msgid "Added \"{change}\" to {file}" -msgstr "" +msgstr "\"{change}\" der Datei {file} hinzugefügt" #: lib/App/Sqitch/Command/add.pm:368 #, perl-brace-format msgid "Skipped {file}: already exists" -msgstr "" +msgstr "Überspringe {file}: existiert bereits" #: lib/App/Sqitch/Command/add.pm:379 lib/App/Sqitch/Command/bundle.pm:141 #: lib/App/Sqitch/Role/TargetConfigCommand.pm:253 #, perl-brace-format msgid "Error creating {path}: {error}" -msgstr "" +msgstr "Fehler beim Erstellen von {path}: {error}" #: lib/App/Sqitch/Command/add.pm:396 lib/App/Sqitch/Command/add.pm:426 #: lib/App/Sqitch/Plan.pm:134 lib/App/Sqitch/Plan.pm:591 @@ -133,18 +154,18 @@ msgstr "" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:317 #, perl-brace-format msgid "Cannot open {file}: {error}" -msgstr "" +msgstr "Kann {file} nicht öffnen: {error}" #: lib/App/Sqitch/Command/add.pm:404 #, perl-brace-format msgid "Error executing {template}: {error}" -msgstr "" +msgstr "Fehler beim Ausführen von {template}: {error}" #: lib/App/Sqitch/Command/add.pm:416 #: lib/App/Sqitch/Role/TargetConfigCommand.pm:328 #, perl-brace-format msgid "Error closing {file}: {error}" -msgstr "" +msgstr "Fehler beim Schließen von {file}: {error}" #: lib/App/Sqitch/Command/add.pm:420 lib/App/Sqitch/Command/bundle.pm:134 #: lib/App/Sqitch/Command/init.pm:203 @@ -152,236 +173,252 @@ msgstr "" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:333 #, perl-brace-format msgid "Created {file}" -msgstr "" +msgstr "{file} erstellt" #: lib/App/Sqitch/Command/bundle.pm:99 msgid "" "Use of --to or --from to bundle multiple targets is not recommended.\n" "Pass them as arguments after each target argument, instead." msgstr "" +"Es ist nicht empfehlenswert --to oder --from zum Kombinieren mehrerer Ziele " +"zu verwenden.\n" +"Stattdessen solltest du diese Argumente jedem einzelnen Ziel anhängen." #: lib/App/Sqitch/Command/bundle.pm:106 msgid "Cannot specify both --from or --to and change arguments" msgstr "" +"Die Argumente --from oder --to können nicht mit Änderungsargumenten " +"kombiniert werden" #: lib/App/Sqitch/Command/bundle.pm:111 #, perl-brace-format msgid "Bundling into {dir}" -msgstr "" +msgstr "Packe ins Verzeichnis {dir}" #: lib/App/Sqitch/Command/bundle.pm:152 #, perl-brace-format msgid "Cannot copy {file}: does not exist" -msgstr "" +msgstr "Kann {file} nicht kopieren: Datei existiert nicht" #: lib/App/Sqitch/Command/bundle.pm:165 #, perl-brace-format msgid "Copying {source} -> {dest}" -msgstr "" +msgstr "Kopiere {source} -> {dest}" #: lib/App/Sqitch/Command/bundle.pm:172 #, perl-brace-format msgid "Cannot copy \"{source}\" to \"{dest}\": {error}" -msgstr "" +msgstr "Kann nicht von \"{source}\" nach \"{dest}\" kopieren: {error}" #: lib/App/Sqitch/Command/bundle.pm:182 msgid "Writing config" -msgstr "" +msgstr "Schreibe Konfiguration" #: lib/App/Sqitch/Command/bundle.pm:193 msgid "Writing plan" -msgstr "" +msgstr "Schreibe Plan" #: lib/App/Sqitch/Command/bundle.pm:202 #, perl-brace-format msgid "Writing plan from {from} to {to}" -msgstr "" +msgstr "Schreibe Plan von {from} nach {to}" #: lib/App/Sqitch/Command/bundle.pm:222 lib/App/Sqitch/Command/bundle.pm:229 #: lib/App/Sqitch/Plan.pm:944 lib/App/Sqitch/Plan.pm:953 #, perl-brace-format msgid "Cannot find change {change}" -msgstr "" +msgstr "Kann Änderung {change} nicht finden" #: lib/App/Sqitch/Command/bundle.pm:233 msgid "Writing scripts" -msgstr "" +msgstr "Schreibe Skripte" #: lib/App/Sqitch/Command/checkout.pm:63 #, perl-brace-format msgid "Already on branch {branch}" -msgstr "" +msgstr "Bereits im Entwicklungszweig {branch}" #: lib/App/Sqitch/Command/checkout.pm:90 #, perl-brace-format msgid "Branch {branch} has no changes in common with current branch {current}" msgstr "" +"Entwicklungszweig {branch} hat keine Veränderungen mit dem aktuellen " +"Entwicklungszweig {current} gemein" #: lib/App/Sqitch/Command/checkout.pm:96 #, perl-brace-format msgid "Last change before the branches diverged: {last_change}" msgstr "" +"Letzte Änderung bevor Entwicklungszweige voneinander abweichen: {last_change}" #: lib/App/Sqitch/Command/config.pm:129 #, perl-brace-format msgid "Unknown config action: {action}" -msgstr "" +msgstr "Unbekannte Konfigurationsaktion: {action}" #: lib/App/Sqitch/Command/config.pm:149 #, perl-brace-format msgid "More then one value for the key \"{key}\"" -msgstr "" +msgstr "Mehr als ein Wert für Schlüssel \"{key}\"" #: lib/App/Sqitch/Command/config.pm:261 msgid "Cannot overwrite multiple values with a single value" -msgstr "" +msgstr "Kann nicht mehrere Werte mit einem einzigen Wert überschreiben" #: lib/App/Sqitch/Command/config.pm:291 msgid "Cannot unset key with multiple values" -msgstr "" +msgstr "Kann nicht Schlüssel mit mehreren Werten entfernen" #: lib/App/Sqitch/Command/config.pm:344 lib/App/Sqitch/Command/config.pm:361 msgid "No such section!" -msgstr "" +msgstr "Sektion existiert nicht!" #: lib/App/Sqitch/Command/deploy.pm:110 lib/App/Sqitch/Command/log.pm:212 #: lib/App/Sqitch/Command/rebase.pm:55 lib/App/Sqitch/Command/revert.pm:111 #: lib/App/Sqitch/Command/status.pm:110 lib/App/Sqitch/Command/verify.pm:89 #, perl-brace-format msgid "Too many targets specified; connecting to {target}" -msgstr "" +msgstr "Zu viele Ziele angegeben. Verbinde mit {target}" #: lib/App/Sqitch/Command/deploy.pm:117 #, perl-brace-format msgid "Too many changes specified; deploying to \"{change}\"" -msgstr "" +msgstr "Zu viele Änderungen angegeben. Wende \"{change}\" an" #: lib/App/Sqitch/Command/engine.pm:26 lib/App/Sqitch/Command/engine.pm:156 #: lib/App/Sqitch/Role/TargetConfigCommand.pm:121 #, perl-brace-format msgid "Unknown engine \"{engine}\"" -msgstr "" +msgstr "Unbekannte Engine \"{engine}\"" #: lib/App/Sqitch/Command/engine.pm:40 lib/App/Sqitch/Command/target.pm:33 #, perl-brace-format msgid "Unknown action \"{action}\"" -msgstr "" +msgstr "Unbekannte Aktion \"{action}\"" #: lib/App/Sqitch/Command/engine.pm:71 #, perl-brace-format msgid "Cannot assign URI using engine \"{new}\" to engine \"{old}\"" msgstr "" +"URI kann nicht mittlels Engine \"{new}\" der Engine \"{old}\" zugewiesen " +"werden" #: lib/App/Sqitch/Command/engine.pm:81 lib/App/Sqitch/Command/target.pm:148 #, perl-brace-format msgid "Unknown target \"{target}\"" -msgstr "" +msgstr "Unbekanntes Ziel \"{target}\"" #: lib/App/Sqitch/Command/engine.pm:95 #, perl-brace-format msgid "Engine \"{engine}\" already exists" -msgstr "" +msgstr "Engine \"{engine}\" existiert bereits" #: lib/App/Sqitch/Command/engine.pm:126 #, perl-brace-format msgid "Missing Engine \"{engine}\"; use \"{command}\" to add it" msgstr "" +"Fehlende Engine \"{engine}\"; verwende \"{command}\" um sie hinzuzufügen" #: lib/App/Sqitch/Command/engine.pm:133 -#, fuzzy msgid "Cannot unset an engine target" -msgstr "Cannot find {script} template" +msgstr "Ein Engine-Ziel kann nicht entfernt werden" #: lib/App/Sqitch/Command/engine.pm:179 msgid "Target" -msgstr "" +msgstr "Ziel" #: lib/App/Sqitch/Command/engine.pm:180 lib/App/Sqitch/Command/target.pm:172 msgid "Registry" -msgstr "" +msgstr "Registry" #: lib/App/Sqitch/Command/engine.pm:181 lib/App/Sqitch/Command/target.pm:173 msgid "Client" -msgstr "" +msgstr "Client" #: lib/App/Sqitch/Command/engine.pm:182 lib/App/Sqitch/Command/target.pm:174 msgid "Top Directory" -msgstr "" +msgstr "Topverzeichnis" #: lib/App/Sqitch/Command/engine.pm:183 lib/App/Sqitch/Command/target.pm:175 msgid "Plan File" -msgstr "" +msgstr "Plandatei" #: lib/App/Sqitch/Command/engine.pm:184 lib/App/Sqitch/Command/target.pm:176 msgid "Extension" -msgstr "" +msgstr "Erweiterung" #: lib/App/Sqitch/Command/engine.pm:185 lib/App/Sqitch/Command/target.pm:177 #: lib/App/Sqitch/ItemFormatter.pm:62 msgid "Revert" -msgstr "" +msgstr "Rückgängig machen" #: lib/App/Sqitch/Command/engine.pm:186 lib/App/Sqitch/Command/target.pm:178 #: lib/App/Sqitch/ItemFormatter.pm:61 msgid "Deploy" -msgstr "" +msgstr "Anwenden" #: lib/App/Sqitch/Command/engine.pm:187 lib/App/Sqitch/Command/target.pm:179 msgid "Verify" -msgstr "" +msgstr "Verifizieren" #: lib/App/Sqitch/Command/engine.pm:188 lib/App/Sqitch/Command/target.pm:180 msgid "Reworked" -msgstr "" +msgstr "Überarbeitet" #: lib/App/Sqitch/Command/engine.pm:195 lib/App/Sqitch/Command/target.pm:187 msgid "Script Directories" -msgstr "" +msgstr "Skriptverzeichnisse" #: lib/App/Sqitch/Command/engine.pm:196 lib/App/Sqitch/Command/target.pm:188 msgid "Reworked Script Directories" -msgstr "" +msgstr "Überarbeitete Skriptverzeichnisse" #: lib/App/Sqitch/Command/engine.pm:197 lib/App/Sqitch/Command/target.pm:189 msgid "Variables" -msgstr "" +msgstr "Variablen" #: lib/App/Sqitch/Command/engine.pm:198 lib/App/Sqitch/Command/target.pm:190 msgid "No Variables" -msgstr "" +msgstr "Keine Variablen" -#: lib/App/Sqitch/Command/engine.pm:255 +#: lib/App/Sqitch/Command/engine.pm:253 #, perl-brace-format msgid "Loading {file}" -msgstr "" +msgstr "Lade {file}" -#: lib/App/Sqitch/Command/engine.pm:268 +#: lib/App/Sqitch/Command/engine.pm:266 #, perl-brace-format msgid "" "Deprecated {section} found in {file}; to remove it, run\n" " {sqitch} config --file {file} --remove-section {section}" msgstr "" +"Veraltete Sektion {section} gefunden in {file}. Zum Entfernen führe den " +"folgenden Befehl aus:\n" +" {sqitch} config --file {file} --remove-section {section}" -#: lib/App/Sqitch/Command/engine.pm:280 +#: lib/App/Sqitch/Command/engine.pm:278 msgid " - No engines to update" -msgstr "" +msgstr " - Keine Engines zum Aktualisieren verfügbar" -#: lib/App/Sqitch/Command/engine.pm:287 +#: lib/App/Sqitch/Command/engine.pm:285 #, perl-brace-format msgid "Cannot update {file}. Please make it writable" -msgstr "" +msgstr "Kann {file} nicht aktualisieren. Bitte mache die Datei schreibbar" -#: lib/App/Sqitch/Command/engine.pm:343 +#: lib/App/Sqitch/Command/engine.pm:341 #, perl-brace-format msgid "" "Migrated {old} to {new}; To remove {old}, run\n" " {sqitch} config --file {file} --remove-section {old}" msgstr "" +"{old} nach {new} migriert. Um {old} zu entfernen, führe bitte den folgenden " +"Befehl aus:\n" +" {sqitch} config --file {file} --remove-section {old}" #: lib/App/Sqitch/Command/help.pm:46 #, perl-brace-format msgid "No manual entry for {command}" -msgstr "" +msgstr "Kein Hilfeeintrag für {command} verfügbar" #: lib/App/Sqitch/Command/init.pm:50 lib/App/Sqitch/Plan.pm:237 #, perl-brace-format @@ -390,219 +427,228 @@ msgid "" "punctuation, contain \"@\", \":\", \"#\", or blanks, or end in punctuation " "or digits following punctuation" msgstr "" +"Ungültiger Projektname \"{project}\". Projektnamen dürfen nicht mit " +"Satzzeichen beginnen, die Zeichen \"@\", \":\", \"#\" oder Leerzeichen " +"beinhalten oder in Satzzeichen enden, wenn diese wiederum Ziffern oder " +"anderen Satzzeichen folgen" #: lib/App/Sqitch/Command/log.pm:183 #, perl-brace-format msgid "Unknown log format \"{format}\"" -msgstr "" +msgstr "Unbekanntes Log-Format \"{format}\"" #: lib/App/Sqitch/Command/log.pm:222 lib/App/Sqitch/Command/status.pm:131 #, perl-brace-format msgid "Database {db} has not been initialized for Sqitch" -msgstr "" +msgstr "Datenbank {db} wurde noch nicht für Sqitch initialisiert" #: lib/App/Sqitch/Command/log.pm:233 #, perl-brace-format msgid "No events logged for {db}" -msgstr "" +msgstr "Keine Ereignisse für Datenbank {db} aufgezeichnet" #: lib/App/Sqitch/Command/log.pm:252 lib/App/Sqitch/Command/status.pm:119 #, perl-brace-format msgid "On database {db}" -msgstr "" +msgstr "Auf Datenbank {db}" #: lib/App/Sqitch/Command/plan.pm:170 #, perl-brace-format msgid "Unknown plan format \"{format}\"" -msgstr "" +msgstr "Unbekanntes Planformat \"{format}\"" #: lib/App/Sqitch/Command/plan.pm:199 lib/App/Sqitch/Command/upgrade.pm:40 #, perl-brace-format msgid "Too many targets specified; using {target}" -msgstr "" +msgstr "Zu viele Ziele angegeben. Verwende {target}" #: lib/App/Sqitch/Command/plan.pm:209 #, perl-brace-format msgid "No changes in {file}" -msgstr "" +msgstr "Keine Änderungen in {file}" #: lib/App/Sqitch/Command/plan.pm:228 #, perl-brace-format msgid "Project: {project}" -msgstr "" +msgstr "Projekt: {project}" #: lib/App/Sqitch/Command/plan.pm:229 #, perl-brace-format msgid "File: {file}" -msgstr "" +msgstr "Datei: {file}" #: lib/App/Sqitch/Command/rebase.pm:63 #, perl-brace-format msgid "Too many changes specified; rebasing onto \"{onto}\" up to \"{upto}\"" msgstr "" +"Zu viele Änderungen angegeben. Rebase auf \"{onto}\" bis hin \"{upto}\"" #: lib/App/Sqitch/Command/revert.pm:118 #, perl-brace-format msgid "Too many changes specified; reverting to \"{change}\"" -msgstr "" +msgstr "Zu viele Änderungen angegeben. Setze zurück nach \"{change}\"" #: lib/App/Sqitch/Command/rework.pm:153 msgid "rework" -msgstr "" +msgstr "überarbeite" #: lib/App/Sqitch/Command/rework.pm:171 #, perl-brace-format msgid "Added \"{change}\" to {file}." -msgstr "" +msgstr "\"{change}\" zu \"{file}\" hinzugefügt." #: lib/App/Sqitch/Command/rework.pm:179 msgid "Modify this file as appropriate:" msgid_plural "Modify these files as appropriate:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Nimm die nötigen Änderungen an dieser Datei vor:" +msgstr[1] "Nimm die nötigen Änderungen an diesen Dateien vor:" #: lib/App/Sqitch/Command/rework.pm:199 #, perl-brace-format msgid "Skipped {dest}: {src} does not exist" -msgstr "" +msgstr "{dest} übersprungen: {src} existiert nicht" #: lib/App/Sqitch/Command/rework.pm:208 #, perl-brace-format msgid "Cannot copy {src} to {dest}: {error}" -msgstr "" +msgstr "Kann {src} nicht nach {dest} kopieren: {error}" #: lib/App/Sqitch/Command/rework.pm:215 #, perl-brace-format msgid "Copied {src} to {dest}" -msgstr "" +msgstr "{src} nach {dest} kopiert" #: lib/App/Sqitch/Command/show.pm:72 lib/App/Sqitch/Plan/ChangeList.pm:72 #, perl-brace-format msgid "Unknown tag \"{tag}\"" -msgstr "" +msgstr "Unbekanntes Tag \"{tag}\"" #: lib/App/Sqitch/Command/show.pm:80 #, perl-brace-format msgid "Unknown object type \"{type}" -msgstr "" +msgstr "Unbekannter Objekttyp \"{type}\"" #: lib/App/Sqitch/Command/show.pm:88 #, perl-brace-format msgid "Unknown change \"{change}\"" -msgstr "" +msgstr "Unbekannte Änderung \"{change}\"" #: lib/App/Sqitch/Command/show.pm:103 #, perl-brace-format msgid "File \"{path}\" does not exist" -msgstr "" +msgstr "Datei \"{path}\" existiert nicht" #: lib/App/Sqitch/Command/show.pm:105 #, perl-brace-format msgid "\"{path}\" is not a file" -msgstr "" +msgstr "\"{path}\" ist keine Datei" #: lib/App/Sqitch/Command/status.pm:77 msgid "Database not initialized for Sqitch" -msgstr "" +msgstr "Datenbank nicht für Sqitch initialisiert" #: lib/App/Sqitch/Command/status.pm:80 msgid "No projects registered" -msgstr "" +msgstr "Keine Projekte registriert" #: lib/App/Sqitch/Command/status.pm:82 #, perl-brace-format msgid "Use --project to select which project to query: {projects}" -msgstr "" +msgstr "Verwende --project um ein bestimmtes Projekt anzugeben: {projects}" #: lib/App/Sqitch/Command/status.pm:83 lib/App/Sqitch/Command/status.pm:206 #: lib/App/Sqitch/Role/TargetConfigCommand.pm:99 msgid ", " -msgstr "" +msgstr ", " #: lib/App/Sqitch/Command/status.pm:138 lib/App/Sqitch/Engine.pm:364 msgid "No changes deployed" -msgstr "" +msgstr "Keine Änderungen angewendet" #: lib/App/Sqitch/Command/status.pm:156 #, perl-brace-format msgid "Status unknown. Use --plan-file to assess \"{project}\" status" msgstr "" +"Unbekannter Status. Benutze --plan-file um Status für \"{project}\" zu " +"überprüfen" #: lib/App/Sqitch/Command/status.pm:190 #, perl-brace-format msgid "Project: {project}" -msgstr "" +msgstr "Projekt: {project}" #: lib/App/Sqitch/Command/status.pm:194 #, perl-brace-format msgid "Change: {change_id}" -msgstr "" +msgstr "Änderung: {change_id}" #: lib/App/Sqitch/Command/status.pm:198 #, perl-brace-format msgid "Name: {change}" -msgstr "" +msgstr "Name: {change}" #: lib/App/Sqitch/Command/status.pm:203 #, perl-brace-format msgid "Tag: {tags}" msgid_plural "Tags: {tags}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Tag: {tags}" +msgstr[1] "Tags: {tags}" #: lib/App/Sqitch/Command/status.pm:211 #, perl-brace-format msgid "Deployed: {date}" -msgstr "" +msgstr "Angewendet: {date}" #: lib/App/Sqitch/Command/status.pm:217 #, perl-brace-format msgid "By: {name} <{email}>" -msgstr "" +msgstr "Von: {name} <{email}>" #: lib/App/Sqitch/Command/status.pm:240 msgid "Change:" msgid_plural "Changes:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Änderung:" +msgstr[1] "Änderungen:" #: lib/App/Sqitch/Command/status.pm:269 msgid "Tags: None." -msgstr "" +msgstr "Tags: keine." #: lib/App/Sqitch/Command/status.pm:273 msgid "Tag:" msgid_plural "Tags:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Tag:" +msgstr[1] "Tags:" #: lib/App/Sqitch/Command/status.pm:299 #, perl-brace-format msgid "Cannot find this change in {file}" -msgstr "" +msgstr "Kann diese Änderungen nicht in {file} finden" #: lib/App/Sqitch/Command/status.pm:302 msgid "Make sure you are connected to the proper database for this project." msgstr "" +"Bitte stelle sicher dass du mit der korrekten Datenbank für dieses Projekt " +"verbunden bist." #: lib/App/Sqitch/Command/status.pm:308 lib/App/Sqitch/Engine.pm:200 msgid "Nothing to deploy (up-to-date)" -msgstr "" +msgstr "Nichts anzuwenden (auf neuestem Stand)" #: lib/App/Sqitch/Command/status.pm:311 lib/App/Sqitch/Engine.pm:510 msgid "Undeployed change:" msgid_plural "Undeployed changes:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Rückgängig gemachte Änderung:" +msgstr[1] "Rückgängig gemachte Änderungen:" #: lib/App/Sqitch/Command/tag.pm:80 msgid "tag" -msgstr "" +msgstr "Tag" #: lib/App/Sqitch/Command/tag.pm:88 -#, fuzzy, perl-brace-format +#, perl-brace-format msgid "Tagged \"{change}\" with {tag} in {file}" -msgstr "Cannot find {script} template" +msgstr "Markiere \"{change}\" mit {tag} in {file}" #: lib/App/Sqitch/Command/tag.pm:100 #, perl-brace-format @@ -610,240 +656,249 @@ msgid "" "Name \"{name}\" identifies a target; use \"--tag {name}\" to use it for the " "tag name" msgstr "" +"Name \"{name}\" bezeichnet ein Ziel. Bitte verwende \"--tag {name}\" um ihn " +"als Tag-Namen zu verwenden" #: lib/App/Sqitch/Command/target.pm:62 #, perl-brace-format msgid "Target \"{target}\" already exists" -msgstr "" +msgstr "Ziel \"{target}\" existiert bereits" #: lib/App/Sqitch/Command/target.pm:90 #, perl-brace-format msgid "Missing Target \"{target}\"; use \"{command}\" to add it" msgstr "" +"Ziel \"{target}\" existiert noch nicht. Verwende \"{command}\" um es " +"hinzuzufügen" #: lib/App/Sqitch/Command/target.pm:106 lib/App/Sqitch/Command/target.pm:119 #, perl-brace-format msgid "Cannot rename target \"{target}\" because it's referenced by: {engines}" msgstr "" +"Kann Ziel \"{target}\" nicht umbenennen, da es von den folgenden Engines " +"referenziert wird: {engines}" #: lib/App/Sqitch/Command/target.pm:171 msgid "URI" -msgstr "" +msgstr "URI" -#: lib/App/Sqitch/Command/upgrade.pm:49 +#: lib/App/Sqitch/Command/upgrade.pm:48 #, perl-brace-format msgid "Upgrading registry {registry} to version {version}" -msgstr "" +msgstr "Aktualisiere Registry {registry} nach Version {version}" -#: lib/App/Sqitch/Command/upgrade.pm:56 +#: lib/App/Sqitch/Command/upgrade.pm:55 #, perl-brace-format msgid "Registry {registry} is up-to-date at version {version}" -msgstr "" +msgstr "Registry {registry} auf Version {version} aktualisiert" #: lib/App/Sqitch/Command/verify.pm:97 #, perl-brace-format msgid "Too many changes specified; verifying from \"{from}\" to \"{to}\"" msgstr "" +"Zu viele Änderungen angegeben. Verifiziere von \"{from}\" nach \"{to}\"" -#: lib/App/Sqitch/Config.pm:26 +#: lib/App/Sqitch/Config.pm:25 msgid "Could not determine home directory" -msgstr "" +msgstr "Konnte Benutzerverzeichnis nicht finden" #: lib/App/Sqitch/DateTime.pm:33 lib/App/Sqitch/DateTime.pm:71 #, perl-brace-format msgid "Unknown date format \"{format}\"" -msgstr "" +msgstr "Unbekanntes Datumsformat \"{format}\"" #: lib/App/Sqitch/Engine.pm:133 lib/App/Sqitch/Engine.pm:145 -#: lib/App/Sqitch/Target.pm:252 +#: lib/App/Sqitch/Target.pm:251 msgid "No engine specified; specify via target or core.engine" msgstr "" +"Keine Engine angegeben. Bitte gib eine via \"target\" oder \"core.engine\" an" #: lib/App/Sqitch/Engine.pm:167 #, perl-brace-format msgid "{driver} required to manage {engine}" -msgstr "" +msgstr "{driver} benötigt, um {engine} zu benutzen" #: lib/App/Sqitch/Engine.pm:180 msgid "Nothing to deploy (empty plan)" -msgstr "" +msgstr "Nichts anzuwenden (leerer Plan)" #: lib/App/Sqitch/Engine.pm:184 lib/App/Sqitch/Engine.pm:277 #: lib/App/Sqitch/Plan.pm:738 lib/App/Sqitch/Plan/ChangeList.pm:121 #, perl-brace-format msgid "Unknown change: \"{change}\"" -msgstr "" +msgstr "Unbekannte Änderung: \"{change}\"" #: lib/App/Sqitch/Engine.pm:191 #, perl-brace-format msgid "Nothing to deploy (already at \"{change}\")" -msgstr "" +msgstr "Nichts anzuwenden (aktueller Stand ist bereits \"{change}\")" #: lib/App/Sqitch/Engine.pm:209 #, perl-brace-format msgid "Adding registry tables to {destination}" -msgstr "" +msgstr "Erstelle Registry-Tabellen in {destination}" #: lib/App/Sqitch/Engine.pm:218 msgid "Cannot deploy to an earlier change; use \"revert\" instead" msgstr "" +"Eine vorige Änderung kann nicht angewandt werden. Verwende stattdessen " +"\"revert\"" #: lib/App/Sqitch/Engine.pm:226 #, perl-brace-format msgid "Deploying changes through {change} to {destination}" -msgstr "" +msgstr "Wende Änderungen von {change} nach {destination} an" #: lib/App/Sqitch/Engine.pm:230 #, perl-brace-format msgid "Deploying changes to {destination}" -msgstr "" +msgstr "Wende Änderungen nach {destination} an" #: lib/App/Sqitch/Engine.pm:243 #, perl-brace-format msgid "Unknown deployment mode: \"{mode}\"" -msgstr "" +msgstr "Unbekannter Anwendungsmodus: \"{mode}\"" #: lib/App/Sqitch/Engine.pm:271 #, perl-brace-format msgid "Change not deployed: \"{change}\"" -msgstr "" +msgstr "Änderung nicht angewandt: \"{change}\"" #: lib/App/Sqitch/Engine.pm:286 #, perl-brace-format msgid "No changes deployed since: \"{change}\"" -msgstr "" +msgstr "Keine Änderungen seit \"{change}\" angewandt" #: lib/App/Sqitch/Engine.pm:294 #, perl-brace-format msgid "Reverting changes to {change} from {destination}" -msgstr "" +msgstr "Kehre Änderungen an {destination} um nach {change}" #: lib/App/Sqitch/Engine.pm:301 lib/App/Sqitch/Engine.pm:324 msgid "Nothing reverted" -msgstr "" +msgstr "Nichts rückgängig gemacht" #: lib/App/Sqitch/Engine.pm:304 #, perl-brace-format msgid "Revert changes to {change} from {destination}?" -msgstr "" +msgstr "Änderungen von {change} nach {destination} wieder rückgängig machen?" #: lib/App/Sqitch/Engine.pm:312 msgid "Nothing to revert (nothing deployed)" -msgstr "" +msgstr "Nichts rückgängig zu machen (keine Änderungen angewandt)" #: lib/App/Sqitch/Engine.pm:318 #, perl-brace-format msgid "Reverting all changes from {destination}" -msgstr "" +msgstr "Kehre alle Änderungen an {destination} um" #: lib/App/Sqitch/Engine.pm:327 #, perl-brace-format msgid "Revert all changes from {destination}?" -msgstr "" +msgstr "Alle Änderungen an {destination} rückgängig machen?" #: lib/App/Sqitch/Engine.pm:358 #, perl-brace-format msgid "Verifying {destination}" -msgstr "" +msgstr "Verifiziere {destination}" #: lib/App/Sqitch/Engine.pm:365 msgid "Nothing to verify (no planned or deployed changes)" -msgstr "" +msgstr "Nichts zu verifizieren (keine geplanten oder angewandten Änderungen)" #: lib/App/Sqitch/Engine.pm:372 msgid "There are deployed changes, but none planned!" -msgstr "" +msgstr "Angewandte Änderungen gefunden die ungeplant sind!" #: lib/App/Sqitch/Engine.pm:392 msgid "Verify Summary Report" -msgstr "" +msgstr "Verifizierungsreport" #: lib/App/Sqitch/Engine.pm:395 #, perl-brace-format msgid "Changes: {number}" -msgstr "" +msgstr "Änderungen: {number}" #: lib/App/Sqitch/Engine.pm:396 #, perl-brace-format msgid "Errors: {number}" -msgstr "" +msgstr "Fehler: {number}" #: lib/App/Sqitch/Engine.pm:397 msgid "Verify failed" -msgstr "" +msgstr "Verifizierung fehlgeschlagen" #: lib/App/Sqitch/Engine.pm:402 msgid "Verify successful" -msgstr "" +msgstr "Erfolgreich verifiziert" #: lib/App/Sqitch/Engine.pm:415 #, perl-brace-format msgid "Change \"{change}\" has not been deployed" -msgstr "" +msgstr "Änderung \"{change}\" wurde noch nicht angewendet" #: lib/App/Sqitch/Engine.pm:418 -#, fuzzy, perl-brace-format +#, perl-brace-format msgid "Cannot find \"{change}\" in the database or the plan" -msgstr "Cannot find {script} template" +msgstr "Kann \"{change}\" weder in der Datenbank noch im Plan finden" #: lib/App/Sqitch/Engine.pm:425 #, perl-brace-format msgid "Change \"{change}\" is deployed, but not planned" -msgstr "" +msgstr "Änderung \"{change}\" wurde angewendet, allerdings nicht geplant" #: lib/App/Sqitch/Engine.pm:469 msgid "Out of order" -msgstr "" +msgstr "Ungültige Reihenfolge" #: lib/App/Sqitch/Engine.pm:475 -#, fuzzy msgid "Not present in the plan" -msgstr "Cannot find {script} template" +msgstr "Im Plan nicht vorhanden" #: lib/App/Sqitch/Engine.pm:486 lib/App/Sqitch/Engine.pm:498 #: lib/App/Sqitch/Engine.pm:967 lib/App/Sqitch/Engine.pm:997 msgid "not ok" -msgstr "" +msgstr "nicht OK" #: lib/App/Sqitch/Engine.pm:486 lib/App/Sqitch/Engine.pm:945 #: lib/App/Sqitch/Engine.pm:987 msgid "ok" -msgstr "" +msgstr "OK" #: lib/App/Sqitch/Engine.pm:500 msgid "Not deployed" -msgstr "" +msgstr "Nicht angewendet" #: lib/App/Sqitch/Engine.pm:532 #, perl-brace-format msgid "Verify script \"{script}\" failed." -msgstr "" +msgstr "Verifizierungsskript {script} fehlgeschlagen." #: lib/App/Sqitch/Engine.pm:541 #, perl-brace-format msgid "Verify script {file} does not exist" -msgstr "" +msgstr "Verifizierungsskript {file} existiert nicht" #: lib/App/Sqitch/Engine.pm:583 #, perl-brace-format msgid "Conflicts with previously deployed change: {changes}" msgid_plural "Conflicts with previously deployed changes: {changes}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Konflikte mit zuvor angewendeter Änderung: {changes}" +msgstr[1] "Konflikte mit zuvor angewendeten Änderungen: {changes}" #: lib/App/Sqitch/Engine.pm:590 #, perl-brace-format msgid "Missing required change: {changes}" msgid_plural "Missing required changes: {changes}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Fehlende benötigte Änderung: {changes}" +msgstr[1] "Fehlende benötigte Änderungen: {changes}" #: lib/App/Sqitch/Engine.pm:602 #, perl-brace-format msgid "Change \"{changes}\" has already been deployed" msgid_plural "Changes have already been deployed: {changes}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Änderung \"{changes}\" wurde bereits angewendet" +msgstr[1] "Änderungen wurden bereits angewendet: {changes}" #: lib/App/Sqitch/Engine.pm:625 #, perl-brace-format @@ -851,49 +906,56 @@ msgid "Change \"{change}\" required by currently deployed change: {changes}" msgid_plural "" "Change \"{change}\" required by currently deployed changes: {changes}" msgstr[0] "" +"Änderung \"{change}\" wird erfordert von gerade angewendeter Änderung: " +"{changes}" msgstr[1] "" +"Änderung \"{change}\" wird erfordert von gerade angewendeten Änderungen: " +"{changes}" #: lib/App/Sqitch/Engine.pm:648 #, perl-brace-format msgid "Invalid dependency: {dependency}" -msgstr "" +msgstr "Ungültige Abhängigkeit: {dependency}" #: lib/App/Sqitch/Engine.pm:784 lib/App/Sqitch/Plan/ChangeList.pm:88 #, perl-brace-format msgid "" "Change \"{change}\" is ambiguous. Please specify a tag-qualified change:" msgstr "" +"Änderung \"{change}\" ist mehrdeutig. Bitte gib ein Tag für die Änderung an:" #: lib/App/Sqitch/Engine.pm:799 msgid "Change Lookup Failed" -msgstr "" +msgstr "Suche nach Änderung gescheitert" #: lib/App/Sqitch/Engine.pm:820 #, perl-brace-format msgid "Reverting to {change}" -msgstr "" +msgstr "Mache Änderungen rückgänging bis nach {change}" #: lib/App/Sqitch/Engine.pm:821 msgid "Reverting all changes" -msgstr "" +msgstr "Kehre sämtliche Änderungen um" #: lib/App/Sqitch/Engine.pm:829 msgid "The schema will need to be manually repaired" -msgstr "" +msgstr "Das Schema muss manuell repariert werden" #: lib/App/Sqitch/Engine.pm:833 lib/App/Sqitch/Engine.pm:961 msgid "Deploy failed" -msgstr "" +msgstr "Anwendung der Änderung(en) fehlgeschlagen" #: lib/App/Sqitch/Engine.pm:890 -#, fuzzy, perl-brace-format +#, perl-brace-format msgid "Cannot find change {id} ({change}) in {file}" -msgstr "Cannot find {script} template" +msgstr "Kann Änderung {id} ({change}) in {file} nicht finden" #: lib/App/Sqitch/Engine.pm:1030 #, perl-brace-format msgid "No registry found in {destination}. Have you ever deployed?" msgstr "" +"Registry nicht gefunden in {destination}. Wurde Sqitch jemals darauf " +"ausgeführt?" #: lib/App/Sqitch/Engine.pm:1035 #, perl-brace-format @@ -901,6 +963,8 @@ msgid "" "Registry version is {old} but {new} is the latest known. Please upgrade " "Sqitch" msgstr "" +"Aktuelle Registry-Version ist {old} allerdings ist {new} die neueste " +"bekannte Version. Bitte aktualisiere Sqitch" #: lib/App/Sqitch/Engine.pm:1041 #, perl-brace-format @@ -908,6 +972,8 @@ msgid "" "Registry is at version {old} but latest is {new}. Please run the \"upgrade\" " "command" msgstr "" +"Registry ist derzeit auf Version {old} aber neueste Version ist {new}. Bitte " +"führe den \"upgrade\"-Befehl aus" #: lib/App/Sqitch/Engine.pm:1056 #, perl-brace-format @@ -915,289 +981,318 @@ msgid "" "Registry version is {old} but {new} is the latest known. Please upgrade " "Sqitch." msgstr "" +"Aktuelle Registry-Version ist {old} allerdings ist {new} die neueste " +"bekannte Version. Bitte aktualisiere Sqitch" #: lib/App/Sqitch/Engine.pm:1071 #, perl-brace-format msgid "Cannot upgrade to {version}: Cannot find upgrade script \"{file}\"" msgstr "" +"Kann nicht nach {version} aktualisieren: Upgrade-Skript \"{file}\" nicht " +"gefunden" #: lib/App/Sqitch/Engine.pm:1078 #, perl-brace-format msgid "Upgrading the Sqitch registry from {old} to {new}" -msgstr "" +msgstr "Aktualisiere die Sqitch-Registry von {old} nach {new}" #: lib/App/Sqitch/Engine.pm:1085 #, perl-brace-format msgid "From {old} to {new}" -msgstr "" +msgstr "Von {old} nach {new}" #: lib/App/Sqitch/Engine/exasol.pm:320 lib/App/Sqitch/Engine/oracle.pm:455 msgid "Sqitch already initialized" -msgstr "" +msgstr "Sqitch ist bereits initialisiert" #: lib/App/Sqitch/Engine/exasol.pm:388 lib/App/Sqitch/Engine/oracle.pm:585 #, perl-brace-format msgid "Cannot remove {file}: {error}" -msgstr "" +msgstr "Kann Datei {file} nicht entfernen: {error}" #: lib/App/Sqitch/Engine/exasol.pm:397 lib/App/Sqitch/Engine/oracle.pm:594 #, perl-brace-format msgid "Cannot copy {file} to {alias}: {error}" -msgstr "" +msgstr "Kann Datei {file} nicht nach {alias} kopieren: {error}" #: lib/App/Sqitch/Engine/exasol.pm:406 lib/App/Sqitch/Engine/oracle.pm:603 #, perl-brace-format msgid "Cannot symlink {file} to {alias}: {error}" msgstr "" +"Kann symbolische Verknüpfung von {file} nach {alias} nicht erstellen: {error}" #: lib/App/Sqitch/Engine/exasol.pm:514 #, perl-brace-format msgid "{command} unexpectedly failed; exit value = {exitval}" -msgstr "" +msgstr "{command} unerwartet gescheitert. Rückgabewert = {exitval}" #: lib/App/Sqitch/Engine/firebird.pm:207 lib/App/Sqitch/Engine/mysql.pm:273 #: lib/App/Sqitch/Engine/sqlite.pm:158 #, perl-brace-format msgid "Sqitch database {database} already initialized" -msgstr "" +msgstr "Sqitch-Datenbank {database} ist bereits initialisiert" #: lib/App/Sqitch/Engine/firebird.pm:226 #, perl-brace-format msgid "Cannot create database {database}: {error}" -msgstr "" +msgstr "Kann Datenbank {database} nicht erstellen: {error}" #: lib/App/Sqitch/Engine/firebird.pm:240 lib/App/Sqitch/Engine/sqlite.pm:127 #, perl-brace-format msgid "Database name missing in URI {uri}" -msgstr "" +msgstr "Name der Datenbank fehlt in URI {uri}" #: lib/App/Sqitch/Engine/firebird.pm:881 lib/App/Sqitch/Engine/firebird.pm:898 #: lib/App/Sqitch/Engine/firebird.pm:909 #, perl-brace-format msgid "Cannot dup STDERR: {error}" -msgstr "" +msgstr "Kann STDERR nicht öffnen: {error}" #: lib/App/Sqitch/Engine/firebird.pm:885 #, perl-brace-format msgid "Cannot reirect STDERR: {error}" -msgstr "" +msgstr "Kann nicht nach STDERR umleiten: {error}" #: lib/App/Sqitch/Engine/firebird.pm:912 msgid "" "Unable to locate Firebird ISQL; set \"engine.firebird.client\" via sqitch " "config" msgstr "" +"Kann Firebird ISQL nicht finden. Bitte setze \"engine.firebird.client\" via " +"sqitch config" #: lib/App/Sqitch/Engine/mysql.pm:126 #, perl-brace-format msgid "" "Sqitch requires {rdbms} {want_version} or higher; this is {have_version}" msgstr "" +"Sqitch setzt {rdbms} {want_version} oder höher voraus. Die aktuelle Version " +"is allerdings {have_version}" #: lib/App/Sqitch/Engine/mysql.pm:158 #, perl-brace-format msgid "Database name missing in URI \"{uri}\"" -msgstr "" +msgstr "Name der Datenbank fehlt in URI \"{uri}\"" -#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:293 +#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:295 #: lib/App/Sqitch/Engine/vertica.pm:142 #, perl-brace-format msgid "Sqitch schema \"{schema}\" already exists" +msgstr "Sqitch-Schema \"{schema}\" existiert bereits" + +#: lib/App/Sqitch/Engine/pg.pm:386 +#, fuzzy +msgid "Sqitch registry not initialized" +msgstr "Sqitch ist bereits initialisiert" + +#: lib/App/Sqitch/Engine/pg.pm:387 +msgid "" +"Because the \"changes\" table does not exist, Sqitch will now initialize the " +"database to create its registry tables." msgstr "" -#: lib/App/Sqitch/Engine/snowflake.pm:128 +#: lib/App/Sqitch/Engine/snowflake.pm:117 msgid "Cannot determine Snowflake account name" -msgstr "" +msgstr "Kann Namen für Snowflake-Benutzerkonto nicht herausfinden" #: lib/App/Sqitch/Engine/sqlite.pm:98 #, perl-brace-format msgid "" "Sqitch requires SQLite 3.7.11 or later; DBD::SQLite was built with {version}" msgstr "" +"Sqitch erwartet SQLite 3.7.11 oder neuer. DBD::SQLite wurde für Version " +"{version} gebaut" #: lib/App/Sqitch/Engine/sqlite.pm:121 #, perl-brace-format msgid "Sqitch requires SQLite 3.3.9 or later; {client} is {version}" msgstr "" +"Sqitch erwartet SQLite 3.3.9 oder neuer. {client} ist allerdings {version}" #: lib/App/Sqitch/ItemFormatter.pm:63 msgid "Fail" -msgstr "" +msgstr "Fehlgeschlagen" #: lib/App/Sqitch/ItemFormatter.pm:68 msgid "deploy" -msgstr "" +msgstr "anwenden" #: lib/App/Sqitch/ItemFormatter.pm:69 msgid "revert" -msgstr "" +msgstr "rückgängig machen" #: lib/App/Sqitch/ItemFormatter.pm:70 msgid "fail" -msgstr "" +msgstr "fehlschlagen" #: lib/App/Sqitch/ItemFormatter.pm:75 msgid "Event: " -msgstr "" +msgstr "Ereignis: " #: lib/App/Sqitch/ItemFormatter.pm:76 msgid "Change: " -msgstr "" +msgstr "Änderung: " #: lib/App/Sqitch/ItemFormatter.pm:77 msgid "Committer:" -msgstr "" +msgstr "Committer:" #: lib/App/Sqitch/ItemFormatter.pm:78 msgid "Planner: " -msgstr "" +msgstr "Planer: " #: lib/App/Sqitch/ItemFormatter.pm:79 msgid "By: " -msgstr "" +msgstr "Von: " #: lib/App/Sqitch/ItemFormatter.pm:80 msgid "Date: " -msgstr "" +msgstr "Datum: " #: lib/App/Sqitch/ItemFormatter.pm:81 msgid "Committed:" -msgstr "" +msgstr "Commitet:" #: lib/App/Sqitch/ItemFormatter.pm:82 msgid "Planned: " -msgstr "" +msgstr "Geplant: " #: lib/App/Sqitch/ItemFormatter.pm:83 msgid "Name: " -msgstr "" +msgstr "Name: " #: lib/App/Sqitch/ItemFormatter.pm:84 msgid "Project: " -msgstr "" +msgstr "Projekt: " #: lib/App/Sqitch/ItemFormatter.pm:85 msgid "Email: " -msgstr "" +msgstr "E-Mail: " #: lib/App/Sqitch/ItemFormatter.pm:86 lib/App/Sqitch/ItemFormatter.pm:176 msgid "Requires: " -msgstr "" +msgstr "Benötigt: " #: lib/App/Sqitch/ItemFormatter.pm:87 lib/App/Sqitch/ItemFormatter.pm:187 msgid "Conflicts:" -msgstr "" +msgstr "Konflikte:" #: lib/App/Sqitch/ItemFormatter.pm:89 msgid "No label passed to the _ format" -msgstr "" +msgstr "Label fehlt im _ Formatierungsplatzhalter" #: lib/App/Sqitch/ItemFormatter.pm:93 #, perl-brace-format msgid "Unknown label \"{label}\" passed to the _ format" -msgstr "" +msgstr "Unbekanntes Label \"{label}\" im _ Formatierungsplatzhalter angegeben" #: lib/App/Sqitch/ItemFormatter.pm:150 #, perl-brace-format msgid "{color} is not a valid ANSI color" -msgstr "" +msgstr "{color} ist keine gültige ANSI-Farbe" #: lib/App/Sqitch/ItemFormatter.pm:193 #, perl-brace-format msgid "{attr} is not a valid change attribute" -msgstr "" +msgstr "{attr} ist kein gültiges Änderungsattribut" #: lib/App/Sqitch/ItemFormatter.pm:216 #, perl-brace-format msgid "Unknown format code \"{code}\"" -msgstr "" +msgstr "Unbekannter Formatierungscode \"{code}\"" #: lib/App/Sqitch/Plan.pm:129 #, perl-brace-format msgid "Plan file {file} does not exist" -msgstr "" +msgstr "Plandatei {file} existiert nicht" #: lib/App/Sqitch/Plan.pm:131 #, perl-brace-format msgid "Plan file {file} is not a regular file" -msgstr "" +msgstr "Plandatei {file} ist keine reguläre Datei" #: lib/App/Sqitch/Plan.pm:182 #, perl-brace-format msgid "Syntax error in {file} at line {lineno}: {error}" -msgstr "" +msgstr "Syntaxfehler in {file}, Zeile {lineno}: {error}" #: lib/App/Sqitch/Plan.pm:206 msgid "Invalid pragma; a blank line must come between pragmas and changes" msgstr "" +"Ungültiges Pragma. Eine leere Zeile muss zwischen Pragmas und Änderungen " +"erscheinen" #: lib/App/Sqitch/Plan.pm:263 #, perl-format, perl-brace-format msgid "Missing %project pragma in {file}" -msgstr "" +msgstr "Fehlendes %project Pragma in {file}" #: lib/App/Sqitch/Plan.pm:318 msgid "" "Invalid name; names must not begin with punctuation, contain \"@\", \":\", " "\"#\", or blanks, or end in punctuation or digits following punctuation" msgstr "" +"Ungültiger Name. Namen dürfen nicht mit Satzzeichen beginnen, \"@\", \":\", " +"\"#\" oder Leerzeichen beinhalten oder in Satzzeichen enden wenn diese " +"wiederum Ziffern oder anderen Satzzeichen folgen" #: lib/App/Sqitch/Plan.pm:323 msgid "Missing timestamp and planner name and email" -msgstr "" +msgstr "Zeitstempel, Name des Planers und E-Mail-Adresse fehlen" #: lib/App/Sqitch/Plan.pm:325 msgid "Missing timestamp" -msgstr "" +msgstr "Fehlender Zeitstempel" #: lib/App/Sqitch/Plan.pm:327 msgid "Missing planner name and email" -msgstr "" +msgstr "Name des Planers und E-Mail-Adresse fehlen" #: lib/App/Sqitch/Plan.pm:332 lib/App/Sqitch/Plan.pm:897 #, perl-brace-format msgid "\"{name}\" is a reserved name" -msgstr "" +msgstr "\"{name}\" ist ein reservierter Name" #: lib/App/Sqitch/Plan.pm:338 lib/App/Sqitch/Plan.pm:901 #, perl-brace-format msgid "\"{name}\" is invalid because it could be confused with a SHA1 ID" msgstr "" +"\"{name}\" is ungültig da er mit einer SHA1-ID verwechselt werden könnte" #: lib/App/Sqitch/Plan.pm:358 #, perl-brace-format msgid "Tag \"{tag}\" declared without a preceding change" -msgstr "" +msgstr "Tag \"{tag}\" ohne vorige Änderung deklariert" #: lib/App/Sqitch/Plan.pm:367 #, perl-brace-format msgid "Tag \"{tag}\" duplicates earlier declaration on line {line}" -msgstr "" +msgstr "Tag \"{tag}\" dupliziert frühere Deklaration auf Zeile {line}" #: lib/App/Sqitch/Plan.pm:375 msgid "Tags may not specify dependencies" -msgstr "" +msgstr "Tags können keine Abhängigkeiten spezifizieren" #: lib/App/Sqitch/Plan.pm:404 #, perl-brace-format msgid "Change \"{change}\" duplicates earlier declaration on line {line}" -msgstr "" +msgstr "Änderung \"{change}\" dupliziert vorige Deklaration auf Zeile {line}" #: lib/App/Sqitch/Plan.pm:417 lib/App/Sqitch/Plan.pm:769 #: lib/App/Sqitch/Plan.pm:781 #, perl-brace-format msgid "\"{dep}\" is not a valid dependency specification" -msgstr "" +msgstr "\"{dep}\" ist keine gültige Abhängigkeitsspezifikation" #: lib/App/Sqitch/Plan.pm:426 #, perl-brace-format msgid "Duplicate dependency \"{dep}\"" -msgstr "" +msgstr "Doppelte Abhängigkeit \"{dep}\"" #: lib/App/Sqitch/Plan.pm:539 #, perl-brace-format msgid "Change \"{change}\" cannot require itself" -msgstr "" +msgstr "Änderung \"{change}\" kann nicht von sich selbst abhängig sein" #: lib/App/Sqitch/Plan.pm:546 #, perl-brace-format @@ -1208,40 +1303,44 @@ msgid_plural "" "Change \"{change}\" planned {num} changes before required change " "\"{required}\"" msgstr[0] "" +"Änderung \"{change}\" plant {num} Änderung vor benötigter Änderung " +"\"{required}\"" msgstr[1] "" +"Änderung \"{change}\" plant {num} Änderungen vor benötigter Änderung " +"\"{required}\"" #: lib/App/Sqitch/Plan.pm:555 #, perl-brace-format msgid "Unknown change \"{required}\" required by change \"{change}\"" -msgstr "" +msgstr "Unbekannte Änderung \"{required}\" wird vorausgesetzt von \"{change}\"" #: lib/App/Sqitch/Plan.pm:565 #, perl-brace-format msgid "HINT: move \"{change}\" down {num} line in {plan}" msgid_plural "HINT: move \"{change}\" down {num} lines in {plan}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Hinweis: schiebe \"{change}\" {num} Zeile herunter in {plan}" +msgstr[1] "Hinweis: schiebe \"{change}\" {num} Zeilen herunter in {plan}" #: lib/App/Sqitch/Plan.pm:579 msgid "Dependency error detected:" msgid_plural "Dependency errors detected:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Abhängigkeitsfehler entdeckt:" +msgstr[1] "Abhängigkeitsfehler entdeckt:" #: lib/App/Sqitch/Plan.pm:676 #, perl-brace-format msgid "Cannot find change \"{change}\" in plan" -msgstr "" +msgstr "Kann Änderung \"{change}\" nicht im Plan finden" #: lib/App/Sqitch/Plan.pm:731 #, perl-brace-format msgid "Tag \"{tag}\" already exists" -msgstr "" +msgstr "Tag \"{tag}\" existiert bereits" #: lib/App/Sqitch/Plan.pm:743 #, perl-brace-format msgid "Cannot apply tag \"{tag}\" to a plan with no changes" -msgstr "" +msgstr "Kann Tag \"{tag}\"nicht auf einen Plan ohne Änderungen anwenden" #: lib/App/Sqitch/Plan.pm:800 #, perl-brace-format @@ -1249,6 +1348,8 @@ msgid "" "Change \"{change}\" already exists in plan {file}.\n" "Use \"sqitch rework\" to copy and rework it" msgstr "" +"Änderung \"{change}\" existiert bereits in Plan {file}\n" +"Verwende \"sqitch rework\" um zu kopieren und überarbeiten" #: lib/App/Sqitch/Plan.pm:833 #, perl-brace-format @@ -1256,6 +1357,8 @@ msgid "" "Change \"{change}\" does not exist in {file}.\n" "Use \"sqitch add {change}\" to add it to the plan" msgstr "" +"Änderung \"{change}\" existiert nicht in {file}\n" +"Benutze \"sqitch add {change}\"um sie dem Plan hinzuzufügen" #: lib/App/Sqitch/Plan.pm:841 #, perl-brace-format @@ -1263,16 +1366,22 @@ msgid "" "Cannot rework \"{change}\" without an intervening tag.\n" "Use \"sqitch tag\" to create a tag and try again" msgstr "" +"Kann \"{change}\" nicht ohne zuvor erstellten Tag überarbeiten\n" +"Benutze \"sqitch tag\" um einen Tag zu erstellen und versuche es erneut" #: lib/App/Sqitch/Plan.pm:879 #, perl-brace-format msgid "Cannot add change \"{change}\": requires unknown change \"{req}\"" msgstr "" +"Kann Änderung \"{change}\" nicht hinzufügen: unbekannte Änderung \"{req}\" " +"wird vorausgesetzt" #: lib/App/Sqitch/Plan.pm:885 #, perl-brace-format msgid "Cannot rework change \"{change}\": requires unknown change \"{req}\"" msgstr "" +"Kann Änderung \"{change}\" nicht überarbeiten: unbekannte Änderung \"{req}\" " +"wird vorausgesetzt" #: lib/App/Sqitch/Plan.pm:908 #, perl-brace-format @@ -1281,6 +1390,9 @@ msgid "" "\", \":\", \"#\", or blanks, or end in punctuation or digits following " "punctuation" msgstr "" +"\"{name}\" ist ungültig. Änderungen dürfen nicht mit Satzzeichen beginnen, " +"\"@\", \":\", \"#\" oder Leerzeichen beinhalten oder in Satzzeichen enden " +"wenn diese wiederum Ziffern oder anderen Satzzeichen folgen" #: lib/App/Sqitch/Plan.pm:914 #, perl-brace-format @@ -1289,11 +1401,14 @@ msgid "" "\":\", \"#\", or blanks, or end in punctuation or digits following " "punctuation" msgstr "" +"\"{name}\" ist ungültig. Tags dürfen nicht mit Satzzeichen beginnen, \"@\", " +"\":\", \"#\" oder Leerzeichen beinhalten oder in Satzzeichen enden wenn " +"diese wiederum Ziffern oder anderen Satzzeichen folgen" #: lib/App/Sqitch/Plan.pm:978 #, perl-brace-format msgid "\"Error closing {file}: {error}" -msgstr "" +msgstr "Fehler beim Schliessen der Datei {file}: {error}" #: lib/App/Sqitch/Plan/Change.pm:328 #, perl-brace-format @@ -1301,24 +1416,26 @@ msgid "" "Please enter a note for your change. Lines starting with '#' will\n" "be ignored, and an empty message aborts the {command}." msgstr "" +"Bitte füge ein Anmerkung der Änderung hinzu. Zeilen die mit '#' beginnen\n" +"werden ignoriert und leere Eingaben brechen den Befehl {command} ab." #: lib/App/Sqitch/Plan/Change.pm:333 #, perl-brace-format msgid "Change to {command}:" -msgstr "" +msgstr "Wechsel nach {command}:" #: lib/App/Sqitch/Plan/ChangeList.pm:96 msgid "Change lookup failed" -msgstr "" +msgstr "Suche nach Änderung gescheitert" #: lib/App/Sqitch/Plan/Depend.pm:78 #, perl-brace-format msgid "Unable to find change \"{change}\" in plan {file}" -msgstr "" +msgstr "Kann Änderung \"{change}\" nicht finden in Plan {file}" #: lib/App/Sqitch/Plan/Line.pm:115 msgid "Aborting due to empty note" -msgstr "" +msgstr "Breche wegen fehlender Anmerkung ab" #: lib/App/Sqitch/Plan/Line.pm:131 #, perl-brace-format @@ -1326,6 +1443,8 @@ msgid "" "Write a {command} note.\n" "Lines starting with '#' will be ignored." msgstr "" +"Schreibe eine {command}-Anmerkung.\n" +"Zeilen die mit '#' beginnen werden ignoriert." #: lib/App/Sqitch/Role/ContextCommand.pm:38 #, perl-brace-format @@ -1334,18 +1453,25 @@ msgid "" "commands.\n" " Use --chdir instead." msgstr "" +" Option --top-dir ist sowohl für {command} als auch andere Befehle " +"veraltet.\n" +" Verwende stattdessen--chdir" #: lib/App/Sqitch/Role/DBIEngine.pm:349 #, perl-brace-format msgid "" "Cannot register \"{project}\" with URI {uri}: already exists with NULL URI" msgstr "" +"Kann \"{project}\" mit URI {uri} nicht registrieren: existiert bereits mit " +"NULL URI" #: lib/App/Sqitch/Role/DBIEngine.pm:355 #, perl-brace-format msgid "" "Cannot register \"{project}\" without URI: already exists with URI {uri}" msgstr "" +"Kann \"{project}\" ohne URI nicht registrieren: existiert bereits mit URI " +"{uri}" #: lib/App/Sqitch/Role/DBIEngine.pm:361 #, perl-brace-format @@ -1353,6 +1479,8 @@ msgid "" "Cannot register \"{project}\" with URI {uri}: already exists with URI " "{reg_uri}" msgstr "" +"Kann \"{project}\" mit URI {uri} nicht registrieren: existert bereits mit " +"URI {reg_uri}" #: lib/App/Sqitch/Role/DBIEngine.pm:379 #, perl-brace-format @@ -1360,69 +1488,87 @@ msgid "" "Cannot register \"{project}\" with URI {uri}: project \"{reg_proj}\" already " "using that URI" msgstr "" +"Kann \"{project}\" mit URI {uri} nicht registrieren: Projekt \"{reg_proj}\" " +"verwendet bereits diese URI" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:96 #, perl-brace-format msgid "Unknown directory name: {dirs}" msgid_plural "Unknown directory names: {dirs}" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Unbekannter Verzeichnisname: {dirs}" +msgstr[1] "Unbekannte Verzeichnisnamen: {dirs}" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:128 #, perl-brace-format msgid "URI \"{uri}\" is not a database URI" -msgstr "" +msgstr "URI \"{uri}\" ist keine Datenbank-URI" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:133 #, perl-brace-format msgid "No database engine in URI \"{uri}\"" -msgstr "" +msgstr "Fehlende Datenbank-Engine in URI \"{uri}\"" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:137 #, perl-brace-format msgid "Unknown engine \"{engine}\" in URI \"{uri}\"" -msgstr "" +msgstr "Unbekannte Engine \"{engine}\" in URI \"{uri}\"" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:283 msgid "Cannot write a plan file without a project name" -msgstr "" +msgstr "Plandatei kann nicht ohne Projektnamen geschrieben werden" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:290 #, perl-brace-format msgid "Cannot initialize because {file} already exists and is not a file" msgstr "" +"Kann nicht initialiseren da {file} bereits existiert und es sich dabei nicht " +"um eine Datei handelt" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:301 #, perl-brace-format msgid "" "Cannot initialize because {file} already exists and is not a valid plan file" msgstr "" +"Kann nicht initialisieren da {file} bereits existiert und keine gültige " +"Plandatei ist" #: lib/App/Sqitch/Role/TargetConfigCommand.pm:307 #, perl-brace-format msgid "" "Cannot initialize because project \"{project}\" already initialized in {file}" msgstr "" +"Kann nicht initialisieren da Projekt \"{project}\" bereits in {file} " +"initialisiert wurde" -#: lib/App/Sqitch/Target.pm:273 -#, fuzzy, perl-brace-format +#: lib/App/Sqitch/Target.pm:254 +msgid "" +"No project configuration found. Run the \"init\" command to initialize a " +"project" +msgstr "" +"Fehlende Projektkonfiguration. Bitte führe den \"init\"-Befehl aus, um das " +"Projekt zu initialisieren" + +#: lib/App/Sqitch/Target.pm:276 +#, perl-brace-format msgid "Cannot find target \"{target}\"" -msgstr "Cannot find {script} template" +msgstr "Kann Ziel \"{target}\" nicht finden" -#: lib/App/Sqitch/Target.pm:279 +#: lib/App/Sqitch/Target.pm:282 #, perl-brace-format msgid "No URI associated with target \"{target}\"" -msgstr "" +msgstr "Keine URI mit Ziel \"{target}\" verknüpft" -#: lib/App/Sqitch/Target.pm:288 +#: lib/App/Sqitch/Target.pm:291 #, perl-brace-format msgid "No engine specified by URI {uri}; URI must start with \"db:$engine:\"" msgstr "" +"Keine Engine mittels URI {uri} angegeben. URI muss mit \"db:$engine:\" " +"beginnen" #: lib/App/Sqitch/Types.pm:57 msgid "User name may not contain \"<\" or start with \"[\"" -msgstr "" +msgstr "Benutzername darf nicht \"<\" beinhalten oder mit \"[\" beginnen" #: lib/App/Sqitch/Types.pm:63 msgid "User email may not contain \">\"" -msgstr "" +msgstr "Benutzer E-Mail-Adresse darf nicht \">\" beinhalten" diff --git a/po/fr.po b/po/fr_FR.po similarity index 97% rename from po/fr.po rename to po/fr_FR.po index 181c0e7fb..a19f77964 100644 --- a/po/fr.po +++ b/po/fr_FR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Sqitch 0.932\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-25 10:09-0500\n" +"POT-Creation-Date: 2019-06-04 07:43-0400\n" "PO-Revision-Date: 2012-10-12 11:28-0700\n" "Last-Translator: Arnaud Assad \n" "Language-Team: French \n" @@ -22,7 +22,7 @@ msgstr "" "Impossible de trouver votre nom; exécuter sqitch config --user user.name " "\"VOTRE NOM\"" -#: lib/App/Sqitch.pm:115 +#: lib/App/Sqitch.pm:114 msgid "" "Cannot infer your email address; run sqitch config --user user.email " "you@host.com" @@ -30,40 +30,50 @@ msgstr "" "Impossible de déduire votre adressse email; exécuter sqitch config --user " "user.email vous@hote.com" -#: lib/App/Sqitch.pm:281 +#: lib/App/Sqitch.pm:280 #, fuzzy, perl-brace-format msgid "Cannot change to directory {directory}: {error}" msgstr "Impossible de copier {src} vers {dest} : {error}" -#: lib/App/Sqitch.pm:315 lib/App/Sqitch/Command.pm:112 +#: lib/App/Sqitch.pm:314 lib/App/Sqitch/Command.pm:112 #, perl-brace-format msgid "\"{command}\" is not a valid command" msgstr "\"{command}\" n'est pas une commande valide" -#: lib/App/Sqitch.pm:409 +#: lib/App/Sqitch.pm:408 msgid "" "Sqitch seems to be unattended and there is no default value for this question" msgstr "" -#: lib/App/Sqitch.pm:438 +#: lib/App/Sqitch.pm:427 +msgctxt "Confirm prompt answer yes" +msgid "Yes" +msgstr "" + +#: lib/App/Sqitch.pm:428 +msgctxt "Confirm prompt answer no" +msgid "No" +msgstr "" + +#: lib/App/Sqitch.pm:437 msgid "Please answer \"y\" or \"n\"." msgstr "" -#: lib/App/Sqitch.pm:441 +#: lib/App/Sqitch.pm:440 msgid "No valid answer after 3 attempts; aborting" msgstr "" -#: lib/App/Sqitch.pm:451 lib/App/Sqitch.pm:458 +#: lib/App/Sqitch.pm:461 lib/App/Sqitch.pm:468 #, perl-brace-format msgid "Cannot exec {command}: {error}" msgstr "Impossible d'exécuter {command} : {error}" -#: lib/App/Sqitch.pm:474 +#: lib/App/Sqitch.pm:484 #, perl-brace-format msgid "Error closing pipe to {command}: {error}" msgstr "Erreur en fermant le tube vers {command} : {error}" -#: lib/App/Sqitch.pm:478 lib/App/Sqitch/Engine/oracle.pm:758 +#: lib/App/Sqitch.pm:488 lib/App/Sqitch/Engine/oracle.pm:758 #, perl-brace-format msgid "{command} unexpectedly returned exit value {exitval}" msgstr "{command} a retourné de manière inattendue la valeur {exitval}" @@ -357,28 +367,28 @@ msgstr "" msgid "No Variables" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:255 +#: lib/App/Sqitch/Command/engine.pm:253 #, fuzzy, perl-brace-format msgid "Loading {file}" msgstr "{file} crée" -#: lib/App/Sqitch/Command/engine.pm:268 +#: lib/App/Sqitch/Command/engine.pm:266 #, perl-brace-format msgid "" "Deprecated {section} found in {file}; to remove it, run\n" " {sqitch} config --file {file} --remove-section {section}" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:280 +#: lib/App/Sqitch/Command/engine.pm:278 msgid " - No engines to update" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:287 +#: lib/App/Sqitch/Command/engine.pm:285 #, perl-brace-format msgid "Cannot update {file}. Please make it writable" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:343 +#: lib/App/Sqitch/Command/engine.pm:341 #, perl-brace-format msgid "" "Migrated {old} to {new}; To remove {old}, run\n" @@ -642,12 +652,12 @@ msgstr "" msgid "URI" msgstr "" -#: lib/App/Sqitch/Command/upgrade.pm:49 +#: lib/App/Sqitch/Command/upgrade.pm:48 #, fuzzy, perl-brace-format msgid "Upgrading registry {registry} to version {version}" msgstr "Ajout des tables de metadonnées à {destination}" -#: lib/App/Sqitch/Command/upgrade.pm:56 +#: lib/App/Sqitch/Command/upgrade.pm:55 #, perl-brace-format msgid "Registry {registry} is up-to-date at version {version}" msgstr "" @@ -657,7 +667,7 @@ msgstr "" msgid "Too many changes specified; verifying from \"{from}\" to \"{to}\"" msgstr "" -#: lib/App/Sqitch/Config.pm:26 +#: lib/App/Sqitch/Config.pm:25 msgid "Could not determine home directory" msgstr "Impossible de déterminer le répertoire de référence" @@ -667,7 +677,7 @@ msgid "Unknown date format \"{format}\"" msgstr "Format de date inconnu \"{format}\"" #: lib/App/Sqitch/Engine.pm:133 lib/App/Sqitch/Engine.pm:145 -#: lib/App/Sqitch/Target.pm:252 +#: lib/App/Sqitch/Target.pm:251 #, fuzzy msgid "No engine specified; specify via target or core.engine" msgstr "Pas de moteur spécifié; utiliser --engine ou définir core.engine" @@ -1020,13 +1030,23 @@ msgstr "" msgid "Database name missing in URI \"{uri}\"" msgstr "" -#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:293 +#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:295 #: lib/App/Sqitch/Engine/vertica.pm:142 #, perl-brace-format msgid "Sqitch schema \"{schema}\" already exists" msgstr "Le schéma Sqitch \"{schema}\" existe déjà" -#: lib/App/Sqitch/Engine/snowflake.pm:128 +#: lib/App/Sqitch/Engine/pg.pm:386 +msgid "Sqitch registry not initialized" +msgstr "" + +#: lib/App/Sqitch/Engine/pg.pm:387 +msgid "" +"Because the \"changes\" table does not exist, Sqitch will now initialize the " +"database to create its registry tables." +msgstr "" + +#: lib/App/Sqitch/Engine/snowflake.pm:117 msgid "Cannot determine Snowflake account name" msgstr "" @@ -1468,17 +1488,23 @@ msgid "" "Cannot initialize because project \"{project}\" already initialized in {file}" msgstr "" -#: lib/App/Sqitch/Target.pm:273 +#: lib/App/Sqitch/Target.pm:254 +msgid "" +"No project configuration found. Run the \"init\" command to initialize a " +"project" +msgstr "" + +#: lib/App/Sqitch/Target.pm:276 #, fuzzy, perl-brace-format msgid "Cannot find target \"{target}\"" msgstr "Impossible de trouver le changement {change}" -#: lib/App/Sqitch/Target.pm:279 +#: lib/App/Sqitch/Target.pm:282 #, fuzzy, perl-brace-format msgid "No URI associated with target \"{target}\"" msgstr "Cible d'annulation inconnue : \"{target}\"" -#: lib/App/Sqitch/Target.pm:288 +#: lib/App/Sqitch/Target.pm:291 #, perl-brace-format msgid "No engine specified by URI {uri}; URI must start with \"db:$engine:\"" msgstr "" diff --git a/po/it_IT.po b/po/it_IT.po index 529aa195a..830464ed2 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: App-Sqitch 0.9996\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-25 10:09-0500\n" +"POT-Creation-Date: 2019-06-04 07:43-0400\n" "PO-Revision-Date: 2017-10-12 10:30+0200\n" "Last-Translator: Luca Ferrari \n" "Language-Team: Italian \n" @@ -24,7 +24,7 @@ msgstr "" "Impossibile trovare il tuo nome: esegui sqitch config --user user.name \"TUO " "NOME\"" -#: lib/App/Sqitch.pm:115 +#: lib/App/Sqitch.pm:114 msgid "" "Cannot infer your email address; run sqitch config --user user.email " "you@host.com" @@ -32,41 +32,51 @@ msgstr "" "Non riesco a risalire alla tua e-mail: esegui sqitch config --user user." "email tuaemail@host.com" -#: lib/App/Sqitch.pm:281 +#: lib/App/Sqitch.pm:280 #, fuzzy, perl-brace-format msgid "Cannot change to directory {directory}: {error}" msgstr "Non posso copiare {src} in {dest}: {error}" -#: lib/App/Sqitch.pm:315 lib/App/Sqitch/Command.pm:112 +#: lib/App/Sqitch.pm:314 lib/App/Sqitch/Command.pm:112 #, perl-brace-format msgid "\"{command}\" is not a valid command" msgstr "\"{command}\" non è un comando valido" -#: lib/App/Sqitch.pm:409 +#: lib/App/Sqitch.pm:408 msgid "" "Sqitch seems to be unattended and there is no default value for this question" msgstr "" "Sqitch sembra non presidiato e non ha un valore di default per il quesito" -#: lib/App/Sqitch.pm:438 +#: lib/App/Sqitch.pm:427 +msgctxt "Confirm prompt answer yes" +msgid "Yes" +msgstr "" + +#: lib/App/Sqitch.pm:428 +msgctxt "Confirm prompt answer no" +msgid "No" +msgstr "" + +#: lib/App/Sqitch.pm:437 msgid "Please answer \"y\" or \"n\"." msgstr "Rispondi \"y\" (si) o \"n\" (no)" -#: lib/App/Sqitch.pm:441 +#: lib/App/Sqitch.pm:440 msgid "No valid answer after 3 attempts; aborting" msgstr "Nessuna risposta valida in 3 tentativi, aborto" -#: lib/App/Sqitch.pm:451 lib/App/Sqitch.pm:458 +#: lib/App/Sqitch.pm:461 lib/App/Sqitch.pm:468 #, perl-brace-format msgid "Cannot exec {command}: {error}" msgstr "Non posso eseguire {command}: {error}" -#: lib/App/Sqitch.pm:474 +#: lib/App/Sqitch.pm:484 #, perl-brace-format msgid "Error closing pipe to {command}: {error}" msgstr "Errore di chiusura pipe per {command}: {error}" -#: lib/App/Sqitch.pm:478 lib/App/Sqitch/Engine/oracle.pm:758 +#: lib/App/Sqitch.pm:488 lib/App/Sqitch/Engine/oracle.pm:758 #, perl-brace-format msgid "{command} unexpectedly returned exit value {exitval}" msgstr "Il comando {command} ha restituito un exit value inatteso {exitval}" @@ -364,12 +374,12 @@ msgstr "" msgid "No Variables" msgstr "" -#: lib/App/Sqitch/Command/engine.pm:255 +#: lib/App/Sqitch/Command/engine.pm:253 #, perl-brace-format msgid "Loading {file}" msgstr "Caricamento di {file}" -#: lib/App/Sqitch/Command/engine.pm:268 +#: lib/App/Sqitch/Command/engine.pm:266 #, perl-brace-format msgid "" "Deprecated {section} found in {file}; to remove it, run\n" @@ -378,16 +388,16 @@ msgstr "" "Sezione {section} nel file {file} è deprecata; per rimuoverla esegui\n" " {sqitch} config --file {file} --remove-section {section}" -#: lib/App/Sqitch/Command/engine.pm:280 +#: lib/App/Sqitch/Command/engine.pm:278 msgid " - No engines to update" msgstr " - Nessun motore da aggiornare" -#: lib/App/Sqitch/Command/engine.pm:287 +#: lib/App/Sqitch/Command/engine.pm:285 #, perl-brace-format msgid "Cannot update {file}. Please make it writable" msgstr "Impossibile aggiornare il file {file}. Rendilo scrivibile" -#: lib/App/Sqitch/Command/engine.pm:343 +#: lib/App/Sqitch/Command/engine.pm:341 #, perl-brace-format msgid "" "Migrated {old} to {new}; To remove {old}, run\n" @@ -659,12 +669,12 @@ msgstr "" msgid "URI" msgstr "URI" -#: lib/App/Sqitch/Command/upgrade.pm:49 +#: lib/App/Sqitch/Command/upgrade.pm:48 #, perl-brace-format msgid "Upgrading registry {registry} to version {version}" msgstr "Aggiorno il registro {registry} alla versione {version}" -#: lib/App/Sqitch/Command/upgrade.pm:56 +#: lib/App/Sqitch/Command/upgrade.pm:55 #, perl-brace-format msgid "Registry {registry} is up-to-date at version {version}" msgstr "Il registro {registry} è aggiornato alla versione {version}" @@ -674,7 +684,7 @@ msgstr "Il registro {registry} è aggiornato alla versione {version}" msgid "Too many changes specified; verifying from \"{from}\" to \"{to}\"" msgstr "Troppe modifiche specificate; verfica da \"{from}\" a \"{to}\"" -#: lib/App/Sqitch/Config.pm:26 +#: lib/App/Sqitch/Config.pm:25 msgid "Could not determine home directory" msgstr "Non riesco a stabiliare la home directory" @@ -684,7 +694,7 @@ msgid "Unknown date format \"{format}\"" msgstr "Formato data \"{format}\" sconosciuto" #: lib/App/Sqitch/Engine.pm:133 lib/App/Sqitch/Engine.pm:145 -#: lib/App/Sqitch/Target.pm:252 +#: lib/App/Sqitch/Target.pm:251 #, fuzzy msgid "No engine specified; specify via target or core.engine" msgstr "Nessun motore specificato: usa --engine o imposta core.engine" @@ -1049,13 +1059,24 @@ msgstr "" msgid "Database name missing in URI \"{uri}\"" msgstr "Il nome di database non è specificato nell'URI {uri}" -#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:293 +#: lib/App/Sqitch/Engine/pg.pm:189 lib/App/Sqitch/Engine/snowflake.pm:295 #: lib/App/Sqitch/Engine/vertica.pm:142 #, perl-brace-format msgid "Sqitch schema \"{schema}\" already exists" msgstr "Lo schema \"{schema}\" per Sqitch esiste già." -#: lib/App/Sqitch/Engine/snowflake.pm:128 +#: lib/App/Sqitch/Engine/pg.pm:386 +#, fuzzy +msgid "Sqitch registry not initialized" +msgstr "Sqitch è già stato inizializzato" + +#: lib/App/Sqitch/Engine/pg.pm:387 +msgid "" +"Because the \"changes\" table does not exist, Sqitch will now initialize the " +"database to create its registry tables." +msgstr "" + +#: lib/App/Sqitch/Engine/snowflake.pm:117 msgid "Cannot determine Snowflake account name" msgstr "" @@ -1505,17 +1526,23 @@ msgstr "" "Impossibile inizializzare poiché il progetto \"{project}\" è già stato " "inizializzato in {file}" -#: lib/App/Sqitch/Target.pm:273 +#: lib/App/Sqitch/Target.pm:254 +msgid "" +"No project configuration found. Run the \"init\" command to initialize a " +"project" +msgstr "" + +#: lib/App/Sqitch/Target.pm:276 #, perl-brace-format msgid "Cannot find target \"{target}\"" msgstr "Non posso trovare il target specificato \"{target}\"" -#: lib/App/Sqitch/Target.pm:279 +#: lib/App/Sqitch/Target.pm:282 #, perl-brace-format msgid "No URI associated with target \"{target}\"" msgstr "Nessun URI associato al target \"{target}\"" -#: lib/App/Sqitch/Target.pm:288 +#: lib/App/Sqitch/Target.pm:291 #, perl-brace-format msgid "No engine specified by URI {uri}; URI must start with \"db:$engine:\"" msgstr "" diff --git a/t/base.t b/t/base.t index b97c0f6cf..506864e79 100644 --- a/t/base.t +++ b/t/base.t @@ -2,9 +2,9 @@ use strict; use warnings; -use Test::More tests => 158; +use Test::More tests => 189; #use Test::More 'no_plan'; -use Test::MockModule; +use Test::MockModule 0.17; use Path::Class; use Test::Exception; use Test::NoWarnings; @@ -28,6 +28,7 @@ can_ok $CLASS, qw( user_email verbosity prompt + ask_yes_no ask_y_n ); @@ -535,13 +536,70 @@ is capture_stdout { is $sqitch->prompt('hi', 'yo'), 'yo', 'Prompt should return input'; }, "hi [yo] yo\n", 'Prompt should show default as selected when unattended'; +############################################################################## +# Test ask_yes_no(). +throws_ok { $sqitch->ask_yes_no } 'App::Sqitch::X', + 'Should get error for no ask_yes_no message'; +is $@->ident, 'DEV', 'No ask_yes_no ident should be "DEV"'; +is $@->message, 'ask_yes_no() called without a prompt message', + 'No ask_yes_no error message should be correct'; + +my $yes = __ 'Yes'; +my $no = __ 'No'; + +# Test affermation. +for my $variant ($yes, lc $yes, uc $yes, lc substr($yes, 0, 1), substr($yes, 0, 2)) { + $input = $variant; + $unattended = 0; + is capture_stdout { + ok $sqitch->ask_yes_no('hi'), + qq{ask_yes_no() should return true for "$variant" input}; + }, 'hi ', qq{ask_yes_no() should prompt for "$variant"}; +} + +# Test negation. +for my $variant ($no, lc $no, uc $no, lc substr($no, 0, 1), substr($no, 0, 2)) { + $input = $variant; + $unattended = 0; + is capture_stdout { + ok !$sqitch->ask_yes_no('hi'), + qq{ask_yes_no() should return false for "$variant" input}; + }, 'hi ', qq{ask_yes_no() should prompt for "$variant"}; +} + +# Test defaults. +$input = ''; +is capture_stdout { + ok $sqitch->ask_yes_no('whu?', 1), + 'ask_yes_no() should return true for true default' +}, "whu? [$yes] ", 'ask_yes_no() should prompt and show default "Yes"'; +is capture_stdout { + ok !$sqitch->ask_yes_no('whu?', 0), + 'ask_yes_no() should return false for false default' +}, "whu? [$no] ", 'ask_yes_no() should prompt and show default "No"'; + +my $please = __ 'Please answer "y" or "n".'; +$input = 'ha!'; +throws_ok { + is capture_stdout { $sqitch->ask_yes_no('hi') }, + "hi \n$please\nhi \n$please\nhi \n", + 'Should get prompts for repeated bad answers'; +} 'App::Sqitch::X', 'Should get error for bad answers'; +is $@->ident, 'io', 'Bad answers ident should be "IO"'; +is $@->message, __ 'No valid answer after 3 attempts; aborting', + 'Bad answers message should be correct'; + ############################################################################## # Test ask_y_n(). +my $warning; +$sqitch_mock->mock(warn => sub { shift; $warning = "@_" }); throws_ok { $sqitch->ask_y_n } 'App::Sqitch::X', 'Should get error for no ask_y_n message'; is $@->ident, 'DEV', 'No ask_y_n ident should be "DEV"'; -is $@->message, 'ask_y_n() called without a prompt message', +is $@->message, 'ask_yes_no() called without a prompt message', 'No ask_y_n error message should be correct'; +is $warning, 'The ask_y_n() method has been deprecated. Use ask_yes_no() instead.', + 'Should get a deprecation warning from ask_y_n'; throws_ok { $sqitch->ask_y_n('hi', 'b') } 'App::Sqitch::X', 'Should get error for invalid ask_y_n default'; @@ -549,36 +607,42 @@ is $@->ident, 'DEV', 'Invalid ask_y_n default ident should be "DEV"'; is $@->message, 'Invalid default value: ask_y_n() default must be "y" or "n"', 'Invalid ask_y_n default error message should be correct'; -$input = 'y'; +$input = lc substr $yes, 0, 1; $unattended = 0; is capture_stdout { - ok $sqitch->ask_y_n('hi'), 'ask_y_n should return true for "y" input'; + ok $sqitch->ask_y_n('hi'), + qq{ask_y_n should return true for "$input" input} }, 'hi ', 'ask_y_n() should prompt'; -$input = 'no'; +$input = lc substr $no, 0, 1; is capture_stdout { - ok !$sqitch->ask_y_n('howdy'), 'ask_y_n should return false for "no" input'; + ok !$sqitch->ask_y_n('howdy'), + qq{ask_y_n should return false for "$input" input} }, 'howdy ', 'ask_y_n() should prompt for no'; -$input = 'Nein'; +$input = uc substr $no, 0, 1; is capture_stdout { - ok !$sqitch->ask_y_n('howdy'), 'ask_y_n should return false for "Nein"'; + ok !$sqitch->ask_y_n('howdy'), + qq{ask_y_n should return false for "$input" input} }, 'howdy ', 'ask_y_n() should prompt for no'; -$input = 'Yep'; +$input = uc substr $yes, 0, 2; is capture_stdout { - ok $sqitch->ask_y_n('howdy'), 'ask_y_n should return true for "Yep"'; + ok $sqitch->ask_y_n('howdy'), + qq{ask_y_n should return true for "$input" input} }, 'howdy ', 'ask_y_n() should prompt for yes'; $input = ''; is capture_stdout { - ok $sqitch->ask_y_n('whu?', 'y'), 'ask_y_n should return true default "y"'; -}, 'whu? [y] ', 'ask_y_n() should prompt and show default "y"'; + ok $sqitch->ask_y_n('whu?', 'y'), + qq{ask_y_n should return true default "$yes"} +}, "whu? [$yes] ", 'ask_y_n() should prompt and show default "Yes"'; + is capture_stdout { - ok !$sqitch->ask_y_n('whu?', 'n'), 'ask_y_n should return false default "n"'; -}, 'whu? [n] ', 'ask_y_n() should prompt and show default "n"'; + ok !$sqitch->ask_y_n('whu?', 'n'), + qq{ask_y_n should return false default "$no"}; +}, "whu? [$no] ", 'ask_y_n() should prompt and show default "No"'; -my $please = __ 'Please answer "y" or "n".'; $input = 'ha!'; throws_ok { is capture_stdout { $sqitch->ask_y_n('hi') }, diff --git a/t/command.t b/t/command.t index 7c1674052..1b2c85ba4 100644 --- a/t/command.t +++ b/t/command.t @@ -528,8 +528,8 @@ ARGS: { 'Should have error for no engine or target'; is $@->ident, 'target', 'Should have target ident'; is $@->message, __( - 'No engine specified; specify via target or core.engine', - ), 'Should have message about no specified engine'; + 'No project configuration found. Run the "init" command to initialize a project', + ), 'Should have message about no config'; # But it should be okay if we pass an engine or valid target. is_deeply $parsem->(args => ['pg']), diff --git a/t/config.t b/t/config.t index d87d59b29..8c45166ee 100644 --- a/t/config.t +++ b/t/config.t @@ -476,6 +476,9 @@ engine.pg.target=mydb engine.sqlite.client=/opt/local/bin/sqlite3 engine.sqlite.registry=meta engine.sqlite.target=devdb +foo.BAR.baz=hello +guess.Yes.No.calico=false +guess.Yes.No.red=true revert.count=2 revert.revision=1.1 revert.to=gamma @@ -507,6 +510,9 @@ core.pager=less -r core.top_dir=migrations core.uri=https://github.com/sqitchers/sqitch/ engine.pg.client=/usr/local/pgsql/bin/psql +foo.BAR.baz=hello +guess.Yes.No.calico=false +guess.Yes.No.red=true revert.count=2 revert.revision=1.1 revert.to=gamma @@ -775,8 +781,7 @@ throws_ok { $cmd->execute('revert.revision') } 'App::Sqitch::X', is $@->ident, 'config', 'Num int cast exception ident should be "config"'; ok $cmd->execute('bundle.tags_only'), 'Get bundle.tags_only as bool'; -is_deeply \@emit, [[$Config::GitLike::VERSION > 1.08 ? 'true' : 1]], - 'Should have emitted bundle.tags_only as a bool'; +is_deeply \@emit, [['true']], 'Should have emitted bundle.tags_only as a bool'; @emit = (); # Make sure bool-or-int data type works. @@ -797,8 +802,7 @@ is_deeply \@emit, [[1]], @emit = (); ok $cmd->execute('bundle.tags_only'), 'Get bundle.tags_only as bool-or-int'; -is_deeply \@emit, [[$Config::GitLike::VERSION > 1.08 ? 'true' : 1]], - 'Should have emitted bundle.tags_only as a bool'; +is_deeply \@emit, [['true']], 'Should have emitted bundle.tags_only as a bool'; @emit = (); ############################################################################## @@ -903,7 +907,7 @@ throws_ok { $cmd->execute('revert.revision') } 'App::Sqitch::X', is $@->ident, 'config', 'Num int cast exception ident should be "config"'; ok $cmd->execute('bundle.tags_only'), 'Get bundle.tags_only as bool'; -is_deeply \@emit, [['bundle.tags_only=' . ($Config::GitLike::VERSION > 1.08 ? 'true' : 1)]], +is_deeply \@emit, [['bundle.tags_only=true']], 'Should have emitted bundle.tags_only as a bool'; @emit = (); @@ -925,7 +929,7 @@ is_deeply \@emit, [['revert.revision=1']], @emit = (); ok $cmd->execute('bundle.tags_only'), 'Get bundle.tags_only as bool-or-int'; -is_deeply \@emit, [['bundle.tags_only=' . ($Config::GitLike::VERSION > 1.08 ? 'true' : 1)]], +is_deeply \@emit, [['bundle.tags_only=true']], 'Should have emitted bundle.tags_only as a bool'; @emit = (); diff --git a/t/configuration.t b/t/configuration.t index 73a1ab7d0..9dca488dd 100644 --- a/t/configuration.t +++ b/t/configuration.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 22; #use Test::More 'no_plan'; use File::Spec; use Test::Exception; @@ -19,6 +19,9 @@ delete @ENV{qw( SQITCH_CONFIG SQITCH_USER_CONFIG SQITCH_SYSTEM_CONFIG )}; isa_ok my $config = $CLASS->new, $CLASS, 'New config object'; is $config->confname, 'sqitch.conf', 'confname should be "sqitch.conf"'; +ok !$config->initialized, 'Should not be initialized'; + +my $hd = $^O eq 'MSWin32' && "$]" < '5.016' ? $ENV{HOME} || $ENV{USERPROFILE} : (glob('~'))[0]; SKIP: { skip 'System dir can be modified at build time', 1 @@ -29,7 +32,7 @@ SKIP: { } is $config->user_dir, File::Spec->catfile( - File::HomeDir->my_home, '.sqitch' + $hd, '.sqitch' ), 'Default user directory should be correct'; is $config->global_file, File::Spec->catfile( @@ -43,7 +46,7 @@ is $config->global_file, $file, is $config->system_file, $config->global_file, 'system_file should alias global_file'; is $config->user_file, File::Spec->catfile( - File::HomeDir->my_home, '.sqitch', 'sqitch.conf' + $hd, '.sqitch', 'sqitch.conf' ), 'Default user file name should be correct'; $ENV{SQITCH_USER_CONFIG} = $file, @@ -61,6 +64,8 @@ SQITCH_CONFIG: { } chdir 't'; +isa_ok $config = $CLASS->new, $CLASS, 'Another config object'; +ok $config->initialized, 'Should be initialized'; is_deeply $config->get_section(section => 'core'), { engine => "pg", extension => "ddl", @@ -73,3 +78,13 @@ is_deeply $config->get_section(section => 'engine.pg'), { client => "/usr/local/pgsql/bin/psql", }, 'get_section("engine.pg") should work'; +# Make sure it works with irregular casing. +is_deeply $config->get_section(section => 'foo.BAR'), { + baz => 'hello' +}, 'get_section() whould work with capitalized subsection'; + +# Should work with multiple subsections and case-preserved keys. +is_deeply $config->get_section(section => 'guess.Yes.No'), { + red => 'true', + Calico => 'false', +}, 'get_section() whould work with mixed case subsections'; diff --git a/t/engine.t b/t/engine.t index c36b21886..3285ae11d 100644 --- a/t/engine.t +++ b/t/engine.t @@ -1859,7 +1859,7 @@ my @dbchanges; $params; } @changes[0..3]; -MockOutput->ask_y_n_returns(1); +MockOutput->ask_yes_no_returns(1); ok $engine->revert, 'Revert all changes'; is_deeply $engine->seen, [ [deployed_changes => undef], @@ -1873,11 +1873,11 @@ is_deeply $engine->seen, [ [run_file => $dbchanges[0]->revert_file ], [log_revert_change => $dbchanges[0] ], ], 'Should have reverted the changes in reverse order'; -is_deeply +MockOutput->get_ask_y_n, [ +is_deeply +MockOutput->get_ask_yes_no, [ [__x( 'Revert all changes from {destination}?', destination => $engine->destination, - ), 'Yes'], + ), 1], ], 'Should have prompted to revert all changes'; is_deeply +MockOutput->get_info_literal, [ [' - lolz ..', '.........', ' '], @@ -1904,11 +1904,11 @@ is_deeply $engine->seen, [ [log_revert_change => $dbchanges[1] ], [log_revert_change => $dbchanges[0] ], ], 'Log-only Should have reverted the changes in reverse order'; -is_deeply +MockOutput->get_ask_y_n, [ +is_deeply +MockOutput->get_ask_yes_no, [ [__x( 'Revert all changes from {destination}?', destination => $engine->destination, - ), 'Yes'], + ), 1], ], 'Log-only should have prompted to revert all changes'; is_deeply +MockOutput->get_info_literal, [ [' - lolz ..', '.........', ' '], @@ -1924,7 +1924,7 @@ is_deeply +MockOutput->get_info, [ ], 'And the revert successes should be emitted'; # Should exit if the revert is declined. -MockOutput->ask_y_n_returns(0); +MockOutput->ask_yes_no_returns(0); throws_ok { $engine->revert } 'App::Sqitch::X', 'Should abort declined revert'; is $@->ident, 'revert', 'Declined revert ident should be "revert"'; is $@->exitval, 1, 'Should have exited with value 1'; @@ -1932,17 +1932,17 @@ is $@->message, __ 'Nothing reverted', 'Should have exited with proper message'; is_deeply $engine->seen, [ [deployed_changes => undef], ], 'Should have called deployed_changes only'; -is_deeply +MockOutput->get_ask_y_n, [ +is_deeply +MockOutput->get_ask_yes_no, [ [__x( 'Revert all changes from {destination}?', destination => $engine->destination, - ), 'Yes'], + ), 1], ], 'Should have prompt to revert all changes'; is_deeply +MockOutput->get_info, [ ], 'It should have emitted nothing else'; # Revert all changes with no prompt. -MockOutput->ask_y_n_returns(1); +MockOutput->ask_yes_no_returns(1); $engine->log_only(0); $engine->no_prompt(1); ok $engine->revert, 'Revert all changes with no prompt'; @@ -1958,7 +1958,7 @@ is_deeply $engine->seen, [ [run_file => $dbchanges[0]->revert_file ], [log_revert_change => $dbchanges[0] ], ], 'Should have reverted the changes in reverse order'; -is_deeply +MockOutput->get_ask_y_n, [], 'Should have no prompt'; +is_deeply +MockOutput->get_ask_yes_no, [], 'Should have no prompt'; is_deeply +MockOutput->get_info_literal, [ [' - lolz ..', '.........', ' '], @@ -1995,12 +1995,12 @@ is_deeply $engine->seen, [ [run_file => $dbchanges[2]->revert_file ], [log_revert_change => $dbchanges[2] ], ], 'Should have reverted only changes after @alpha'; -is_deeply +MockOutput->get_ask_y_n, [ +is_deeply +MockOutput->get_ask_yes_no, [ [__x( 'Revert changes to {change} from {destination}?', destination => $engine->destination, change => $dbchanges[1]->format_name_with_tags, - ), 'Yes'], + ), 1], ], 'Should have prompt to revert to change'; is_deeply +MockOutput->get_info_literal, [ [' - lolz ..', '.........', ' '], @@ -2011,7 +2011,7 @@ is_deeply +MockOutput->get_info, [ [__ 'ok'], ], 'And the revert successes should be emitted'; -MockOutput->ask_y_n_returns(0); +MockOutput->ask_yes_no_returns(0); $offset_change = $dbchanges[1]; push @resolved => $offset_change->id; throws_ok { $engine->revert('@alpha') } 'App::Sqitch::X', @@ -2024,18 +2024,18 @@ is_deeply $engine->seen, [ [change_offset_from_id => [$dbchanges[1]->id, 0] ], [deployed_changes_since => $dbchanges[1]], ], 'Should have called revert methods'; -is_deeply +MockOutput->get_ask_y_n, [ +is_deeply +MockOutput->get_ask_yes_no, [ [__x( 'Revert changes to {change} from {destination}?', change => $dbchanges[1]->format_name_with_tags, destination => $engine->destination, - ), 'Yes'], + ), 1], ], 'Should have prompt to revert to @alpha'; is_deeply +MockOutput->get_info, [ ], 'It should have emitted nothing else'; # Try to revert just the last change with no prompt -MockOutput->ask_y_n_returns(1); +MockOutput->ask_yes_no_returns(1); $engine->no_prompt(1); my $rev_file = $dbchanges[-1]->revert_file; # Grab before deleting _rework_tags. my $rtags = delete $dbchanges[-1]->{_rework_tags}; # These need to be invisible. @@ -2051,7 +2051,7 @@ is_deeply $engine->seen, [ [run_file => $rev_file ], [log_revert_change => { %{ $dbchanges[-1] }, _rework_tags => $rtags } ], ], 'Should have reverted one changes for @HEAD^'; -is_deeply +MockOutput->get_ask_y_n, [], 'Should have no prompt'; +is_deeply +MockOutput->get_ask_yes_no, [], 'Should have no prompt'; is_deeply +MockOutput->get_info_literal, [ [' - lolz ..', '', ' '], ], 'Output should show what it reverts to'; diff --git a/t/lib/MockOutput.pm b/t/lib/MockOutput.pm index 44821fdf0..5dfe94060 100644 --- a/t/lib/MockOutput.pm +++ b/t/lib/MockOutput.pm @@ -26,14 +26,14 @@ my @mocked = qw( page page_literal prompt - ask_y_n + ask_yes_no ); my $INPUT; sub prompt_returns { $INPUT = $_[1]; } my $Y_N; -sub ask_y_n_returns { $Y_N = $_[1]; } +sub ask_yes_no_returns { $Y_N = $_[1]; } my %CAPTURED; @@ -61,9 +61,9 @@ $MOCK->mock(prompt => sub { return $INPUT; }); -$MOCK->mock(ask_y_n => sub { +$MOCK->mock(ask_yes_no => sub { shift; - push @{ $CAPTURED{ask_y_n} } => [@_]; + push @{ $CAPTURED{ask_yes_no} } => [@_]; return $Y_N; }); diff --git a/t/lib/TestConfig.pm b/t/lib/TestConfig.pm index 7d09086b3..1d396697a 100644 --- a/t/lib/TestConfig.pm +++ b/t/lib/TestConfig.pm @@ -4,14 +4,6 @@ use warnings; use base 'App::Sqitch::Config'; use Path::Class; -BEGIN { - # Circumvent Config::Gitlike bug on Windows. - # https://rt.cpan.org/Ticket/Display.html?id=96670 - if (!$ENV{HOME} && Config::GitLike->VERSION < 1.15) { - $ENV{HOME} = '~'; - } -} - # Creates and returns a new TestConfig, which inherits from # App::Sqitch::Config. Sets nonexistent values for the file locations and # calls update() on remaining args. diff --git a/t/options.t b/t/options.t index e198d6487..62b55be54 100644 --- a/t/options.t +++ b/t/options.t @@ -196,13 +196,14 @@ is_deeply $opts, {}, 'Should have preserved no opts'; CHDIE: { local $! = 9; $chdir_fail = 1; + my $exp_err = do { chdir 'nonesuch'; $! }; throws_ok { $CLASS->_parse_core_opts(['-C', 'nonesuch']) } 'App::Sqitch::X', 'Should get error when chdir fails'; is $@->ident, 'fs', 'Error ident should be "fs"'; is $@->message, __x( 'Cannot change to directory {directory}: {error}', directory => 'nonesuch', - error => 'Bad file descriptor', + error => $exp_err, ), 'Error message should be correct'; } diff --git a/t/snowflake.t b/t/snowflake.t index be8540731..60ce88da7 100644 --- a/t/snowflake.t +++ b/t/snowflake.t @@ -38,10 +38,8 @@ BEGIN { } # Mock the home directory to prevent reading a user config file. -require File::HomeDir; my $tmp_dir = dir tempdir CLEANUP => 1; -my $mock_home = Test::MockModule->new('File::HomeDir'); -$mock_home->mock(my_home => $tmp_dir->stringify); +local $ENV{HOME} = $tmp_dir->stringify; is_deeply [$CLASS->config_vars], [ target => 'any', @@ -76,8 +74,10 @@ my $client = 'snowsql' . (App::Sqitch::ISWIN ? '.exe' : ''); is $snow->client, $client, 'client should default to snowsql'; is $snow->registry, 'sqitch', 'Registry default should be "sqitch"'; -my $exp_uri = sprintf 'db:snowflake://%s.snowflakecomputing.com/%s', - $ENV{SNOWSQL_ACCOUNT}, $sqitch->sysuser; +my $exp_uri = URI->new( + sprintf 'db:snowflake://%s.snowflakecomputing.com/%s', + $ENV{SNOWSQL_ACCOUNT}, $sqitch->sysuser, +)->as_string; is $snow->uri, $exp_uri, 'DB URI should be filled in'; is $snow->destination, $exp_uri, 'Destination should be URI string'; is $snow->registry_destination, $snow->destination, @@ -343,7 +343,7 @@ DBI: { local *DBI::state; ok !$snow->_no_table_error, 'Should have no table error'; ok !$snow->_no_column_error, 'Should have no column error'; - $DBI::state = '02000'; + $DBI::state = '42S02'; ok $snow->_no_table_error, 'Should now have table error'; ok !$snow->_no_column_error, 'Still should have no column error'; $DBI::state = '42703'; diff --git a/t/sqitch.conf b/t/sqitch.conf index 1c5abdb11..ca5c4f9ad 100644 --- a/t/sqitch.conf +++ b/t/sqitch.conf @@ -17,4 +17,8 @@ from = gamma tags_only = true dest_dir = _build/sql - +[foo "BAR"] + baz = hello +[guess "Yes.No"] + red = true + Calico = false diff --git a/t/sqlite.t b/t/sqlite.t index 20372bbeb..45a33a92f 100644 --- a/t/sqlite.t +++ b/t/sqlite.t @@ -52,7 +52,7 @@ is $sqlite->registry_destination, $sqlite->registry_uri->as_string, # Pretend for now that we always have a valid SQLite. my $mock_sqitch = Test::MockModule->new(ref $sqitch); my $sqlite_version = '3.7.12 2012-04-03 19:43:07 86b8481be7e76cccc92d14ce762d21bfb69504af'; -$mock_sqitch->mock(probe => sub { $sqlite_version }); +$mock_sqitch->mock(capture => sub { return $sqlite_version }); my @std_opts = ( '-noheader', @@ -190,13 +190,12 @@ $target = App::Sqitch::Target->new( ok $sqlite = $CLASS->new(sqitch => $sqitch, target => $target ), 'Instantiate with a temporary database file'; can_ok $sqlite, qw(_read); -my $quote = App::Sqitch::ISWIN ? sub { $sqitch->quote_shell(shift) } : sub { shift }; SKIP: { skip 'DBD::SQLite not available', 3 unless $have_sqlite; - is $sqlite->_read('foo'), $quote->(q{.read 'foo'}), '_read() should work'; - is $sqlite->_read('foo bar'), $quote->(q{.read 'foo bar'}), + is $sqlite->_read('foo'), q{.read 'foo'}, '_read() should work'; + is $sqlite->_read('foo bar'), q{.read 'foo bar'}, '_read() should SQL-quote the file name'; - is $sqlite->_read('foo \'bar\''), $quote->(q{.read 'foo ''bar'''}), + is $sqlite->_read('foo \'bar\''), q{.read 'foo ''bar'''}, '_read() should SQL-quote quotes, too'; } @@ -206,7 +205,7 @@ can_ok $sqlite, qw(_run _capture _spool); my (@run, @capture, @spool); $mock_sqitch->mock(run => sub { shift; @run = @_ }); -$mock_sqitch->mock(capture => sub { shift; @capture = @_ }); +$mock_sqitch->mock(capture => sub { shift; @capture = @_; return $sqlite_version }); $mock_sqitch->mock(spool => sub { shift; @spool = @_ }); ok $sqlite->_run(qw(foo bar baz)), 'Call _run'; @@ -225,7 +224,7 @@ is_deeply \@capture, [$sqlite->sqlite3, qw(foo bar baz)], SKIP: { skip 'DBD::SQLite not available', 2 unless $have_sqlite; ok $sqlite->run_file('foo/bar.sql'), 'Run foo/bar.sql'; - is_deeply \@run, [$sqlite->sqlite3, $quote->(".read 'foo/bar.sql'")], + is_deeply \@run, [$sqlite->sqlite3, ".read 'foo/bar.sql'"], 'File should be passed to run()'; } @@ -238,12 +237,12 @@ SKIP: { # Verify should go to capture unless verosity is > 1. ok $sqlite->run_verify('foo/bar.sql'), 'Verify foo/bar.sql'; - is_deeply \@capture, [$sqlite->sqlite3, $quote->(".read 'foo/bar.sql'")], + is_deeply \@capture, [$sqlite->sqlite3, ".read 'foo/bar.sql'"], 'Verify file should be passed to capture()'; $mock_sqitch->mock(verbosity => 2); ok $sqlite->run_verify('foo/bar.sql'), 'Verify foo/bar.sql again'; - is_deeply \@run, [$sqlite->sqlite3, $quote->(".read 'foo/bar.sql'")], + is_deeply \@run, [$sqlite->sqlite3, ".read 'foo/bar.sql'"], 'Verifile file should be passed to run() for high verbosity'; } @@ -313,6 +312,21 @@ for my $v (qw( $mock_sqitch->unmock_all; +############################################################################## +# Test against extra newline in capture. +$sqlite_version = '3.7.12 2012-04-03 19:43:07 86b8481be7e76cccc92d14ce762d21bfb69504af'; +$mock_sqitch->mock(capture => sub { return ( "\n",$sqlite_version) }); +{ + ok my $sqlite = $CLASS->new( + sqitch => $sqitch, + target => $target, + ), "Create command for v3.7.12 with newline"; + ok $sqlite->sqlite3, "Should be okay with sqlite version v3.7.12 with newline"; +} + +# Un-mock for live tests below +$mock_sqitch->unmock_all; + ############################################################################## my $alt_db = $db_name->dir->file('sqitchtest.db'); # Can we do live tests? @@ -346,7 +360,7 @@ DBIEngineTest->run( die "SQLite >= 3.7.11 required; DBD::SQLite built with $version\n" unless $v[0] > 3 || ($v[0] == 3 && ($v[1] > 7 || ($v[1] == 7 && $v[2] >= 11))); - $version = (split / / => $self->sqitch->probe( $self->client, '-version' ))[0]; + $version = (split / / => scalar $self->sqitch->capture( $self->client, '-version' ))[0]; @v = split /[.]/ => $version; die "SQLite >= 3.3.9 required; CLI is $version\n" unless $v[0] > 3 || ($v[0] == 3 && ($v[1] > 3 || ($v[1] == 3 && $v[2] >= 9))); diff --git a/t/target.t b/t/target.t index af8081d74..075a46585 100644 --- a/t/target.t +++ b/t/target.t @@ -208,8 +208,19 @@ CONSTRUCTOR: { 'Should have error for no engine or target'; is $@->ident, 'target', 'Should have target ident'; is $@->message, __( - 'No engine specified; specify via target or core.engine', - ), 'Should have message about no specified engine'; + 'No project configuration found. Run the "init" command to initialize a project', + ), 'Should have message about no configuration'; + + # Try it with a config file but no engine config. + MOCK: { + my $mock_init = TestConfig->mock(initialized => 1); + throws_ok { $CLASS->new(sqitch => $sqitch) } 'App::Sqitch::X', + 'Should again have error for no engine or target'; + is $@->ident, 'target', 'Should have target ident again'; + is $@->message, __( + 'No engine specified; specify via target or core.engine', + ), 'Should have message about no specified engine'; + } # Try with engine-less URI. @get_params = (); diff --git a/xt/release/pod-spelling.t b/xt/release/pod-spelling.t index 927d234dc..5dc82e296 100644 --- a/xt/release/pod-spelling.t +++ b/xt/release/pod-spelling.t @@ -115,3 +115,5 @@ sql sys SnowSQL DML +Blockchain +Merkle