Merge branch 'master' into 2.4.0

This commit is contained in:
Paul Beckingham 2014-01-15 22:17:30 -05:00
commit cd6067a39f
31 changed files with 139 additions and 219 deletions

View file

@ -2,7 +2,7 @@ The development of taskwarrior was made possible by the significant
contributions of the following people:
Paul Beckingham (Principal Author)
Federico Hernandez (Package Maintainer & Contributing Author)
Federico Hernandez (Principal Author)
David J Patrick (Designer)
John Florian (Contributing Author)
Cory Donnelly (Contributing Author)

View file

@ -9,11 +9,6 @@ set (HAVE_CMAKE true)
project (task)
set (PROJECT_VERSION "2.4.0")
SET (TASK_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
SET (TASK_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5")
SET (TASK_DOCDIR share/doc/task CACHE STRING "Installation directory for doc files")
SET (TASK_BINDIR bin CACHE STRING "Installation directory for the binary")
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (LINUX true)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@ -96,6 +91,7 @@ endif (READLINE_FOUND)
check_function_exists (timegm HAVE_TIMEGM)
check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME)
check_function_exists (wordexp HAVE_WORDEXP)
check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
check_struct_has_member ("struct stat" st_birthtime "sys/types.h;sys/stat.h" HAVE_ST_BIRTHTIME)

View file

@ -12,7 +12,7 @@ Bugs
------ current release ---------------------------
2.3.0 () -
2.3.0 (2014-01-15) c4eb46507031b7dee839dcb932bb2a22b2f0d3a2
Features
+ #328 Replaced the 'shell' command with a standalone 'tasksh' binary, which
@ -110,10 +110,13 @@ Bugs
+ #1476 Unicode indicators increase column width (thanks to Paul Kishimoto).
+ #1477 Pre-compiled static library (*.a) in source tarball (thanks to Jakub
Wilk);
+ #1478 pri_sort.t failure (thanks to Jakub Wilk).
+ #1479 bug_annual.t failure (thanks to Jakub Wilk).
+ Fixed bug so that 'limit:page' now considers footnote messages.
+ Fixed bug where specifying an ID of 0 yielded all completed/deleted tasks
(thanks to greenskeleton).
+ Fixed rc.nag documentation (thanks to Jeroen Budts).
+ Fixed bug where task edit incorrectly claimed duration UDA was modified.
------ old releases ------------------------------

View file

@ -1,93 +0,0 @@
Welcome To Taskwarrior 2.3.0 Beta
---------------------------------
The beta release of Taskwarrior 2.3.0 is for testing the Taskserver. There are
several unaddressed bugs in this release, so proper precautions with your data
are required.
Building Taskwarrior
--------------------
You will need the following dependencies:
cmake
make
g++/clang or equivalent
libuuid
libgnutls (devel copy, with certtools)
libreadline
Configuring Taskwarrior as a Taskserver Client
----------------------------------------------
When a new user is added to the Taskserver, a UUID key is generated, along with
an x.509 cert. See Taskserver operation document. Before proceeding, you will
need the following items:
<server:port> Where Taskserver is running (Default: localhost:6544)
<org> Name of organization (default: Public)
<user> User name added to server
<password> UUID generated by server
<cert> Full path to client.cert.pem generated by server
<key> Full path to client.key.pem generated by server
Set these configuration variables in your Taskwarrior configuration,
substituting from above:
$ task config taskd.server <server:port>
$ task config taskd.credentials <org>/<user>/<password>
$ task config taskd.certificate <cert>
$ task config taskd.key <key>
Here is an example:
$ task config taskd.server localhost:6544
$ task config taskd.credentials 'Public/John Doe/8ad2e3db-914d-4832-b0e6-72fa04f6e331'
$ task config taskd.certificate ~/.task/client.cert.pem
$ task config taskd.key ~/.task/client.key.pem
Using Self-Signed Certificates
------------------------------
If you are using self-signed certificates, you will either need a Certificate
Authority cert (CA), reference by hte configuration like this:
$ task config taskd.ca ~/.task/ca.cert.pem
Alternatively you can bypass the certificate validation, but this is not
recommended:
$ task config taskd.trust yes
First-Time Synchronizing
------------------------
The first sync you do should be a full sync. Run this:
$ task sync initialize
This performs a full upload of your pending.data file to the server, creating
the basis on which all subsequent sync commands are run, and transferring only
deltas.
Do not run 'task sync initialize' again.
General Synchronizing
---------------------
After the first-time sync, all subsequent sync commands should be like this:
$ task sync
It is safe to run this command as often as you wish, whether or not there are
any changes to sync.
You may wish to enable sync feedback with the 'sync' verbose token. See 'man
taskrc' for details.
---

