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. 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 (); 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 ())); 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; 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 ())); 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';