- Fixed bug #1031, which kept expanding aliases after the '--' operator (thanks
  to Jim B).
- Cleaned up mess in the ChangeLog, which should list features before bugs,
  reported issues before ad hoc issues, and in ascending numerical order.
This commit is contained in:
Paul Beckingham 2012-09-26 23:06:42 -04:00
parent 9fb15b0d7d
commit 61ccccabd8
4 changed files with 97 additions and 16 deletions

View file

@ -155,4 +155,5 @@ suggestions:
Marek Vitek Marek Vitek
Rene Vergara Rene Vergara
Stéphane Pezennec Stéphane Pezennec
Jim B

View file

@ -1,19 +1,12 @@
------ current release --------------------------- ------ current release ---------------------------
2.1.2 (2012-09-18) 1e3176ed70d2b50faf03838d0df279b2a4ae93b2 2.2.0 () -
Bugs
+ Fix bug #1056, where CmdSummary did not print abstract parents.
+ Bug fix release regarding #1104, which causes duplicate UUIDs during
the merge command.
+ Fixed bug where shadow files are not properly created when there is a missing
.taskrc file (thanks to Pietro Cerutti).
Features Features
+ The 'projects' command now outputs abstract parents and reduces
repetition by not printing parent names in front of children names.
+ Added Feature #1069, which gives a clearer error when a UDA + Added Feature #1069, which gives a clearer error when a UDA
is added without the uda.<uda-name>.type variable. is added without the uda.<uda-name>.type variable.
+ The 'projects' command now outputs abstract parents and reduces
repetition by not printing parent names in front of children names.
+ Added framework for testing bash autocompletion. + Added framework for testing bash autocompletion.
+ New helper command '_aliases' for autocompletion purposes. + New helper command '_aliases' for autocompletion purposes.
+ Stop consider new tasks after quitting a bulk change. + Stop consider new tasks after quitting a bulk change.
@ -23,26 +16,39 @@ Features
+ Virtual tags. + Virtual tags.
Bugs Bugs
+ No more bash completion of, for example, 'projABC:', or of 'proj:' if + Fixed bug #1031, which kept expanding aliases after the '--' operator (thanks
abbreviation.minimum is greater than 4. to Jim B).
+ Fixed bug #1059, where CmdEdit was running garbage collection.
+ Fixed bug #1065, where CmdShow issued messages in incorrect situations.
+ Fixed bug #1060, where an error was not thrown correctly.
+ Fixed bug #1043, where aliases were not recognized by bash autocompletion.
+ Fixed bug #1038, which prints blank lines with bulk changes and when the + Fixed bug #1038, which prints blank lines with bulk changes and when the
verbose attributes does not specify it. Lines do a better separation between verbose attributes does not specify it. Lines do a better separation between
each changes also. each changes also.
+ Fixed bug #1042, where the 'diagnostics' command failed to detect missing + Fixed bug #1042, where the 'diagnostics' command failed to detect missing
external utilities on Solaris and NetBSD. external utilities on Solaris and NetBSD.
+ Fixed bug #1043, where aliases were not recognized by bash autocompletion.
+ Fixed bug #1044, where 'task projects' considers newly deleted tasks and + Fixed bug #1044, where 'task projects' considers newly deleted tasks and
provides an incorrect summary. provides an incorrect summary.
+ Fixed bug #1048, which segfaulted rather than complain about syntax (thanks + Fixed bug #1048, which segfaulted rather than complain about syntax (thanks
to Bryce Harrington, Štěpán Henek). to Bryce Harrington, Štěpán Henek).
+ Fixed bug #1056, where CmdSummary did not print abstract parents.
+ Fixed bug #1059, where CmdEdit was running garbage collection.
+ Fixed bug #1060, where an error was not thrown correctly.
+ Fixed bug #1065, where CmdShow issued messages in incorrect situations.
+ Partially fixed #1083, which showed 'task 0 ...' when modifying a non- + Partially fixed #1083, which showed 'task 0 ...' when modifying a non-
pending task (thanks to Aikido Guy). pending task (thanks to Aikido Guy).
+ No more bash completion of, for example, 'projABC:', or of 'proj:' if
abbreviation.minimum is greater than 4.
+ Fixed bug where shadow files are not properly created when there is a missing
.taskrc file (thanks to Pietro Cerutti).
------ old releases ------------------------------ ------ old releases ------------------------------
2.1.2 (2012-09-18) 1e3176ed70d2b50faf03838d0df279b2a4ae93b2
Bugs
+ Bug fix release regarding #1104, which causes duplicate UUIDs during
the merge command.
+ Fixed bug where shadow files are not properly created when there is a missing
.taskrc file (thanks to Pietro Cerutti).
2.1.1 (2012-07-24) 46c5f8b826838ce96d9df7fcd3039de3c43483dd 2.1.1 (2012-07-24) 46c5f8b826838ce96d9df7fcd3039de3c43483dd
Bugs Bugs

View file

@ -384,6 +384,10 @@ void A3::resolve_aliases ()
std::vector <Arg>::iterator arg; std::vector <Arg>::iterator arg;
for (arg = this->begin (); arg != this->end (); ++arg) for (arg = this->begin (); arg != this->end (); ++arg)
{ {
// The -- operator stops alias expansion.
if (arg->_raw == "--")
break;
std::map <std::string, std::string>::iterator match = std::map <std::string, std::string>::iterator match =
context.aliases.find (arg->_raw); context.aliases.find (arg->_raw);
@ -408,6 +412,10 @@ void A3::resolve_aliases ()
expanded.push_back (arg->_raw); expanded.push_back (arg->_raw);
} }
// Copy any residual tokens.
for (; arg != this->end (); ++arg)
expanded.push_back (arg->_raw);
// Only overwrite if something happened. // Only overwrite if something happened.
if (something) if (something)
{ {

66
test/bug.1031.t Executable file
View file

@ -0,0 +1,66 @@
#! /usr/bin/env perl
################################################################################
## taskwarrior - a command line task list manager.
##
## Copyright 2006-2012, Paul Beckingham, Federico Hernandez.
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included
## in all copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
## SOFTWARE.
##
## http://www.opensource.org/licenses/mit-license.php
##
################################################################################
use strict;
use warnings;
use Test::More tests => 5;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n",
"alias.from=to\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}
# Bug 1031: -- does not bypass aliasing
qx{../src/task rc:bug.rc add from 2>&1};
qx{../src/task rc:bug.rc add from -- to 2>&1};
qx{../src/task rc:bug.rc add to -- from 2>&1};
my $output = qx{../src/task rc:bug.rc 1 info 2>&1};
like ($output, qr/Description\s+to$/ms, "'from' --> 'to'");
$output = qx{../src/task rc:bug.rc 2 info 2>&1};
like ($output, qr/Description\s+to to$/ms, "'from -- to' --> 'to to'");
$output = qx{../src/task rc:bug.rc 3 info 2>&1};
like ($output, qr/Description\s+to from$/ms, "'to -- from' --> 'to from'");
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch.key' &&
! -r 'bug.rc', 'Cleanup');
exit 0;