View file

@ -67,6 +67,9 @@
/* Found uuid_unparse_lower in the uuid library */
#cmakedefine HAVE_UUID_UNPARSE_LOWER
/* Found wordexp.h */
#cmakedefine HAVE_WORDEXP
/* Undefine this to eliminate the execute command */
#define HAVE_EXECUTE 1

View file

@ -1,4 +1,4 @@
.TH task-color 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH task-color 5 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task-color \- A color tutorial for the taskwarrior command line todo manager.

View file

@ -1,4 +1,4 @@
.TH task-faq 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH task-faq 5 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task-faq \- A FAQ for the task(1) command line todo manager.

View file

@ -1,4 +1,4 @@
.TH task-sync 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH task-sync 5 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task-sync \- A discussion and tutorial for the various task(1) data

View file

@ -1,4 +1,4 @@
.TH task-tutorial 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH task-tutorial 5 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task-tutorial \- A tutorial for the task(1) command line todo manager.

View file

@ -1,4 +1,4 @@
.TH task 1 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH task 1 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task \- A command line todo manager.
@ -214,7 +214,7 @@ Applies the filter then extracts only the task IDs and presents them as
a range, for example: 1-4,12. This is useful as input to a task command,
to achieve this:
task $(task project:Home ids) modify priority:H
task $(task project:Home ids) modify priority:H
This example first gets the IDs for the project:Home filter, then sets
the priority to H for each of those tasks. This can also be achieved directly:
@ -230,7 +230,7 @@ then extracts only the task UUIDs and presents them as
a comma-separated list. This is useful as input to a task command, to achieve
this:
task $(task project:Home status:completed uuids) modify status:pending
task $(task project:Home status:completed uuids) modify status:pending
This example first gets the UUIDs for the project:Home and status:completed
filters, then makes each of those tasks pending again.
@ -893,17 +893,17 @@ task ... due:fri
.TP
Predictable holidays
task ... due:goodfriday
task ... due:goodfriday
.br
task ... due:easter
task ... due:easter
.br
task ... due:eastermonday
task ... due:eastermonday
.br
task ... due:ascension
task ... due:ascension
.br
task ... due:pentecost
task ... due:pentecost
.br
task ... due:midsommar
task ... due:midsommar
.br
task ... due:midsommarafton
.RE

View file

@ -1,4 +1,4 @@
.TH taskrc 5 2013-04-07 "${PACKAGE_STRING}" "User Manuals"
.TH taskrc 5 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
taskrc \- Configuration file for the task(1) command

View file

@ -1,4 +1,4 @@
.TH tasksh 1 2013-03-09 "${PACKAGE_STRING}" "User Manuals"
.TH tasksh 1 2014-01-15 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
tasksh \- Interactive taskwarrior shell

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>pages-trunk-20080703_5</string>
<string>pages-trunk-20080829_1</string>
<string>pages-trunk-20080921_1</string>
<string>local build-Jul 1 2011</string>
<string>local build-Nov 15 2011</string>
<string>local build-Jul 1 2011</string>
<string>local build-Jun 29 2012</string>
<string>local build-Oct 16 2012</string>
<string>M5.0.1-1478-1</string>
</array>
</plist>

View file

@ -0,0 +1 @@
714E6D35-304F-4CB0-BD91-DD74C9A9979E

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

View file

@ -155,7 +155,6 @@ void A3::capture (int argc, const char** argv)
// Append an Arg with a blank category.
void A3::capture (const std::string& arg)
{
std::vector <std::string> parts;
this->push_back (Arg (arg));
}

View file

