mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Merge branch '1.9.3' of tasktools.org:task into 1.9.3
This commit is contained in:
commit
cfdd7efea9
6 changed files with 24 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
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.
|
# Source type.
|
||||||
|
|
|
@ -1387,7 +1387,7 @@ void TDB::merge (const std::string& mergeFile)
|
||||||
// nothing happend on the local branch either
|
// nothing happend on the local branch either
|
||||||
|
|
||||||
// break, to suppress autopush
|
// break, to suppress autopush
|
||||||
if (lit != l.end ())
|
if (lit == l.end ())
|
||||||
{
|
{
|
||||||
mods.clear ();
|
mods.clear ();
|
||||||
lmods.clear ();
|
lmods.clear ();
|
||||||
|
|
|
@ -647,8 +647,8 @@ void Task::validate () const
|
||||||
if (has ("wait"))
|
if (has ("wait"))
|
||||||
{
|
{
|
||||||
Date wait (::atoi (get ("wait").c_str ()));
|
Date wait (::atoi (get ("wait").c_str ()));
|
||||||
if (wait < due)
|
if (wait > due)
|
||||||
throw std::string ("A 'wait' date must be after a 'due' date.");
|
throw std::string ("A 'wait' date must be before a 'due' date.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Date entry (::atoi (get ("entry").c_str ()));
|
Date entry (::atoi (get ("entry").c_str ()));
|
||||||
|
|
20
src/main.cpp
20
src/main.cpp
|
@ -27,7 +27,13 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef CYGWIN
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#else
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Context.h"
|
#include "Context.h"
|
||||||
#include "../auto.h"
|
#include "../auto.h"
|
||||||
|
|
||||||
|
@ -36,10 +42,20 @@ Context context;
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
// Set up randomness.
|
// Set up randomness.
|
||||||
#ifdef HAVE_SRANDOM
|
#ifdef CYGWIN
|
||||||
|
#ifdef HAVE_SRANDOM
|
||||||
srandom (time (NULL));
|
srandom (time (NULL));
|
||||||
#else
|
#else
|
||||||
srand (time (NULL));
|
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
|
#endif
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
|
@ -105,7 +105,7 @@ void handleRecurrence ()
|
||||||
sprintf (dueDate, "%u", (unsigned int) d->toEpoch ());
|
sprintf (dueDate, "%u", (unsigned int) d->toEpoch ());
|
||||||
rec.set ("due", dueDate); // Store generated due date.
|
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_wait (atoi (t->get ("wait").c_str ()));
|
||||||
Date old_due (atoi (t->get ("due").c_str ()));
|
Date old_due (atoi (t->get ("due").c_str ()));
|
||||||
|
|
|
@ -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.'
|
# Message is 'Warning: the wait date falls after the due date.'
|
||||||
$output = qx{../task rc:wait.rc add Complain due:today wait:tomorrow};
|
$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.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue