From ffa1bac19320dd9e02b7ffb60b4e811d643cf0d6 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 24 Oct 2010 23:49:15 -0400 Subject: [PATCH 1/6] Unit Tests - Corrected test to match newly modified error message. --- src/tests/wait.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/wait.t b/src/tests/wait.t index 34dc00f63..095657809 100755 --- a/src/tests/wait.t +++ b/src/tests/wait.t @@ -76,7 +76,7 @@ like ($output, qr/tomorrow/ms, 'waiting task visible when specifically queried') # Message is 'Warning: the wait date falls after the due date.' $output = qx{../task rc:wait.rc add Complain due:today wait:tomorrow}; -like ($output, qr/A 'wait' date must be after a 'due' date\./, 'error on wait after due'); +like ($output, qr/A 'wait' date must be before a 'due' date\./, 'error on wait after due'); # Cleanup. unlink 'pending.data'; From 488b23f42f07b82c323d51ae22d54e1f2dea5a90 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 25 Oct 2010 00:37:56 -0400 Subject: [PATCH 2/6] Bug - Flipped the test and error message for wait dates that must be before due dates. --- src/Task.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index 82765b813..6b4e787fe 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -647,8 +647,8 @@ void Task::validate () const if (has ("wait")) { Date wait (::atoi (get ("wait").c_str ())); - if (wait < due) - throw std::string ("A 'wait' date must be after a 'due' date."); + if (wait > due) + throw std::string ("A 'wait' date must be before a 'due' date."); } Date entry (::atoi (get ("entry").c_str ())); From a5123dd2b7328d4ada32fedd726c403da615688b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 25 Oct 2010 00:49:42 -0400 Subject: [PATCH 3/6] Bug - Now CYGWIN has special handling for srand/srandom. --- src/main.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1120fb8f9..5eee15123 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,13 @@ #include #include + +#ifdef CYGWIN #include +#else +#include +#endif + #include "Context.h" #include "../auto.h" @@ -36,10 +42,20 @@ Context context; int main (int argc, char** argv) { // Set up randomness. -#ifdef HAVE_SRANDOM +#ifdef CYGWIN + #ifdef HAVE_SRANDOM srandom (time (NULL)); -#else + #else srand (time (NULL)); + #endif +#else + #ifdef HAVE_SRANDOM + struct timeval tv; + gettimeofday (&tv, NULL); + srandom (tv.tv_usec); + #else + srand (tv.tv_usec); + #endif #endif int status = 0; From 6dca4dd056f2e0d25c977fe159b98bf09422980c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 25 Oct 2010 01:15:17 -0400 Subject: [PATCH 4/6] Code Cleanup - Simplified one call. --- src/recur.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recur.cpp b/src/recur.cpp index e8d06eafe..c54955f65 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -105,7 +105,7 @@ void handleRecurrence () sprintf (dueDate, "%u", (unsigned int) d->toEpoch ()); rec.set ("due", dueDate); // Store generated due date. - if (t->get ("wait").size()) + if (t->has ("wait")) { Date old_wait (atoi (t->get ("wait").c_str ())); Date old_due (atoi (t->get ("due").c_str ())); From 9eed851fbb399419714b2770799b30025ad87208 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Mon, 25 Oct 2010 18:53:44 +0200 Subject: [PATCH 5/6] Merge - fixed if statement --- src/TDB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index f868d1da2..aeb715edf 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -1387,7 +1387,7 @@ void TDB::merge (const std::string& mergeFile) // nothing happend on the local branch either // break, to suppress autopush - if (lit != l.end ()) + if (lit == l.end ()) { mods.clear (); lmods.clear (); From 5bc1bfe33156d445da393a77b02f37576ada4461 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 25 Oct 2010 20:47:07 +0200 Subject: [PATCH 6/6] Bumped version to 1.9.3.beta3 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 40213d05c..b7046eb9d 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.9.3.beta2, support@taskwarrior.org) +AC_INIT(task, 1.9.3.beta3, support@taskwarrior.org) # Source type.