@ -674,7 +674,9 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
{
std::string value = findValue (after, "\n UDA " + col->first + ":");
if ((task.get (col->first) != value) && (type != "date" ||
(task.get (col->first) != Date(value, dateformat).toEpochString ())))
(task.get (col->first) != Date (value, dateformat).toEpochString ())) &&
(type != "duration" ||
(task.get (col->first) != (std::string) OldDuration (value) )))
{
if (value != "")
{

View file

@ -11,18 +11,9 @@ set (tasksh_SRCS Readline.cpp Readline.h)
add_library (tasksh STATIC ${tasksh_SRCS})
add_executable (tasksh_executable main.cpp)
# Yes, 'task' is included twice, other linking fails on CentOS.
# Yes, 'task' is included twice, otherwise linking fails on CentOS.
target_link_libraries (tasksh_executable task commands columns tasksh task ${TASK_LIBRARIES})
set_property (TARGET tasksh_executable PROPERTY OUTPUT_NAME "tasksh")
install (TARGETS tasksh_executable DESTINATION ${TASK_BINDIR})
set (CMAKE_BUILD_TYPE debug)
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wall")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wall")
#SET(CMAKE_BUILD_TYPE gcov)
#SET(CMAKE_CXX_FLAGS_GCOV "--coverage")
#SET(CMAKE_C_FLAGS_GCOV "--coverage")
#SET(CMAKE_EXE_LINKER_FLAGS_GCOV "--coverage")

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
// Copyright 2006 - 2014, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -75,46 +75,3 @@ bool Readline::interactiveMode (const std::istream& in)
}
////////////////////////////////////////////////////////////////////////////////
Wordexp::Wordexp (const std::string &str)
{
std::string tmpStr(str);
escapeSpecialChars(tmpStr);
wordexp (tmpStr.c_str (), &_p, 0);
}
////////////////////////////////////////////////////////////////////////////////
Wordexp::~Wordexp ()
{
wordfree (&_p);
}
////////////////////////////////////////////////////////////////////////////////
int Wordexp::argc ()
{
return _p.we_wordc;
}
////////////////////////////////////////////////////////////////////////////////
char** Wordexp::argv ()
{
return _p.we_wordv;
}
////////////////////////////////////////////////////////////////////////////////
char* Wordexp::argv (int i)
{
return _p.we_wordv[i];
}
////////////////////////////////////////////////////////////////////////////////
void Wordexp::escapeSpecialChars(std::string& str)
{
size_t i = 0;
while ((i = str.find_first_of ("$*?!|&;<>(){}~#@", i)) != std::string::npos)
{
str.insert(i, 1, '\\');
i += 2;
}
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2014, Paul Beckingham, Federico Hernandez.
// Copyright 2006 - 2014, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -30,7 +30,9 @@
#include <string>
#include <stdio.h>
#ifdef HAVE_WORDEXP
#include <wordexp.h>
#endif
// Static class that offers a C++ API to readline C functions.
class Readline
@ -47,22 +49,5 @@ private:
Readline& operator= (const Readline&); // Don't implement.
};
// RAII for wordexp_t
class Wordexp
{
public:
Wordexp (const std::string& str);
~Wordexp ();
int argc ();
char** argv ();
char* argv (int i);
void escapeSpecialChars(std::string& str);
private:
wordexp_t _p;
};
#endif
////////////////////////////////////////////////////////////////////////////////

View file

@ -30,6 +30,7 @@
#include <fstream>
#include <iostream>
#include <cstring>
#include <string.h>
#include <text.h>
#include <i18n.h>
@ -39,6 +40,8 @@
Context context;
#define MAX_ARGUMENTS 256
////////////////////////////////////////////////////////////////////////////////
int main (int argc, const char** argv)
{
@ -154,19 +157,72 @@ int main (int argc, const char** argv)
try
{
Wordexp w ("task " + trim (input + permanent_overrides));
#ifdef HAVE_WORDEXP
std::string command = "task " + trim (input + permanent_overrides);
for (int i = 0; i < w.argc (); ++i)
// Escape special chars.
size_t i = 0;
while ((i = command.find_first_of ("$*?!|&;<>(){}~#@", i)) != std::string::npos)
{
command.insert(i, 1, '\\');
i += 2;
}
// Perform expansion.
wordexp_t p;
wordexp (command.c_str (), &p, 0);
char** w = p.we_wordv;
for (int i = 0; i < p.we_wordc; ++i)
{
if (std::find (quit_commands.begin (), quit_commands.end (),
lowerCase (w.argv (i))) != quit_commands.end ())
lowerCase (w[i])) != quit_commands.end ())
{
context.clearMessages ();
return 0;
}
}
int status = context.initialize (w.argc (), (const char**)w.argv ());
// External calls.
if (strcmp (w[1], "xc") == 0 && p.we_wordc > 2)
{
std::string combined = "";
for (int i = 2; i < p.we_wordc - 1 ; ++i)
{
combined += std::string (w[i]) + " ";
}
combined += w[p.we_wordc - 1]; // last goes without a blank
system (combined.c_str ()); // not checked
continue;
}
int status = context.initialize (p.we_wordc, (const char**)p.we_wordv);
wordfree(&p);
#else
std::string command = "task " + trim (input + permanent_overrides);
int arg_count = 0;
char* arg_vector[MAX_ARGUMENTS];
char* arg = strtok ((char*)command.c_str (), " ");
while (arg && arg_count < MAX_ARGUMENTS)
{
arg_vector[arg_count++] = arg;
arg = strtok (0, " ");
}
for (int i = 1; i < arg_count; ++i)
{
if (std::find (quit_commands.begin (), quit_commands.end (),
lowerCase (arg_vector[i])) != quit_commands.end ())
{
context.clearMessages ();
return 0;
}
}
int status = context.initialize (arg_count, (const char**) arg_vector);
#endif
if (status == 0)
context.run ();
}

