Transport Errors

- The 'push' and 'pull' commands now properly distinguish between a missing
  transport utility and other errors (thanks to Russell Steicke).
This commit is contained in:
Paul Beckingham 2013-03-03 09:34:54 -05:00
parent 1428a4135b
commit c978b2b65a
11 changed files with 98 additions and 93 deletions

View file

@ -82,6 +82,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
Vincent Petithory Vincent Petithory
Rainer Müller Rainer Müller
Jakub Wilk Jakub Wilk
Russell Steicke
Thanks to the following, who submitted detailed bug reports and excellent Thanks to the following, who submitted detailed bug reports and excellent
suggestions: suggestions:

View file

@ -35,6 +35,8 @@ Features
+ Fixed the mechanism used for selecting translations (thanks to Fidel Mato). + Fixed the mechanism used for selecting translations (thanks to Fidel Mato).
+ Added new export script: export-tsv.pl. + Added new export script: export-tsv.pl.
+ Added the configuration variable 'print.empty.columns'. + Added the configuration variable 'print.empty.columns'.
+ The 'push' and 'pull' commands now properly distinguish between a missing
transport utility and other errors (thanks to Russell Steicke).
Bugs Bugs
+ Fixed bug #642, so that the default 'data.location=~/.task' preserves the + Fixed bug #642, so that the default 'data.location=~/.task' preserves the

1
NEWS
View file

@ -11,6 +11,7 @@ New Features in taskwarrior 2.2.0
- The 'columns' command now supports search term for the column name. - The 'columns' command now supports search term for the column name.
- New date shortcuts, 'socm' and 'eocm', meaning start and end of current - New date shortcuts, 'socm' and 'eocm', meaning start and end of current
month. month.
- Improved error messages for 'push' and 'pull' transport problems.
New commands in taskwarrior 2.2.0 New commands in taskwarrior 2.2.0

View file

@ -93,7 +93,8 @@ int Transport::execute()
} }
int result = ::execute (_executable, _arguments); int result = ::execute (_executable, _arguments);
int err; int err;
switch (result) { switch (result)
{
case 127: case 127:
throw format (STRING_TRANSPORT_NORUN, _executable); throw format (STRING_TRANSPORT_NORUN, _executable);
case -1: case -1:

View file

@ -853,16 +853,16 @@
#define STRING_TEXT_AMBIGUOUS "Ambiguo {1} '{2}' - puede ser " #define STRING_TEXT_AMBIGUOUS "Ambiguo {1} '{2}' - puede ser "
// Transport // Transport
#define STRING_TRANSPORT_NORUN "Could not run '{1}'. Is it installed, and available in $PATH?" #define STRING_TRANSPORT_NORUN "No se pudo lanzar '{1}'. ¿Está instalado y disponible en $PATH?"
#define STRING_TRANSPORT_NOFORK "Could not run '{1}': {2}. Are you out of system resources?" #define STRING_TRANSPORT_NOFORK "Could not run '{1}': {2}. Are you out of system resources?"
#define STRING_TRANSPORT_URI_NODIR "El uri '{1}' no parece ser un directorio." #define STRING_TRANSPORT_URI_NODIR "El uri '{1}' no parece ser un directorio."
#define STRING_TRANSPORT_CURL_URI "Cuando se usa el protocolo 'curl' el uri debe contener un nombre de máquina." #define STRING_TRANSPORT_CURL_URI "Cuando se usa el protocolo 'curl' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_CURL_WILDCD "Cuando se usa el protocolo 'curl' no están soportados los comodines." #define STRING_TRANSPORT_CURL_WILDCD "Cuando se usa el protocolo 'curl' no están soportados los comodines."
#define STRING_TRANSPORT_CURL_FAIL "Curl falló, consulte los mensajes precedentes." #define STRING_TRANSPORT_CURL_FAIL "Curl falló, consulte los mensajes precedentes."
#define STRING_TRANSPORT_RSYNC_URI "Cuando se usa el protocolo 'rsync' el uri debe contener un nombre de máquina." #define STRING_TRANSPORT_RSYNC_URI "Cuando se usa el protocolo 'rsync' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_RSYNC_FAIL "rsync failed, see output above." #define STRING_TRANSPORT_RSYNC_FAIL "Rsync falló, consulte los mensajes precedentes."
#define STRING_TRANSPORT_SSH_URI "Cuando se usa el protocolo 'ssh' el uri debe contener un nombre de máquina." #define STRING_TRANSPORT_SSH_URI "Cuando se usa el protocolo 'ssh' el uri debe contener un nombre de máquina."
#define STRING_TRANSPORT_SSH_FAIL "ssh failed, see output above." #define STRING_TRANSPORT_SSH_FAIL "Ssh falló, consulte los mensajes precedentes."
// Uri // Uri
#define STRING_URI_QUOTES "No se pudo interpretar el uri '{1}', uso erróneo de comillas simples." #define STRING_URI_QUOTES "No se pudo interpretar el uri '{1}', uso erróneo de comillas simples."

View file

@ -41,12 +41,12 @@ if (open my $fh, '>', 'bug.rc')
# Bug 668: URL should allow users with dot character # Bug 668: URL should allow users with dot character
my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data 2>&1}; my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data 2>&1};
like ($output, qr/^Could not run ssh. Is it installed, and available in \$PATH\?$/m, 'ssh does not connect'); like ($output, qr/ssh failed/, 'ssh does not connect');
unlike ($output, qr/not a valid modifier/, 'scp syntax with dots'); unlike ($output, qr/not a valid modifier/, 'scp syntax with dots');
unlike ($output, qr/not in the expected format/, 'scp syntax with dots'); unlike ($output, qr/not in the expected format/, 'scp syntax with dots');
$output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data 2>&1}; $output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data 2>&1};
like ($output, qr/^Could not run ssh. Is it installed, and available in \$PATH\?$/m, 'ssh does not connect'); like ($output, qr/ssh failed/, 'ssh does not connect');
unlike ($output, qr/not a valid modifier/, 'standard syntax with dots'); unlike ($output, qr/not a valid modifier/, 'standard syntax with dots');
unlike ($output, qr/not in the expected format/, 'standard syntax with dots'); unlike ($output, qr/not in the expected format/, 'standard syntax with dots');