From f6842941f37a88448030b20192f0a6be87858f5b Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Thu, 22 Oct 2009 22:40:18 +0200 Subject: [PATCH 01/11] Bumped version number to 1.8.4 --- ChangeLog | 6 ++++-- configure.ac | 2 +- doc/man/task-tutorial.5 | 2 +- doc/man/task.1 | 2 +- doc/man/taskrc.5 | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0fa12c22..ee707fa45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,13 @@ ------ current release --------------------------- -1.8.3 (10/21/2009) bcdcbeeea0d92f21c3565aebfaf6332b959f4025 - + Added support for Haiku R1/alpha1 +1.8.4 () ------ old releases ------------------------------ +1.8.3 (10/21/2009) bcdcbeeea0d92f21c3565aebfaf6332b959f4025 + + Added support for Haiku R1/alpha1 + 1.8.2 (9/7/2009) f243f0ed443ecd7dde779de8a6525222591024db + Added feature #282 that returns useful exit codes to the shell. Now a script can detect whether no tasks were returned by a report (thanks to diff --git a/configure.ac b/configure.ac index 6ffdd1329..5ea8aff72 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(task, 1.8.3, support@taskwarrior.org) +AC_INIT(task, 1.8.4, support@taskwarrior.org) CFLAGS="${CFLAGS=}" CXXFLAGS="${CXXFLAGS=}" diff --git a/doc/man/task-tutorial.5 b/doc/man/task-tutorial.5 index 85acc0958..d71286f6e 100644 --- a/doc/man/task-tutorial.5 +++ b/doc/man/task-tutorial.5 @@ -1,4 +1,4 @@ -.TH task-tutorial 5 2009-10-21 "task 1.8.3" "User Manuals" +.TH task-tutorial 5 2009-10-21 "task 1.8.4" "User Manuals" .SH NAME task-tutorial \- A tutorial for the task(1) command line todo manager. diff --git a/doc/man/task.1 b/doc/man/task.1 index a10efec25..3abb92065 100644 --- a/doc/man/task.1 +++ b/doc/man/task.1 @@ -1,4 +1,4 @@ -.TH task 1 2009-10-21 "task 1.8.3" "User Manuals" +.TH task 1 2009-10-21 "task 1.8.4" "User Manuals" .SH NAME task \- A command line todo manager. diff --git a/doc/man/taskrc.5 b/doc/man/taskrc.5 index c1a9997c1..973d2ba0d 100644 --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -1,4 +1,4 @@ -.TH taskrc 5 2009-10-21 "task 1.8.3" "User Manuals" +.TH taskrc 5 2009-10-21 "task 1.8.4" "User Manuals" .SH NAME taskrc \- Configuration file for the task(1) command From 77dd9305749d32a2bd4efe7fa024c9c3e3ab913c Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Thu, 5 Nov 2009 21:36:46 +0100 Subject: [PATCH 02/11] Fixed bug in regexp matching of whitespace between month and year. --- src/tests/cal.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/cal.t b/src/tests/cal.t index 93c2e5bac..78b081ec2 100755 --- a/src/tests/cal.t +++ b/src/tests/cal.t @@ -58,7 +58,7 @@ if ( $day <= 9) # task cal and task cal y my $output = qx{../task rc:cal.rc rc._forcecolor:on cal}; like ($output, qr/\[36m$day/, 'Current day is highlighted'); -like ($output, qr/$month.* $year/, 'Current month and year are displayed'); +like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed'); qx{../task rc:cal.rc add zero}; unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present'); unlike ($output, qr/\[43m\d+/, 'No due tasks are present'); @@ -67,9 +67,9 @@ like ($output, qr/Su Mo Tu/, 'Week starts on Sunday'); $output = qx{../task rc:cal.rc rc.weekstart:Monday cal}; like ($output, qr/Fr Sa Su/, 'Week starts on Monday'); $output = qx{../task rc:cal.rc cal y}; -like ($output, qr/$month.* $year/, 'Current month and year are displayed'); -like ($output, qr/$prevmonth.* $nextyear/, 'Month and year one year ahead are displayed'); -unlike ($output, qr/$month.* $nextyear/, 'Current month and year ahead are not displayed'); +like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed'); +like ($output, qr/$prevmonth\w+?\s+?$nextyear/, 'Month and year one year ahead are displayed'); +unlike ($output, qr/$month\w+?\s+?$nextyear/, 'Current month and year ahead are not displayed'); # task cal due and task cal due y qx{../task rc:cal.rc add due:20190515 one}; From 5b96dbbce8fe9e297e4e531447983cd39e15affe Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 9 Nov 2009 18:16:58 -0500 Subject: [PATCH 03/11] Bug Fix - wait date editing - The "wait" date was not being properly formatted, as are all the other dates, in the "edit" command. The result is that an epoch integer date was rendered, instead of something readable and in the preferred format. --- ChangeLog | 2 ++ src/edit.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee707fa45..fdc824bd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ ------ current release --------------------------- 1.8.4 () + + Fixed bug that caused wait: dates to not be properly rendered in a + readable and preferred format with the "edit" command. ------ old releases ------------------------------ diff --git a/src/edit.cpp b/src/edit.cpp index c7e1e94fd..48112538d 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -150,7 +150,7 @@ static std::string formatTask (Task task) << " Due: " << formatDate (task, "due") << std::endl << " Until: " << formatDate (task, "until") << std::endl << " Recur: " << task.get ("recur") << std::endl - << " Wait until: " << task.get ("wait") << std::endl + << " Wait until: " << formatDate (task, "wait") << std::endl << " Parent: " << task.get ("parent") << std::endl << " Foreground color: " << task.get ("fg") << std::endl << " Background color: " << task.get ("bg") << std::endl From 64bc2a165ac7e405b236d5c169308a6ce25c9ded Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 9 Nov 2009 22:35:51 -0500 Subject: [PATCH 04/11] Bug fix - hang on cygwin when task updated. - Fixed bug that caused a hang on cygwin, when a task with multiple annotations was edited (thanks to Joe Pulliam). --- ChangeLog | 2 ++ src/Task.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fdc824bd1..a4915eed0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ 1.8.4 () + Fixed bug that caused wait: dates to not be properly rendered in a readable and preferred format with the "edit" command. + + Fixed bug that caused a hang on cygwin, when a task with multiple + annotations was edited (thanks to Joe Pulliam). ------ old releases ------------------------------ diff --git a/src/Task.cpp b/src/Task.cpp index 68bf75766..2d184cfde 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -441,10 +441,14 @@ void Task::addAnnotation (const std::string& description) void Task::removeAnnotations () { // Erase old annotations. - Record::iterator i; - for (i = this->begin (); i != this->end (); ++i) + Record::iterator i = this->begin (); + while (i != this->end ()) + { if (i->first.substr (0, 11) == "annotation_") // No i18n - this->erase (i); + this->erase (i++); + else + i++; + } } //////////////////////////////////////////////////////////////////////////////// From 30c6dd004762c2ebf7a3690fb51e657bacb00863 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Fri, 13 Nov 2009 23:32:40 +0100 Subject: [PATCH 05/11] Added Joe to AUTHORS file --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index c764f5bd5..b915c7842 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,3 +39,4 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges Thomas@BIC Ian Mortimer Zach Frazier + Joe Pulliam From 6e673d2834e6ceb336fe0f866e44bf8b3d807967 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 16 Nov 2009 22:10:47 -0500 Subject: [PATCH 06/11] Bug Fix - #313 Edit command fails when data.location includes spaces - Applied patch from Cory Donnelly. --- AUTHORS | 1 + ChangeLog | 2 ++ src/edit.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index b915c7842..291ddc51b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,6 +18,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Johan Friis Steven de Brouwer Pietro Cerutti + Cory Donnelly Thanks to the following, who submitted detailed bug reports and excellent suggestions: Eugene Kramer diff --git a/ChangeLog b/ChangeLog index a4915eed0..f5a64adb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ readable and preferred format with the "edit" command. + Fixed bug that caused a hang on cygwin, when a task with multiple annotations was edited (thanks to Joe Pulliam). + + Fixed bug #314 where the edit command fails when data.location includes + directories containing spaces (thanks to Cory Donnelly). ------ old releases ------------------------------ diff --git a/src/edit.cpp b/src/edit.cpp index 48112538d..f8219e46d 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -543,7 +543,7 @@ void editFile (Task& task) // Complete the command line. editor += " "; - editor += file.str (); + editor += "\"" + file.str () + "\""; ARE_THESE_REALLY_HARMFUL: // Launch the editor. From bc40ab63b3ee89b4e97cbace8d137f65509b3071 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 16 Nov 2009 23:24:47 -0500 Subject: [PATCH 07/11] Bug Fix - #312 Changing one task changes another - Added a warning when modifying recurring tasks, that all instances of that task may be modified. When task confirms a bulk edit the recurrence is again indicated (thanks to Cory Donnelly). --- ChangeLog | 3 +++ src/Permission.cpp | 11 +++++++++-- src/Task.cpp | 2 +- src/command.cpp | 7 +++++++ src/task.h | 2 +- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5a64adb9..5458ec98c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ annotations was edited (thanks to Joe Pulliam). + Fixed bug #314 where the edit command fails when data.location includes directories containing spaces (thanks to Cory Donnelly). + + Added a warning (issue #312) when modifying recurring tasks, that all + instances of that task may be modified. When task confirms a bulk edit + the recurrence is again indicated (thanks to Cory Donnelly). ------ old releases ------------------------------ diff --git a/src/Permission.cpp b/src/Permission.cpp index 6058cbd03..d70c22b1d 100644 --- a/src/Permission.cpp +++ b/src/Permission.cpp @@ -57,8 +57,15 @@ bool Permission::confirmed (const Task& task, const std::string& question) << task.id << " \"" << task.get ("description") - << "\"" - << std::endl; + << "\""; + + if (task.getStatus () == Task::recurring || + task.has ("parent")) + { + std::cout << " (Recurring)"; + } + + std::cout << std::endl; int answer = confirm3 (question); if (answer == 2) diff --git a/src/Task.cpp b/src/Task.cpp index 2d184cfde..c8c9d6e07 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -134,7 +134,7 @@ void Task::setEntry () } //////////////////////////////////////////////////////////////////////////////// -Task::status Task::getStatus () +Task::status Task::getStatus () const { return textToStatus (get ("status")); // No i18n } diff --git a/src/command.cpp b/src/command.cpp index fd893f79e..490a7bac2 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -958,6 +958,13 @@ int handleModify (std::string &outs) task->get ("parent") == other->get ("parent")) || // Sibling other->get ("uuid") == task->get ("parent")) // Parent { + if (task->has ("parent")) + std::cout << "Task " + << task->id + << " is a recurring task, and all other instances of this" + << " task may be modified." + << std::endl; + Task before (*other); // A non-zero value forces a file write. diff --git a/src/task.h b/src/task.h index 6e51f3e4b..d9162422c 100644 --- a/src/task.h +++ b/src/task.h @@ -57,7 +57,7 @@ public: void setEntry (); - status getStatus (); + status getStatus () const; void setStatus (status); int getTagCount (); From 7aa0c3698ab94079825c6a0657cb3f4a8cc76e01 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 16 Nov 2009 23:42:00 -0500 Subject: [PATCH 08/11] HACK - case-insensitive file system problem again. --- src/task.h | 83 ------------------------------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 src/task.h diff --git a/src/task.h b/src/task.h deleted file mode 100644 index d9162422c..000000000 --- a/src/task.h +++ /dev/null @@ -1,83 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// task - a command line task list manager. -// -// Copyright 2006 - 2009, Paul Beckingham. -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free Software -// Foundation; either version 2 of the License, or (at your option) any later -// version. -// -// This program is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -// details. -// -// You should have received a copy of the GNU General Public License along with -// this program; if not, write to the -// -// Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, -// Boston, MA -// 02110-1301 -// USA -// -//////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDED_TASK -#define INCLUDED_TASK - -#include -#include "Record.h" -#include "Subst.h" -#include "Sequence.h" - -class Task : public Record -{ -public: - Task (); // Default constructor - Task (const Task&); // Copy constructor - Task& operator= (const Task&); // Assignment operator - bool operator== (const Task&); // Comparison operator - Task (const std::string&); // Parse - ~Task (); // Destructor - - void parse (const std::string&); - std::string composeCSV () const; - - // Status values. - enum status {pending, completed, deleted, recurring, waiting}; - - // Public data. - int id; - - // Series of helper functions. - static status textToStatus (const std::string&); - static std::string statusToText (status); - - void setEntry (); - - status getStatus () const; - void setStatus (status); - - int getTagCount (); - bool hasTag (const std::string&); - void addTag (const std::string&); - void addTags (const std::vector &); - void getTags (std::vector&) const; - void removeTag (const std::string&); - - void getAnnotations (std::vector &) const; - void setAnnotations (const std::vector &); - void addAnnotation (const std::string&); - void removeAnnotations (); - - void validate () const; - -private: - int determineVersion (const std::string&); - void legacyParse (const std::string&); -}; - -#endif -//////////////////////////////////////////////////////////////////////////////// From 39d9f235de990f430218b02dbd0a4a66fdc373cf Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 16 Nov 2009 23:42:32 -0500 Subject: [PATCH 09/11] HACK - case-insensitive file system problem again. --- src/Task.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Task.h b/src/Task.h index 6e51f3e4b..d9162422c 100644 --- a/src/Task.h +++ b/src/Task.h @@ -57,7 +57,7 @@ public: void setEntry (); - status getStatus (); + status getStatus () const; void setStatus (status); int getTagCount (); From 12c4983936d27317df100f05da8244139dd06a3f Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Tue, 17 Nov 2009 12:00:36 +0100 Subject: [PATCH 10/11] Release date for 1.8.4 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5458ec98c..94a4ac40b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ ------ current release --------------------------- -1.8.4 () +1.8.4 (11/17/2009) + Fixed bug that caused wait: dates to not be properly rendered in a readable and preferred format with the "edit" command. + Fixed bug that caused a hang on cygwin, when a task with multiple From 847a8b6d493ab4fe4db283985cf11177155e0106 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Wed, 18 Nov 2009 09:56:14 +0100 Subject: [PATCH 11/11] Added SHA1 of taged release commit --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94a4ac40b..c0c8e4329 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ ------ current release --------------------------- -1.8.4 (11/17/2009) +1.8.4 (11/17/2009) 12c4983936d27317df100f05da8244139dd06a3f + Fixed bug that caused wait: dates to not be properly rendered in a readable and preferred format with the "edit" command. + Fixed bug that caused a hang on cygwin, when a task with multiple