View file

@ -38,7 +38,11 @@ delete $ENV{'TASKRC'};
if (open my $fh, '>', 'annual.rc')
{
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
"dateformat=m/d/Y\n",
"report.annual.labels=ID,Due,Description\n",
"report.annual.columns=id,due,description\n",
"report.annual.filter=status:pending\n",
"report.annual.sort=due+\n";
close $fh;
ok (-r 'annual.rc', 'Created annual.rc');
}
@ -46,32 +50,32 @@ if (open my $fh, '>', 'annual.rc')
# If a task is added with a due date ten years ago, with an annual recurrence,
# then the synthetic tasks in between then and now have a due date that creeps.
#
# ID Project Pri Due Active Description
# -- ------- --- ---------- ------ -----------
# 2 1/1/2000 foo
# 3 12/31/2000 foo
# 4 12/31/2001 foo
# 5 12/31/2002 foo
# 6 12/31/2003 foo
# 7 12/30/2004 foo
# 8 12/30/2005 foo
# 9 12/30/2006 foo
# 10 12/30/2007 foo
# 11 13/29/2008 foo
# 12 12/29/2009 foo
# ID Due Description
# -- ---------- -----------
# 4 1/1/2002 foo
# 5 1/1/2003 foo
# 6 1/1/2004 foo
# 7 1/1/2005 foo
# 8 1/1/2006 foo
# 9 1/1/2007 foo
# 10 1/1/2008 foo
# 11 1/1/2009 foo
# 12 1/1/2010 foo
# 2 1/1/2000 foo
# 3 1/1/2001 foo
qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009 2>&1};
my $output = qx{../src/task rc:annual.rc list 2>&1};
like ($output, qr/2\s+R\s+1\/1\/2000\s+.+foo/, 'synthetic 2 no creep');
like ($output, qr/3\s+R\s+1\/1\/2001\s+.+foo/, 'synthetic 3 no creep');
like ($output, qr/4\s+R\s+1\/1\/2002\s+.+foo/, 'synthetic 4 no creep');
like ($output, qr/5\s+R\s+1\/1\/2003\s+.+foo/, 'synthetic 5 no creep');
like ($output, qr/6\s+R\s+1\/1\/2004\s+.+foo/, 'synthetic 6 no creep');
like ($output, qr/7\s+R\s+1\/1\/2005\s+.+foo/, 'synthetic 7 no creep');
like ($output, qr/8\s+R\s+1\/1\/2006\s+.+foo/, 'synthetic 8 no creep');
like ($output, qr/9\s+R\s+1\/1\/2007\s+.+foo/, 'synthetic 9 no creep');
like ($output, qr/10\s+R\s+1\/1\/2008\s+.+foo/, 'synthetic 10 no creep');
like ($output, qr/11\s+R\s+1\/1\/2009\s+.+foo/, 'synthetic 11 no creep');
my $output = qx{../src/task rc:annual.rc annual 2>&1};
like ($output, qr/2\s+1\/1\/2000\s+foo/, 'synthetic 2 no creep');
like ($output, qr/3\s+1\/1\/2001\s+foo/, 'synthetic 3 no creep');
like ($output, qr/4\s+1\/1\/2002\s+foo/, 'synthetic 4 no creep');
like ($output, qr/5\s+1\/1\/2003\s+foo/, 'synthetic 5 no creep');
like ($output, qr/6\s+1\/1\/2004\s+foo/, 'synthetic 6 no creep');
like ($output, qr/7\s+1\/1\/2005\s+foo/, 'synthetic 7 no creep');
like ($output, qr/8\s+1\/1\/2006\s+foo/, 'synthetic 8 no creep');
like ($output, qr/9\s+1\/1\/2007\s+foo/, 'synthetic 9 no creep');
like ($output, qr/10\s+1\/1\/2008\s+foo/, 'synthetic 10 no creep');
like ($output, qr/11\s+1\/1\/2009\s+foo/, 'synthetic 11 no creep');
$output = qx{../src/task rc:annual.rc diag 2>&1};
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');

View file

@ -37,7 +37,8 @@ delete $ENV{'TASKRC'};
# Create the rc file.
if (open my $fh, '>', 'pri.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"verbose=off\n";
close $fh;
ok (-r 'pri.rc', 'Created pri.rc');
}