Merge branch '1.9.3' of tasktools.org:task into 1.9.3

This commit is contained in:
Paul Beckingham 2010-10-25 20:13:26 -04:00
commit cfdd7efea9
6 changed files with 24 additions and 8 deletions

View file

@ -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.

View file

@ -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 ();

View file

@ -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 ()));

View file

@ -27,7 +27,13 @@
#include <iostream>
#include <stdlib.h>
#ifdef CYGWIN
#include <time.h>
#else
#include <sys/time.h>
#endif
#include "Context.h"
#include "../auto.h"
@ -36,11 +42,21 @@ Context context;
int main (int argc, char** argv)
{
// Set up randomness.
#ifdef CYGWIN
#ifdef HAVE_SRANDOM
srandom (time (NULL));
#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;

View file

@ -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 ()));

View file

@ -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';