Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df49aaba12 | ||
|
|
0d45bb75e8 | ||
|
|
5d5e824453 | ||
|
|
92b5dfd83d | ||
|
|
7293de75b0 | ||
|
|
f30f4d45c6 | ||
|
|
32ef3fdb3d | ||
|
|
65b6a35ef5 | ||
|
|
e16bd6ee83 | ||
|
|
69698454c3 | ||
|
|
3a7af017f8 | ||
|
|
accd51bc35 | ||
|
|
5fee3ef27c | ||
|
|
0850e26a3e | ||
|
|
4deb17696e | ||
|
|
7d859d6b6d | ||
|
|
f6e04585ae | ||
|
|
1e31df3c7a | ||
|
|
db04f1b583 | ||
|
|
1c9edcc2ec | ||
|
|
710372b8db | ||
|
|
c8756f0201 | ||
|
|
b6b49ca7e4 | ||
|
|
ec9b8c5aa9 | ||
|
|
023a17e6be | ||
|
|
c346cf9395 | ||
|
|
71fef9f22f | ||
|
|
36e31811b0 | ||
|
|
71753ef666 | ||
|
|
7a9e099568 | ||
|
|
fcfc95df86 | ||
|
|
5f9a543b1b | ||
|
|
75775786e6 | ||
|
|
caa8c8e884 | ||
|
|
93470bb8d8 | ||
|
|
8e01976abb | ||
|
|
e60ea2e07a | ||
|
|
931afb0674 | ||
|
|
1b63a2dde5 | ||
|
|
c62ba68f10 | ||
|
|
5d60f426a8 | ||
|
|
7fcb26f363 | ||
|
|
c34b2b8cfb | ||
|
|
b9a8d62324 | ||
|
|
c8c7123eb9 | ||
|
|
dc8e874f19 | ||
|
|
233d97fbff | ||
|
|
64be230639 | ||
|
|
a52bba46f1 | ||
|
|
b91a4b4982 | ||
|
|
f9e3f865b1 | ||
|
|
67a008e7bf | ||
|
|
5c70619d68 | ||
|
|
6cf3345595 | ||
|
|
9959d8eac8 |
3
AUTHORS
3
AUTHORS
@@ -1,4 +1,4 @@
|
|||||||
The development of taskwarrior was made possible by the significant
|
The development of Taskwarrior was made possible by the significant
|
||||||
contributions of the following people:
|
contributions of the following people:
|
||||||
|
|
||||||
Paul Beckingham (Principal Author)
|
Paul Beckingham (Principal Author)
|
||||||
@@ -116,6 +116,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
|||||||
V.Krishn
|
V.Krishn
|
||||||
Jens Erat
|
Jens Erat
|
||||||
Peter Rochen
|
Peter Rochen
|
||||||
|
Oota Toshiya
|
||||||
|
|
||||||
Thanks to the following, who submitted detailed bug reports and excellent
|
Thanks to the following, who submitted detailed bug reports and excellent
|
||||||
suggestions:
|
suggestions:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ include (CheckStructHasMember)
|
|||||||
set (HAVE_CMAKE true)
|
set (HAVE_CMAKE true)
|
||||||
|
|
||||||
project (task)
|
project (task)
|
||||||
set (PROJECT_VERSION "2.4.3")
|
set (PROJECT_VERSION "2.4.4")
|
||||||
|
|
||||||
OPTION(USE_GNUTLS "Build gnutls support." ON)
|
OPTION(USE_GNUTLS "Build gnutls support." ON)
|
||||||
|
|
||||||
@@ -163,6 +163,7 @@ set (LANGUAGE_ITA_ITA 5)
|
|||||||
set (LANGUAGE_POR_PRT 6)
|
set (LANGUAGE_POR_PRT 6)
|
||||||
set (LANGUAGE_EPO_RUS 7)
|
set (LANGUAGE_EPO_RUS 7)
|
||||||
set (LANGUAGE_POL_POL 8)
|
set (LANGUAGE_POL_POL 8)
|
||||||
|
set (LANGUAGE_JPN_JPN 9)
|
||||||
|
|
||||||
message ("-- Configuring cmake.h")
|
message ("-- Configuring cmake.h")
|
||||||
configure_file (
|
configure_file (
|
||||||
|
|||||||
2
COPYING
2
COPYING
@@ -1,4 +1,4 @@
|
|||||||
taskwarrior - a command line task list manager.
|
Taskwarrior - a command line task list manager.
|
||||||
|
|
||||||
Copyright 2006 - 2015, Paul Beckingham, Federico Hernandez.
|
Copyright 2006 - 2015, Paul Beckingham, Federico Hernandez.
|
||||||
|
|
||||||
|
|||||||
25
ChangeLog
25
ChangeLog
@@ -1,4 +1,25 @@
|
|||||||
2.4.3 (2015-04-19) -
|
2.4.4 (2015-05-10) -
|
||||||
|
|
||||||
|
- TW-69 wait dates relative to due date (thanks to John Florian).
|
||||||
|
- TW-1285 I'd like to use relative dates combined with times (thanks to Adam
|
||||||
|
Gibbins).
|
||||||
|
- TW-1474 Documentation is confusing with respect to user/uuid on the server
|
||||||
|
(thanks to Tomas Babej).
|
||||||
|
- TW-1596 taskwarrior can't compile FreeBSD 9.3 32bit environment (thanks to
|
||||||
|
ribbon)
|
||||||
|
- TW-1603 Priority color precedence changed since it is a UDA, should be lowered
|
||||||
|
again (thanks to Jens Erat).
|
||||||
|
- TW-1605 Japanese translation for Taskwarrior (thanks to Oota Toshiya).
|
||||||
|
- TW-1606 scheduled.any filter (thanks to Peter Rochen).
|
||||||
|
- TW-1608 The recur/recurring report shows tasks without a recur interval
|
||||||
|
(thanks to Brad Collette).
|
||||||
|
- TW-1610 Disabling GC can lead to editing the wrong task (thanks to Scott M).
|
||||||
|
- The 'obfuscate' setting, if set to '1' will replace all text with 'xxx'.
|
||||||
|
- POSIX file locking mechanism, eliminating platform-specific code.
|
||||||
|
|
||||||
|
------ current release ---------------------------
|
||||||
|
|
||||||
|
2.4.3 (2015-04-19) 499044b9b6bdbc95338ea585204e949d80b24a09
|
||||||
|
|
||||||
- TW-57 user defined attribute sort order (thanks to Max Muller).
|
- TW-57 user defined attribute sort order (thanks to Max Muller).
|
||||||
- TW-70 urgency.user.keyword.<keyword>.coefficient=...
|
- TW-70 urgency.user.keyword.<keyword>.coefficient=...
|
||||||
@@ -38,8 +59,6 @@
|
|||||||
+ Stops after measuring a fixed-width column format.
|
+ Stops after measuring a fixed-width column format.
|
||||||
+ Reduced number of std::string copies.
|
+ Reduced number of std::string copies.
|
||||||
|
|
||||||
------ current release ---------------------------
|
|
||||||
|
|
||||||
2.4.2 (2015-03-15) b9dc0813d9a8922b4cef9595033f133f9fbabf44
|
2.4.2 (2015-03-15) b9dc0813d9a8922b4cef9595033f133f9fbabf44
|
||||||
|
|
||||||
- TW-41 Tasks in subprojects are not counted in project completion (thanks
|
- TW-41 Tasks in subprojects are not counted in project completion (thanks
|
||||||
|
|||||||
13
DEVELOPER
13
DEVELOPER
@@ -1,16 +1,15 @@
|
|||||||
How to Build Taskwarrior
|
How to Build Taskwarrior
|
||||||
|
|
||||||
Satisfy the Requirements:
|
Satisfy the Requirements:
|
||||||
- gcc 4.4 or later, clang 2.9 or later or equivalent. This is because 2.4.1
|
- gcc 4.7 or later, clang 3.3 or later or equivalent. This is because 2.4.4
|
||||||
marks the first step towards using modern C++11. Initially this involves
|
will be utilizing C++11.
|
||||||
only feature N1984.
|
|
||||||
- libuuid
|
- libuuid
|
||||||
- gnutls (optional)
|
- gnutls (optional)
|
||||||
|
|
||||||
Obtain and build code:
|
Obtain and build code:
|
||||||
$ git clone https://git.tasktools.org/scm/tm/task.git task.git
|
$ git clone https://git.tasktools.org/scm/tm/task.git task.git
|
||||||
$ cd task.git
|
$ cd task.git
|
||||||
$ git checkout 2.4.3 # Latest dev branch
|
$ git checkout 2.4.4 # Latest dev branch
|
||||||
$ cmake -DCMAKE_BUILD_TYPE=debug . # debug or release. Default: neither.
|
$ cmake -DCMAKE_BUILD_TYPE=debug . # debug or release. Default: neither.
|
||||||
$ make VERBOSE=1 # Shows details
|
$ make VERBOSE=1 # Shows details
|
||||||
|
|
||||||
@@ -189,11 +188,11 @@ Work in Progress
|
|||||||
Current Codebase Condition
|
Current Codebase Condition
|
||||||
|
|
||||||
'master' branch:
|
'master' branch:
|
||||||
- 2.4.2 Current release, locked.
|
- 2.4.3 Current release, locked.
|
||||||
|
|
||||||
'2.4.3' branch:
|
'2.4.4' branch:
|
||||||
- Current development branch no plans yet.
|
- Current development branch no plans yet.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
2015-03-15 Updated for 2.4.3
|
2015-04-21 Updated for 2.4.4
|
||||||
|
|||||||
48
INSTALL
48
INSTALL
@@ -1,23 +1,25 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Please follow the instructions below to build task with cmake.
|
Please follow the instructions below to build and install Taskwarrior from
|
||||||
|
source.
|
||||||
|
|
||||||
|
|
||||||
Pre-requisites
|
Pre-requisites
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
You will need the CMake build system installed in order to build taskwarrior
|
You will need the CMake build system installed in order to build Taskwarrior
|
||||||
from source. More information on cmake can be obtained at http://cmake.org
|
from source. More information on cmake can be obtained at http://cmake.org
|
||||||
|
|
||||||
You will need a C++ compiler that supports C++11 N1984, which includes:
|
You will also need:
|
||||||
|
- make
|
||||||
|
|
||||||
- gcc 4.4 (released 2009-04-21)
|
You will need a C++ compiler that supports full C++11, which includes:
|
||||||
- clang 2.9 (released 2011-04-06)
|
- gcc 4.7 (released 2012-03-23)
|
||||||
|
- clang 3.3 (released 2013-01-07)
|
||||||
|
|
||||||
In addition:
|
You will need the following libraries:
|
||||||
|
- libuuid
|
||||||
- uuid lib
|
|
||||||
- gnutls (optional - for syncing)
|
- gnutls (optional - for syncing)
|
||||||
|
|
||||||
It is HIGHLY RECOMMENDED that you build with a library that provides uuid_*
|
It is HIGHLY RECOMMENDED that you build with a library that provides uuid_*
|
||||||
@@ -27,14 +29,14 @@ functions, such as libuuid.
|
|||||||
Basic Installation
|
Basic Installation
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
Briefly, these shell commands will unpack, build and install taskwarrior:
|
Briefly, these shell commands will unpack, build and install Taskwarrior:
|
||||||
|
|
||||||
$ tar xzf task-X.Y.Z.tar.gz [1]
|
$ tar xzf task-X.Y.Z.tar.gz [1]
|
||||||
$ cd task-X.Y.Z [2]
|
$ cd task-X.Y.Z [2]
|
||||||
$ cmake . [3]
|
$ cmake . [3]
|
||||||
$ make [4]
|
$ make [4]
|
||||||
$ sudo make install [5]
|
$ sudo make install [5]
|
||||||
$ cd .. ; rm -r task-X.Y.Z [6]
|
$ cd .. ; rm -r task-X.Y.Z [6]
|
||||||
|
|
||||||
These commands are explained below:
|
These commands are explained below:
|
||||||
|
|
||||||
@@ -46,7 +48,7 @@ These commands are explained below:
|
|||||||
3. Invokes CMake to scan for dependencies and machine-specific details, then
|
3. Invokes CMake to scan for dependencies and machine-specific details, then
|
||||||
generate the makefiles. This may take a minute.
|
generate the makefiles. This may take a minute.
|
||||||
|
|
||||||
4. Builds taskwarrior. This may take a minute.
|
4. Builds Taskwarrior. This may take a minute.
|
||||||
|
|
||||||
5. Installs the program, documentation and other data files.
|
5. Installs the program, documentation and other data files.
|
||||||
|
|
||||||
@@ -107,24 +109,24 @@ Currently the defined languages are:
|
|||||||
epo_RUS 7
|
epo_RUS 7
|
||||||
pol_POL 8
|
pol_POL 8
|
||||||
|
|
||||||
|
|
||||||
Uninstallation
|
Uninstallation
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
To uninstall taskwarrior, you need the Makefiles, so if you deleted them in
|
There is no uninstall option in CMake makefiles. This is a manual process.
|
||||||
step 7 above, they must first be regenerated by following steps [1], [2] and
|
|
||||||
[3]. Then simply run:
|
|
||||||
|
|
||||||
$ sudo make uninstall TODO TODO TODO -- cmake doesn't include uninstall
|
To uninstall Taskwarrior, remove the files listed in the install_manifest.txt
|
||||||
|
file that was generated when you built Taskwarrior.
|
||||||
|
|
||||||
|
|
||||||
Taskwarrior Build Notes
|
Taskwarrior Build Notes
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
Taskwarrior has dependencies that are detected by cmake in almost all cases, but
|
Taskwarrior has dependencies that are detected by CMake in almost all cases, but
|
||||||
there are situations and operating systems that mean you will need to offer a
|
there are situations and operating systems that mean you will need to offer a
|
||||||
little help.
|
little help.
|
||||||
|
|
||||||
If taskwarrior will not build on your system, first take a look at the Operating
|
If Taskwarrior will not build on your system, first take a look at the Operating
|
||||||
System notes below. If this doesn't help, then go to the Troubleshooting
|
System notes below. If this doesn't help, then go to the Troubleshooting
|
||||||
section, which includes instructions on how to contact us for help.
|
section, which includes instructions on how to contact us for help.
|
||||||
|
|
||||||
@@ -180,7 +182,7 @@ If a build does not succeed, please send the contents of the 'CMakeCache.txt'
|
|||||||
and 'CMakeFiles/CMakeOutput.log' files to support@taskwarrior.org, or post a
|
and 'CMakeFiles/CMakeOutput.log' files to support@taskwarrior.org, or post a
|
||||||
message in the support forums at taskwarrior.org along with the information.
|
message in the support forums at taskwarrior.org along with the information.
|
||||||
|
|
||||||
If CMake runs but taskwarrior does not build, please send the contents of the
|
If CMake runs but Taskwarrior does not build, please send the contents of the
|
||||||
above files as well as a transcript from the build, which is not written to a
|
above files as well as a transcript from the build, which is not written to a
|
||||||
file and must be captured from the terminal.
|
file and must be captured from the terminal.
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
taskwarrior - a command line task list manager.
|
Taskwarrior - a command line task list manager.
|
||||||
|
|
||||||
Copyright 2006 - 2015, Paul Beckingham, Federico Hernandez.
|
Copyright 2006 - 2015, Paul Beckingham, Federico Hernandez.
|
||||||
|
|
||||||
|
|||||||
31
NEWS
31
NEWS
@@ -1,31 +1,26 @@
|
|||||||
|
|
||||||
New Features in taskwarrior 2.4.3
|
New Features in Taskwarrior 2.4.4
|
||||||
|
|
||||||
- UDA string attributes with allowable values can now define their sort order.
|
- Taskwarrior now requires GCC 4.7+ / Clang 3.3+, for full C++11 support.
|
||||||
- The 'priority' attribute is now a UDA, configured by default.
|
- Taskwarrior now builds properly on 32-bit platforms.
|
||||||
|
- The beginnings of a Japaneѕe translation.
|
||||||
|
|
||||||
New commands in taskwarrior 2.4.3
|
New commands in Taskwarrior 2.4.4
|
||||||
|
|
||||||
-
|
- None
|
||||||
|
|
||||||
New configuration options in taskwarrior 2.4.3
|
New configuration options in Taskwarrior 2.4.4
|
||||||
|
|
||||||
- Setting 'bulk' to zero is interpreted as infinity, which means there is no
|
- The 'obfuscate' setting, if set to '1' will replace all text with 'xxx'.
|
||||||
amount of changes that is considered dangerous.
|
This is useful when sharing data for bug reporting purposes.
|
||||||
- The 'urgency.user.keyword.<keyword>.coefficient' setting allows tasks with
|
|
||||||
specific words in the description to have adjusted urgency.
|
|
||||||
- The 'summary.all.projects' setting shows all projects in the 'summary'
|
|
||||||
reportş instead of just those with pending tasks.
|
|
||||||
|
|
||||||
Newly deprecated features in taskwarrior 2.4.3
|
Newly deprecated features in Taskwarrior 2.4.4
|
||||||
|
|
||||||
-
|
- None
|
||||||
|
|
||||||
Removed features in 2.4.3
|
Removed features in 2.4.4
|
||||||
|
|
||||||
- The 'priority.long' and 'priority.short' column formats are no longer
|
- None
|
||||||
supported.
|
|
||||||
- The 'default.priority' setting is now 'uda.priority.default'.
|
|
||||||
|
|
||||||
Known Issues
|
Known Issues
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Please send your code patches to:
|
|||||||
support@taskwarrior.org
|
support@taskwarrior.org
|
||||||
|
|
||||||
Consider joining bug.tasktools.org, answers.tasktools.org and participating in
|
Consider joining bug.tasktools.org, answers.tasktools.org and participating in
|
||||||
the future of taskwarrior.
|
the future of Taskwarrior.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#define LANGUAGE_POR_PRT ${LANGUAGE_POR_PRT}
|
#define LANGUAGE_POR_PRT ${LANGUAGE_POR_PRT}
|
||||||
#define LANGUAGE_EPO_RUS ${LANGUAGE_EPO_RUS}
|
#define LANGUAGE_EPO_RUS ${LANGUAGE_EPO_RUS}
|
||||||
#define LANGUAGE_POL_POL ${LANGUAGE_POL_POL}
|
#define LANGUAGE_POL_POL ${LANGUAGE_POL_POL}
|
||||||
|
#define LANGUAGE_JPN_JPN ${LANGUAGE_JPN_JPN}
|
||||||
|
|
||||||
/* git information */
|
/* git information */
|
||||||
#cmakedefine HAVE_COMMIT
|
#cmakedefine HAVE_COMMIT
|
||||||
@@ -51,12 +52,6 @@
|
|||||||
/* Found the GnuTLS library */
|
/* Found the GnuTLS library */
|
||||||
#cmakedefine HAVE_LIBGNUTLS
|
#cmakedefine HAVE_LIBGNUTLS
|
||||||
|
|
||||||
/* Found the Readline library */
|
|
||||||
#cmakedefine HAVE_READLINE
|
|
||||||
|
|
||||||
/* Found the pthread library */
|
|
||||||
#cmakedefine HAVE_LIBPTHREAD
|
|
||||||
|
|
||||||
/* Found tm_gmtoff */
|
/* Found tm_gmtoff */
|
||||||
#cmakedefine HAVE_TM_GMTOFF
|
#cmakedefine HAVE_TM_GMTOFF
|
||||||
|
|
||||||
|
|||||||
@@ -1,81 +0,0 @@
|
|||||||
# - Find the readline library
|
|
||||||
# This module defines
|
|
||||||
# READLINE_INCLUDE_DIR, path to readline/readline.h, etc.
|
|
||||||
# READLINE_LIBRARIES, the libraries required to use READLINE.
|
|
||||||
# READLINE_FOUND, If false, do not try to use READLINE.
|
|
||||||
# also defined, but not for general use are
|
|
||||||
# READLINE_readline_LIBRARY, where to find the READLINE library.
|
|
||||||
# READLINE_ncurses_LIBRARY, where to find the ncurses library [might not be defined]
|
|
||||||
|
|
||||||
# Apple readline does not support readline hooks
|
|
||||||
# So we look for another one by default
|
|
||||||
IF (APPLE OR FREEBSD)
|
|
||||||
FIND_PATH (READLINE_INCLUDE_DIR NAMES readline/readline.h PATHS
|
|
||||||
/usr/include/
|
|
||||||
/sw/include
|
|
||||||
/opt/local/include
|
|
||||||
/opt/include
|
|
||||||
/usr/local/include
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
ENDIF (APPLE OR FREEBSD)
|
|
||||||
FIND_PATH (READLINE_INCLUDE_DIR NAMES readline/readline.h)
|
|
||||||
|
|
||||||
|
|
||||||
# Apple readline does not support readline hooks
|
|
||||||
# So we look for another one by default
|
|
||||||
IF (APPLE OR FREEBSD)
|
|
||||||
FIND_LIBRARY (READLINE_readline_LIBRARY NAMES readline PATHS
|
|
||||||
/usr/lib
|
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/lib
|
|
||||||
/usr/local/lib
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
ENDIF (APPLE OR FREEBSD)
|
|
||||||
FIND_LIBRARY (READLINE_readline_LIBRARY NAMES readline)
|
|
||||||
|
|
||||||
# Sometimes readline really needs ncurses
|
|
||||||
IF (APPLE OR FREEBSD)
|
|
||||||
FIND_LIBRARY (READLINE_ncurses_LIBRARY NAMES ncurses PATHS
|
|
||||||
/usr/lib
|
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/lib
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
ENDIF (APPLE OR FREEBSD)
|
|
||||||
FIND_LIBRARY (READLINE_ncurses_LIBRARY NAMES ncurses)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED (
|
|
||||||
READLINE_INCLUDE_DIR
|
|
||||||
READLINE_readline_LIBRARY
|
|
||||||
READLINE_ncurses_LIBRARY
|
|
||||||
)
|
|
||||||
|
|
||||||
SET (READLINE_FOUND "NO" )
|
|
||||||
IF (READLINE_INCLUDE_DIR)
|
|
||||||
IF (READLINE_readline_LIBRARY)
|
|
||||||
SET (READLINE_FOUND "YES" )
|
|
||||||
SET (READLINE_LIBRARIES
|
|
||||||
${READLINE_readline_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
# some readline libraries depend on ncurses
|
|
||||||
IF (READLINE_ncurses_LIBRARY)
|
|
||||||
SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${READLINE_ncurses_LIBRARY})
|
|
||||||
ENDIF (READLINE_ncurses_LIBRARY)
|
|
||||||
|
|
||||||
ENDIF (READLINE_readline_LIBRARY)
|
|
||||||
ENDIF (READLINE_INCLUDE_DIR)
|
|
||||||
|
|
||||||
IF (READLINE_FOUND)
|
|
||||||
MESSAGE (STATUS "Found readline library")
|
|
||||||
ELSE (READLINE_FOUND)
|
|
||||||
IF (READLINE_FIND_REQUIRED)
|
|
||||||
MESSAGE (FATAL_ERROR "Could not find readline -- please give some paths to CMake")
|
|
||||||
ENDIF (READLINE_FIND_REQUIRED)
|
|
||||||
ENDIF (READLINE_FOUND)
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
.TH task-color 5 2015-04-19 "${PACKAGE_STRING}" "User Manuals"
|
.TH task-color 5 2015-05-10 "${PACKAGE_STRING}" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
task-color \- A color tutorial for the taskwarrior command line todo manager.
|
task-color \- A color tutorial for the Taskwarrior command line todo manager.
|
||||||
|
|
||||||
.SH SETUP
|
.SH SETUP
|
||||||
The first thing you need is a terminal program that supports color. All
|
The first thing you need is a terminal program that supports color. All
|
||||||
@@ -18,8 +18,8 @@ which shell you use). If this is a new setting, you will need to either run
|
|||||||
that profile script, or close and reopen the terminal window (which does the
|
that profile script, or close and reopen the terminal window (which does the
|
||||||
same thing).
|
same thing).
|
||||||
|
|
||||||
Now tell taskwarrior that you want to use color. This is the default for
|
Now tell Taskwarrior that you want to use color. This is the default for
|
||||||
taskwarrior, so the following step may be unnecessary.
|
Taskwarrior, so the following step may be unnecessary.
|
||||||
|
|
||||||
$ task config color on
|
$ task config color on
|
||||||
|
|
||||||
@@ -28,11 +28,11 @@ like:
|
|||||||
|
|
||||||
color=on
|
color=on
|
||||||
|
|
||||||
Now taskwarrior is ready.
|
Now Taskwarrior is ready.
|
||||||
|
|
||||||
.SH AUTOMATIC MONOCHROME
|
.SH AUTOMATIC MONOCHROME
|
||||||
It should be mentioned that taskwarrior is aware of whether its output is going
|
It should be mentioned that Taskwarrior is aware of whether its output is going
|
||||||
to a terminal, or to a file or through a pipe. When taskwarrior output goes to
|
to a terminal, or to a file or through a pipe. When Taskwarrior output goes to
|
||||||
a terminal, color is desirable, but consider the following command:
|
a terminal, color is desirable, but consider the following command:
|
||||||
|
|
||||||
$ task list > file.txt
|
$ task list > file.txt
|
||||||
@@ -268,7 +268,7 @@ from the example):
|
|||||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme
|
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-256.theme
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
You can use any of the standard taskwarrior themes:
|
You can use any of the standard Taskwarrior themes:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
dark-16.theme
|
dark-16.theme
|
||||||
@@ -323,7 +323,7 @@ http://www.opensource.org/licenses/mit-license.php for more information.
|
|||||||
.BR taskrc(5),
|
.BR taskrc(5),
|
||||||
.BR task-sync(5)
|
.BR task-sync(5)
|
||||||
|
|
||||||
For more information regarding taskwarrior, the following may be referenced:
|
For more information regarding Taskwarrior, the following may be referenced:
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
The official site at
|
The official site at
|
||||||
@@ -339,5 +339,5 @@ You can contact the project by writing an email to
|
|||||||
|
|
||||||
.SH REPORTING BUGS
|
.SH REPORTING BUGS
|
||||||
.TP
|
.TP
|
||||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
Bugs in Taskwarrior may be reported to the issue-tracker at
|
||||||
<http://taskwarrior.org>
|
<http://taskwarrior.org>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH task-sync 5 2015-04-19 "${PACKAGE_STRING}" "User Manuals"
|
.TH task-sync 5 2015-05-10 "${PACKAGE_STRING}" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
task-sync \- A discussion and tutorial for the various task(1) data
|
task-sync \- A discussion and tutorial for the various task(1) data
|
||||||
@@ -80,24 +80,25 @@ The Taskserver was designed for this purpose to be secure, fast and conflict
|
|||||||
free, allowing data interchange between assorted Taskwarrior clients, and
|
free, allowing data interchange between assorted Taskwarrior clients, and
|
||||||
tolerant of network connectivity problems.
|
tolerant of network connectivity problems.
|
||||||
|
|
||||||
There is a 'sync' command built in to Taskwarrior, and with a server account
|
There is a 'sync' command built in to Taskwarrior (provided the GnuTLS library
|
||||||
and client configuration, syncing is done on demand.
|
is installed), and with a server account and client configuration, syncing is
|
||||||
|
done on demand.
|
||||||
|
|
||||||
Setup is a matter of creating an account on a Taskserver (see your Taskserver
|
Setup is a matter of creating an account on a Taskserver (see your Taskserver
|
||||||
provider or operate your own - see
|
provider or operate your own - see
|
||||||
http://taskwarrior.org/docs/server_setup.html)
|
http://taskwarrior.org/docs/server_setup.html)
|
||||||
|
|
||||||
Once you have an account, you'll receive a certificate, key and a password.
|
Once you have an account, you'll receive a certificate, key, and credentials.
|
||||||
You'll need to put the certificate and key somewhere like this:
|
You'll need to put the certificate and key somewhere like this:
|
||||||
|
|
||||||
$ cp <name>.cert.pem ~/.task
|
$ cp <name>.cert.pem ~/.task
|
||||||
$ cp <name>.key.pem ~/.task
|
$ cp <name>.key.pem ~/.task
|
||||||
|
|
||||||
Then you configure Taskwarrior, using the account details:
|
Then you configure Taskwarrior, using the provided details:
|
||||||
|
|
||||||
$ task config taskd.certificate ~/.task/<name>.cert.pem
|
$ task config taskd.certificate ~/.task/<name>.cert.pem
|
||||||
$ task config taskd.key ~/.task/<name>.key.pem
|
$ task config taskd.key ~/.task/<name>.key.pem
|
||||||
$ task config taskd.credentials <organization>/<name>/<password>
|
$ task config taskd.credentials <organization>/<name>/<UUID>
|
||||||
$ task config taskd.server <server domain>:<port>
|
$ task config taskd.server <server domain>:<port>
|
||||||
|
|
||||||
If you are using a private server, you are likely also using a self-signed
|
If you are using a private server, you are likely also using a self-signed
|
||||||
@@ -108,7 +109,7 @@ certificate, which means you will need one of the following additional entries:
|
|||||||
The CA (Certificate Authority) will be used to verify the server certificate.
|
The CA (Certificate Authority) will be used to verify the server certificate.
|
||||||
Alternatively, you can override the cert verification process using:
|
Alternatively, you can override the cert verification process using:
|
||||||
|
|
||||||
$ task config taskd.trust yes
|
$ task config taskd.trust 'allow all'
|
||||||
|
|
||||||
This is an insecure option that should be used with caution, because it directs
|
This is an insecure option that should be used with caution, because it directs
|
||||||
Taskwarrior to trust any certificate.
|
Taskwarrior to trust any certificate.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH task 1 2015-04-19 "${PACKAGE_STRING}" "User Manuals"
|
.TH task 1 2015-05-10 "${PACKAGE_STRING}" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
task \- A command line todo manager.
|
task \- A command line todo manager.
|
||||||
@@ -14,7 +14,7 @@ that you want to do, allowing you to add/remove, and otherwise manipulate them.
|
|||||||
Taskwarrior has a rich set of subcommands that allow you to do various things
|
Taskwarrior has a rich set of subcommands that allow you to do various things
|
||||||
with it.
|
with it.
|
||||||
|
|
||||||
At the core, taskwarrior is a list processing program. You add text and
|
At the core, Taskwarrior is a list processing program. You add text and
|
||||||
additional related parameters and redisplay the information in a nice way. It
|
additional related parameters and redisplay the information in a nice way. It
|
||||||
turns into a todo list program when you add due dates and recurrence. It turns
|
turns into a todo list program when you add due dates and recurrence. It turns
|
||||||
into an organized todo list program when you add priorities, tags (one word
|
into an organized todo list program when you add priorities, tags (one word
|
||||||
@@ -98,7 +98,7 @@ generated, as with verbose=nothing).
|
|||||||
.SH READ SUBCOMMANDS
|
.SH READ SUBCOMMANDS
|
||||||
|
|
||||||
Reports are read subcommands. There are several reports currently predefined in
|
Reports are read subcommands. There are several reports currently predefined in
|
||||||
taskwarrior. The output and sort behavior of these reports can be configured in
|
Taskwarrior. The output and sort behavior of these reports can be configured in
|
||||||
the configuration file. See also the man page taskrc(5). There are also other
|
the configuration file. See also the man page taskrc(5). There are also other
|
||||||
read subcommands that are not reports.
|
read subcommands that are not reports.
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ non-standard arguments.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task calc <expression>
|
.B task calc <expression>
|
||||||
Evaluates an algebraic expression. Can be used to test how TaskWarrior
|
Evaluates an algebraic expression. Can be used to test how Taskwarrior
|
||||||
parses and evaluates the expression given on the command line.
|
parses and evaluates the expression given on the command line.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
@@ -397,7 +397,7 @@ Examples:
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task config [name [value | '']]
|
.B task config [name [value | '']]
|
||||||
Add, modify and remove settings directly in the taskwarrior configuration.
|
Add, modify and remove settings directly in the Taskwarrior configuration.
|
||||||
This command either modifies the 'name' setting with a new value of 'value',
|
This command either modifies the 'name' setting with a new value of 'value',
|
||||||
or adds a new entry that is equivalent to 'name=value':
|
or adds a new entry that is equivalent to 'name=value':
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ Finally, this command removes any 'name=...' entry from the .taskrc file:
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task context <name>
|
.B task context <name>
|
||||||
Sets the currectly active context. See the CONTEXT section.
|
Sets the currently active context. See the CONTEXT section.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ Reverts the most recent action. Obeys the confirmation setting.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task version
|
.B task version
|
||||||
Shows the taskwarrior version number.
|
Shows the Taskwarrior version number.
|
||||||
|
|
||||||
.SH HELPER SUBCOMMANDS
|
.SH HELPER SUBCOMMANDS
|
||||||
|
|
||||||
@@ -566,7 +566,7 @@ Displays the urgency measure of a task.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task _version
|
.B task _version
|
||||||
Shows only the taskwarrior version number.
|
Shows only the Taskwarrior version number.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B task _zshcommands
|
.B task _zshcommands
|
||||||
@@ -870,7 +870,7 @@ The original example therefore must be entered as:
|
|||||||
task '( project:Home or project:Garden )' list
|
task '( project:Home or project:Garden )' list
|
||||||
|
|
||||||
This includes quotes to escape the parentheses, so that the shell doesn't
|
This includes quotes to escape the parentheses, so that the shell doesn't
|
||||||
interpret them and hide them from taskwarrior.
|
interpret them and hide them from Taskwarrior.
|
||||||
|
|
||||||
There is redundancy between operators, attribute modifiers and other syntactic
|
There is redundancy between operators, attribute modifiers and other syntactic
|
||||||
sugar. For example, the following are all equivalent:
|
sugar. For example, the following are all equivalent:
|
||||||
@@ -1083,7 +1083,7 @@ Contexts are permanent, and the currently set context name is stored in the
|
|||||||
"context.<name>" configuration variable.
|
"context.<name>" configuration variable.
|
||||||
|
|
||||||
.SH COMMAND ABBREVIATION
|
.SH COMMAND ABBREVIATION
|
||||||
All taskwarrior commands may be abbreviated as long as a unique prefix is used,
|
All Taskwarrior commands may be abbreviated as long as a unique prefix is used,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
@@ -1122,7 +1122,7 @@ $ task add "quoted ' quote"
|
|||||||
$ task add escaped \\' quote
|
$ task add escaped \\' quote
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
The argument \-\- (a double dash) tells taskwarrior to treat all other args
|
The argument \-\- (a double dash) tells Taskwarrior to treat all other args
|
||||||
as description:
|
as description:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
@@ -1219,7 +1219,7 @@ http://www.opensource.org/licenses/mit-license.php for more information.
|
|||||||
.BR task-color(5),
|
.BR task-color(5),
|
||||||
.BR task-sync(5)
|
.BR task-sync(5)
|
||||||
|
|
||||||
For more information regarding taskwarrior, see the following:
|
For more information regarding Taskwarrior, see the following:
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
The official site at
|
The official site at
|
||||||
@@ -1235,6 +1235,6 @@ You can contact the project by emailing
|
|||||||
|
|
||||||
.SH REPORTING BUGS
|
.SH REPORTING BUGS
|
||||||
.TP
|
.TP
|
||||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
Bugs in Taskwarrior may be reported to the issue-tracker at
|
||||||
<http://taskwarrior.org>
|
<http://taskwarrior.org>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH taskrc 5 2015-04-19 "${PACKAGE_STRING}" "User Manuals"
|
.TH taskrc 5 2015-05-10 "${PACKAGE_STRING}" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
taskrc \- Configuration details for the task(1) command
|
taskrc \- Configuration details for the task(1) command
|
||||||
@@ -49,7 +49,7 @@ $ task rc.<name>=<value> ...
|
|||||||
.RE
|
.RE
|
||||||
|
|
||||||
If
|
If
|
||||||
.B taskwarrior
|
.B Taskwarrior
|
||||||
is run without an existing configuration file it will ask if it should create a
|
is run without an existing configuration file it will ask if it should create a
|
||||||
default, sample
|
default, sample
|
||||||
.I .taskrc
|
.I .taskrc
|
||||||
@@ -67,7 +67,7 @@ Whitespace is not permitted in comma-separated lists.
|
|||||||
The entry must be on a single line, no continuations.
|
The entry must be on a single line, no continuations.
|
||||||
Values support UTF8 as well as JSON encoding, such as \\uNNNN.
|
Values support UTF8 as well as JSON encoding, such as \\uNNNN.
|
||||||
|
|
||||||
Note that taskwarrior is flexible about the values used to represent Boolean
|
Note that Taskwarrior is flexible about the values used to represent Boolean
|
||||||
items. You can use "on", "yes", "y", "1" and "true".
|
items. You can use "on", "yes", "y", "1" and "true".
|
||||||
Anything else means "off".
|
Anything else means "off".
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc
|
|||||||
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-16.theme
|
include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/dark-16.theme
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
This includes two standard files that are distributed with taskwarrior, which
|
This includes two standard files that are distributed with Taskwarrior, which
|
||||||
define a set of US holidays, and set up a 16-color theme to use, to color the
|
define a set of US holidays, and set up a 16-color theme to use, to color the
|
||||||
reports and calendar.
|
reports and calendar.
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ These environment variables override defaults and command line arguments.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B TASKDATA=~/.task
|
.B TASKDATA=~/.task
|
||||||
This overrides the default path for the taskwarrior data files.
|
This overrides the default path for the Taskwarrior data files.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B TASKRC=~/.taskrc
|
.B TASKRC=~/.taskrc
|
||||||
@@ -171,7 +171,7 @@ Valid variable names and their default values are:
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B data.location=$HOME/.task
|
.B data.location=$HOME/.task
|
||||||
This is a path to the directory containing all the taskwarrior files. By
|
This is a path to the directory containing all the Taskwarrior files. By
|
||||||
default, it is set up to be ~/.task, for example: /home/paul/.task
|
default, it is set up to be ~/.task, for example: /home/paul/.task
|
||||||
|
|
||||||
Note that you can use the
|
Note that you can use the
|
||||||
@@ -294,7 +294,7 @@ and project. The others are sent to standard output.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B confirmation=yes
|
.B confirmation=yes
|
||||||
May be "yes" or "no", and determines whether taskwarrior will ask for
|
May be "yes" or "no", and determines whether Taskwarrior will ask for
|
||||||
confirmation before deleting a task or performing the undo command. The default
|
confirmation before deleting a task or performing the undo command. The default
|
||||||
value is "yes". Consider leaving this setting as "yes", for safety.
|
value is "yes". Consider leaving this setting as "yes", for safety.
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ Defaults to infix.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B dom=on
|
.B dom=on
|
||||||
Enables or disables access to taskwarrior internals and task metadata on the
|
Enables or disables access to Taskwarrior internals and task metadata on the
|
||||||
command line. Defaults to on.
|
command line. Defaults to on.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
@@ -454,7 +454,7 @@ and one for a week from tomorrow.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B undo.style=side
|
.B undo.style=side
|
||||||
When the 'undo' command is run, taskwarrior presents a before and after
|
When the 'undo' command is run, Taskwarrior presents a before and after
|
||||||
comparison of the data. This can be in either the 'side' style, which compares
|
comparison of the data. This can be in either the 'side' style, which compares
|
||||||
values side-by-side in a table, or 'diff' style, which uses a format similar to
|
values side-by-side in a table, or 'diff' style, which uses a format similar to
|
||||||
the 'diff' command.
|
the 'diff' command.
|
||||||
@@ -502,6 +502,12 @@ shows parse trees from every phase of the parse.
|
|||||||
Controls the GnuTLS diagnostic level. For 'sync' debugging. Level 0 means no
|
Controls the GnuTLS diagnostic level. For 'sync' debugging. Level 0 means no
|
||||||
diagnostics. Level 9 is the highest. Level 2 is a good setting for debugging.
|
diagnostics. Level 9 is the highest. Level 2 is a good setting for debugging.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B obfuscate=1
|
||||||
|
When set to '1', will replace all report text with 'xxx'.
|
||||||
|
This is useful for sharing report output in bug reports.
|
||||||
|
Default value is '0'.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B alias.rm=delete
|
.B alias.rm=delete
|
||||||
Taskwarrior supports command aliases. This alias provides an alternate name
|
Taskwarrior supports command aliases. This alias provides an alternate name
|
||||||
@@ -525,7 +531,7 @@ the 'history' report, for example, or 'export'.
|
|||||||
.B dateformat.annotation=
|
.B dateformat.annotation=
|
||||||
.TP
|
.TP
|
||||||
.B report.X.dateformat=Y-M-D
|
.B report.X.dateformat=Y-M-D
|
||||||
This is a string of characters that defines how taskwarrior formats date values.
|
This is a string of characters that defines how Taskwarrior formats date values.
|
||||||
The precedence order for the configuration variable is report.X.dateformat then
|
The precedence order for the configuration variable is report.X.dateformat then
|
||||||
dateformat.report then dateformat for formating the due dates in reports.
|
dateformat.report then dateformat for formating the due dates in reports.
|
||||||
If both report.X.dateformat and dateformat.report are not set then dateformat
|
If both report.X.dateformat and dateformat.report are not set then dateformat
|
||||||
@@ -755,7 +761,7 @@ holiday.eastersunday.date=easter
|
|||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
Note that the taskwarrior distribution contains example holiday files that can
|
Note that the Taskwarrior distribution contains example holiday files that can
|
||||||
be included like this:
|
be included like this:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
@@ -769,7 +775,7 @@ include ${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}/holidays.en-US.rc
|
|||||||
.B monthsperline=3
|
.B monthsperline=3
|
||||||
Determines how many months the "task calendar" command renders across the
|
Determines how many months the "task calendar" command renders across the
|
||||||
screen. Defaults to however many will fit. If more months than will fit are
|
screen. Defaults to however many will fit. If more months than will fit are
|
||||||
specified, taskwarrior will only show as many that will fit.
|
specified, Taskwarrior will only show as many that will fit.
|
||||||
|
|
||||||
.SS DEPENDENCIES
|
.SS DEPENDENCIES
|
||||||
|
|
||||||
@@ -785,7 +791,7 @@ Determines whether dependency chain repair requires confirmation.
|
|||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B color=on
|
.B color=on
|
||||||
May be "on" or "off". Determines whether taskwarrior uses color. When "off",
|
May be "on" or "off". Determines whether Taskwarrior uses color. When "off",
|
||||||
will use dashes (-----) to underline column headings.
|
will use dashes (-----) to underline column headings.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
@@ -1148,7 +1154,7 @@ command, if you don't specify values. The default is blank.
|
|||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
default.command=next
|
default.command=next
|
||||||
Provides a default command that is run every time taskwarrior is invoked with no
|
Provides a default command that is run every time Taskwarrior is invoked with no
|
||||||
arguments. For example, if set to:
|
arguments. For example, if set to:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
@@ -1158,7 +1164,7 @@ default.command=project:foo list
|
|||||||
.RE
|
.RE
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
then taskwarrior will run the "project:foo list" command if no command is
|
then Taskwarrior will run the "project:foo list" command if no command is
|
||||||
specified. This means that by merely typing
|
specified. This means that by merely typing
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
@@ -1457,7 +1463,7 @@ http://www.opensource.org/licenses/mit-license.php for more information.
|
|||||||
.BR task-color(5),
|
.BR task-color(5),
|
||||||
.BR task-sync(5)
|
.BR task-sync(5)
|
||||||
|
|
||||||
For more information regarding taskwarrior, see the following:
|
For more information regarding Taskwarrior, see the following:
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
The official site at
|
The official site at
|
||||||
@@ -1473,6 +1479,6 @@ You can contact the project by emailing
|
|||||||
|
|
||||||
.SH REPORTING BUGS
|
.SH REPORTING BUGS
|
||||||
.TP
|
.TP
|
||||||
Bugs in taskwarrior may be reported to the issue-tracker at
|
Bugs in Taskwarrior may be reported to the issue-tracker at
|
||||||
<http://taskwarrior.org>
|
<http://taskwarrior.org>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# This is a theme that disables all default colors
|
# This is a theme that disables all default colors
|
||||||
# It can be used as template for other themes
|
# It can be used as template for other themes
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#
|
#
|
||||||
# Taskwarrior solarized-dark-256 theme created by Stefan A. Keel.
|
# Taskwarrior solarized-dark-256 theme created by Stefan A. Keel.
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#
|
#
|
||||||
# Taskwarrior solarized-dark-256 theme created by Stefan A. Keel.
|
# Taskwarrior solarized-dark-256 theme created by Stefan A. Keel.
|
||||||
|
|
||||||
rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.
|
rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.
|
||||||
|
|
||||||
# General decoration
|
# General decoration
|
||||||
color.label=
|
color.label=
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -29,7 +29,7 @@ export-sql.py -- Export the taskwarrior database as a series of SQL commands.
|
|||||||
|
|
||||||
Example usage::
|
Example usage::
|
||||||
|
|
||||||
$ ./export-sql.py | sqlite3 mytasks.db
|
$ PYTHONIOENCODING=UTF-8 ./export-sql.py | sqlite3 mytasks.db
|
||||||
$ /usr/bin/sqlite3 mytasks.db "select * from annotations;"
|
$ /usr/bin/sqlite3 mytasks.db "select * from annotations;"
|
||||||
|
|
||||||
This script has only been tested with sqlite3, but in theory, it could be
|
This script has only been tested with sqlite3, but in theory, it could be
|
||||||
@@ -120,8 +120,8 @@ def to_sql(task):
|
|||||||
values = template.format(**annot)
|
values = template.format(**annot)
|
||||||
return "INSERT INTO \"annotations\" VALUES(%s)" % values
|
return "INSERT INTO \"annotations\" VALUES(%s)" % values
|
||||||
|
|
||||||
template = "{uuid}, {description}, {entry}, {end}, " + \
|
template = u"{uuid}, {description}, {entry}, {end}, " + \
|
||||||
"{priority}, {project}, {status}"
|
u"{priority}, {project}, {status}"
|
||||||
|
|
||||||
nullables = ['end', 'priority', 'project', 'status']
|
nullables = ['end', 'priority', 'project', 'status']
|
||||||
defaults = dict([(key, None) for key in nullables])
|
defaults = dict([(key, None) for key in nullables])
|
||||||
@@ -162,7 +162,7 @@ if __name__ == '__main__':
|
|||||||
sql = table_definitions + ";\n".join(lines) + ';'
|
sql = table_definitions + ";\n".join(lines) + ';'
|
||||||
|
|
||||||
# Print them out, decorated with sqlite3 trappings
|
# Print them out, decorated with sqlite3 trappings
|
||||||
print """
|
print u"""
|
||||||
BEGIN TRANSACTION;
|
BEGIN TRANSACTION;
|
||||||
{sql}
|
{sql}
|
||||||
COMMIT;""".format(sql=sql)
|
COMMIT;""".format(sql=sql)
|
||||||
|
|||||||
@@ -15,6 +15,24 @@
|
|||||||
# * Tags
|
# * Tags
|
||||||
# * Attribute names and modifiers
|
# * Attribute names and modifiers
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# You can override some default options in your config.fish:
|
||||||
|
#
|
||||||
|
# # Tab-completion of task descriptions.
|
||||||
|
# # Warning: This often creates a list of suggestions which spans several pages,
|
||||||
|
# # and it usually pushes some of the commands and attributes to the end of the
|
||||||
|
# # list.
|
||||||
|
# set -g task_complete_task yes
|
||||||
|
#
|
||||||
|
# # Tab-completion of task IDs outside of the "depends" attribute.
|
||||||
|
# # Warning: This often creates a list of suggestions which spans several pages,
|
||||||
|
# # and it pushes all commands and attributes to the end of the list.
|
||||||
|
# set -g task_complete_id yes
|
||||||
|
#
|
||||||
|
# # Attribute modifiers (DEPRECATED since 2.4.0)
|
||||||
|
# set -g task_complete_attribute_modifiers yes
|
||||||
|
#
|
||||||
|
#
|
||||||
# Copyright 2014 - 2015, Roman Inflianskas <infroma@gmail.com>
|
# Copyright 2014 - 2015, Roman Inflianskas <infroma@gmail.com>
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
@@ -150,8 +168,7 @@ function __fish.task.list.attr_value_by_name
|
|||||||
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
||||||
# case 'description' 'due' 'entry' 'end' 'start' 'project' 'recur' 'until' 'wait'
|
# case 'description' 'due' 'entry' 'end' 'start' 'project' 'recur' 'until' 'wait'
|
||||||
case '*'
|
case '*'
|
||||||
# BUG: remove in 2.4.0
|
if [ "$task_complete_attribute_modifiers" = 'yes' ]; and echo (commandline -ct) | grep -q '\.'
|
||||||
if echo (commandline -ct) | grep -q '\.'
|
|
||||||
__fish.task.combos_with_mods $attr (__fish.task.list $attr)
|
__fish.task.combos_with_mods $attr (__fish.task.list $attr)
|
||||||
else
|
else
|
||||||
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
||||||
@@ -195,7 +212,7 @@ function __fish.task.list.id
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# BUG: remove in 2.4.0
|
# Attribure modifiers (DEPRECATED since 2.4.0)
|
||||||
function __fish.task.list.mod
|
function __fish.task.list.mod
|
||||||
for mod in 'before' 'after' 'over' 'under' 'none' 'is' 'isnt' 'has' 'hasnt' 'startswith' 'endswith' 'word' 'noword'
|
for mod in 'before' 'after' 'over' 'under' 'none' 'is' 'isnt' 'has' 'hasnt' 'startswith' 'endswith' 'word' 'noword'
|
||||||
echo $mod
|
echo $mod
|
||||||
@@ -266,7 +283,7 @@ function __fish.task.combos_simple
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# BUG: remove in 2.4.0
|
# Attribure modifiers (DEPRECATED since 2.4.0)
|
||||||
function __fish.task.combos_with_mods
|
function __fish.task.combos_with_mods
|
||||||
__fish.task.combos_simple $argv
|
__fish.task.combos_simple $argv
|
||||||
for mod in (__fish.task.list.mod)
|
for mod in (__fish.task.list.mod)
|
||||||
@@ -290,16 +307,10 @@ __fish.task.complete attr_value
|
|||||||
__fish.task.complete attr_name
|
__fish.task.complete attr_name
|
||||||
__fish.task.complete config
|
__fish.task.complete config
|
||||||
|
|
||||||
# Uncomment the following line if you want tab-completion of task descriptions.
|
if [ "$task_complete_task" = 'yes' ]
|
||||||
# Warning: This often creates a list of suggestions which spans several pages,
|
__fish.task.complete task
|
||||||
# and it usually pushes some of the commands and attributes to the end of the
|
end
|
||||||
# list.
|
|
||||||
|
|
||||||
#__fish.task.complete task
|
if [ "$task_complete_id" = 'yes' ]
|
||||||
|
__fish.task.complete id with_description
|
||||||
# Uncomment the following line if you want tab-completion of task IDs outside
|
end
|
||||||
# of the "depends" attribute. Warning: This often creates a list of
|
|
||||||
# suggestions which spans several pages, and it pushes all commands and
|
|
||||||
# attributes to the end of the list.
|
|
||||||
|
|
||||||
#__fish.task.complete id with_description
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ std::string Config::_defaults =
|
|||||||
"color=on # Enable color\n"
|
"color=on # Enable color\n"
|
||||||
#if defined(LINUX) || defined(DARWIN)
|
#if defined(LINUX) || defined(DARWIN)
|
||||||
"\n"
|
"\n"
|
||||||
"rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.\n"
|
"rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# General decoration\n"
|
"# General decoration\n"
|
||||||
"color.label=\n"
|
"color.label=\n"
|
||||||
@@ -240,7 +240,7 @@ std::string Config::_defaults =
|
|||||||
"\n"
|
"\n"
|
||||||
#else
|
#else
|
||||||
"\n"
|
"\n"
|
||||||
"rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.\n"
|
"rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# General decoration\n"
|
"# General decoration\n"
|
||||||
"color.label=\n"
|
"color.label=\n"
|
||||||
@@ -329,7 +329,7 @@ std::string Config::_defaults =
|
|||||||
"# Here is the rule precedence order, highest to lowest.\n"
|
"# Here is the rule precedence order, highest to lowest.\n"
|
||||||
"# Note that these are just the color rule names, without the leading 'color.'\n"
|
"# Note that these are just the color rule names, without the leading 'color.'\n"
|
||||||
"# and any trailing '.value'.\n"
|
"# and any trailing '.value'.\n"
|
||||||
"rule.precedence.color=deleted,completed,active,keyword.,tag.,uda.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,pri.\n"
|
"rule.precedence.color=deleted,completed,active,keyword.,tag.,project.,overdue,scheduled,due.today,due,blocked,blocking,recurring,tagged,uda.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"#default.project=foo # Default project for 'add' command\n"
|
"#default.project=foo # Default project for 'add' command\n"
|
||||||
"#default.due=eom # Default due date for 'add' command\n"
|
"#default.due=eom # Default due date for 'add' command\n"
|
||||||
@@ -342,6 +342,7 @@ std::string Config::_defaults =
|
|||||||
"list.all.tags=no # Include old tag names in 'tags' command\n"
|
"list.all.tags=no # Include old tag names in 'tags' command\n"
|
||||||
"print.empty.columns=no # Print columns which have no data for any task\n"
|
"print.empty.columns=no # Print columns which have no data for any task\n"
|
||||||
"debug=no # Display diagnostics\n"
|
"debug=no # Display diagnostics\n"
|
||||||
|
"obfuscate=no # Obfuscate data for error reporting\n"
|
||||||
"fontunderline=yes # Uses underlines rather than -------\n"
|
"fontunderline=yes # Uses underlines rather than -------\n"
|
||||||
"shell.prompt=task> # Prompt used by the shell command\n"
|
"shell.prompt=task> # Prompt used by the shell command\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ int Context::dispatch (std::string &out)
|
|||||||
// possible.
|
// possible.
|
||||||
if (c->displays_id () && !tdb2.read_only ())
|
if (c->displays_id () && !tdb2.read_only ())
|
||||||
{
|
{
|
||||||
run_gc = true;
|
run_gc = config.getBoolean ("gc");
|
||||||
tdb2.gc ();
|
tdb2.gc ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
48
src/File.cpp
48
src/File.cpp
@@ -28,14 +28,10 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#ifdef SOLARIS
|
#include <stdio.h>
|
||||||
#include <fcntl.h> // for flock() replacement
|
#include <fcntl.h>
|
||||||
#include <string.h> // for memset()
|
|
||||||
#else
|
|
||||||
#include <sys/file.h>
|
|
||||||
#endif
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <pwd.h>
|
||||||
#include <File.h>
|
#include <File.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
@@ -151,6 +147,9 @@ void File::close ()
|
|||||||
{
|
{
|
||||||
if (_fh)
|
if (_fh)
|
||||||
{
|
{
|
||||||
|
if (_locked)
|
||||||
|
unlock ();
|
||||||
|
|
||||||
fclose (_fh);
|
fclose (_fh);
|
||||||
_fh = NULL;
|
_fh = NULL;
|
||||||
_h = -1;
|
_h = -1;
|
||||||
@@ -161,38 +160,31 @@ void File::close ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool File::lock ()
|
bool File::lock ()
|
||||||
{
|
{
|
||||||
|
_locked = false;
|
||||||
if (_fh && _h != -1)
|
if (_fh && _h != -1)
|
||||||
{
|
{
|
||||||
// Try three times before failing.
|
// l_type l_whence l_start l_len l_pid
|
||||||
int retry = 0;
|
struct flock fl = {F_WRLCK, SEEK_SET, 0, 0, 0 };
|
||||||
while (flock (_h, LOCK_NB | LOCK_EX) && ++retry <= 3)
|
fl.l_pid = getpid ();
|
||||||
;
|
if (fcntl (_h, F_SETLKW, &fl) == 0)
|
||||||
|
|
||||||
if (retry <= 3)
|
|
||||||
{
|
|
||||||
_locked = true;
|
_locked = true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_locked = false;
|
return _locked;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool File::waitForLock ()
|
void File::unlock ()
|
||||||
{
|
{
|
||||||
if (_locked)
|
if (_locked)
|
||||||
return true;
|
{
|
||||||
|
// l_type l_whence l_start l_len l_pid
|
||||||
|
struct flock fl = {F_UNLCK, SEEK_SET, 0, 0, 0 };
|
||||||
|
fl.l_pid = getpid ();
|
||||||
|
|
||||||
if (_fh && _h != -1)
|
fcntl (_h, F_SETLK, &fl);
|
||||||
if (flock (_h, LOCK_EX) == 0)
|
_locked = false;
|
||||||
{
|
}
|
||||||
_locked = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
void close ();
|
void close ();
|
||||||
|
|
||||||
bool lock ();
|
bool lock ();
|
||||||
bool waitForLock ();
|
void unlock ();
|
||||||
|
|
||||||
void read (std::string&);
|
void read (std::string&);
|
||||||
void read (std::vector <std::string>&);
|
void read (std::vector <std::string>&);
|
||||||
|
|||||||
@@ -754,14 +754,16 @@ bool Lexer::isPair (std::string& token, Lexer::Type& type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_eos - _cursor > 1 &&
|
if (_eos - _cursor >= 1 &&
|
||||||
_text[_cursor] == ':')
|
_text[_cursor] == ':')
|
||||||
{
|
{
|
||||||
_cursor++;
|
_cursor++;
|
||||||
|
|
||||||
if (isString (ignoredToken, ignoredType, '\'') ||
|
if (isString (ignoredToken, ignoredType, '\'') ||
|
||||||
isString (ignoredToken, ignoredType, '"') ||
|
isString (ignoredToken, ignoredType, '"') ||
|
||||||
isWord (ignoredToken, ignoredType))
|
isWord (ignoredToken, ignoredType) ||
|
||||||
|
_eos == _cursor ||
|
||||||
|
_text[_cursor] == ' ')
|
||||||
{
|
{
|
||||||
token = _text.substr (marker, _cursor - marker);
|
token = _text.substr (marker, _cursor - marker);
|
||||||
type = Lexer::Type::pair;
|
type = Lexer::Type::pair;
|
||||||
@@ -776,14 +778,17 @@ bool Lexer::isPair (std::string& token, Lexer::Type& type)
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Lexer::Type::tag
|
// Lexer::Type::tag
|
||||||
// ^ | <isWhiteSpace> [ +|- ] <isIdentifierStart> [ <isIdentifierNext> ]*
|
// ^ | '(' | ')' | <isWhiteSpace>
|
||||||
|
// [ +|- ] <isIdentifierStart> [ <isIdentifierNext> ]*
|
||||||
bool Lexer::isTag (std::string& token, Lexer::Type& type)
|
bool Lexer::isTag (std::string& token, Lexer::Type& type)
|
||||||
{
|
{
|
||||||
std::size_t marker = _cursor;
|
std::size_t marker = _cursor;
|
||||||
|
|
||||||
// Lookbehind: ^ | <isWhiteSpace>
|
// Lookbehind: ^ | '(' | ')' | <isWhiteSpace>
|
||||||
if (marker > 0 &&
|
if (marker > 0 &&
|
||||||
! isWhitespace (_text[marker - 1]))
|
! isWhitespace (_text[marker - 1]) &&
|
||||||
|
_text[marker - 1] != '(' &&
|
||||||
|
_text[marker - 1] != ')')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (_text[marker] == '+' ||
|
if (_text[marker] == '+' ||
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ void TF2::commit ()
|
|||||||
if (_file.open ())
|
if (_file.open ())
|
||||||
{
|
{
|
||||||
if (context.config.getBoolean ("locking"))
|
if (context.config.getBoolean ("locking"))
|
||||||
_file.waitForLock ();
|
_file.lock ();
|
||||||
|
|
||||||
// Write out all the added tasks.
|
// Write out all the added tasks.
|
||||||
std::vector <Task>::iterator task;
|
std::vector <Task>::iterator task;
|
||||||
@@ -258,7 +258,7 @@ void TF2::commit ()
|
|||||||
if (_file.open ())
|
if (_file.open ())
|
||||||
{
|
{
|
||||||
if (context.config.getBoolean ("locking"))
|
if (context.config.getBoolean ("locking"))
|
||||||
_file.waitForLock ();
|
_file.lock ();
|
||||||
|
|
||||||
// Truncate the file and rewrite.
|
// Truncate the file and rewrite.
|
||||||
_file.truncate ();
|
_file.truncate ();
|
||||||
@@ -358,7 +358,7 @@ void TF2::load_lines ()
|
|||||||
if (_file.open ())
|
if (_file.open ())
|
||||||
{
|
{
|
||||||
if (context.config.getBoolean ("locking"))
|
if (context.config.getBoolean ("locking"))
|
||||||
_file.waitForLock ();
|
_file.lock ();
|
||||||
|
|
||||||
_file.read (_lines);
|
_file.read (_lines);
|
||||||
_file.close ();
|
_file.close ();
|
||||||
|
|||||||
@@ -298,7 +298,6 @@ int TLSClient::verify_certificate () const
|
|||||||
// This verification function uses the trusted CAs in the credentials
|
// This verification function uses the trusted CAs in the credentials
|
||||||
// structure. So you must have installed one or more CA certificates.
|
// structure. So you must have installed one or more CA certificates.
|
||||||
unsigned int status = 0;
|
unsigned int status = 0;
|
||||||
|
|
||||||
const char* hostname = _host.c_str();
|
const char* hostname = _host.c_str();
|
||||||
#if GNUTLS_VERSION_NUMBER >= 0x030104
|
#if GNUTLS_VERSION_NUMBER >= 0x030104
|
||||||
if (_trust == TLSClient::ignore_hostname)
|
if (_trust == TLSClient::ignore_hostname)
|
||||||
@@ -350,7 +349,7 @@ int TLSClient::verify_certificate () const
|
|||||||
if (_debug)
|
if (_debug)
|
||||||
std::cout << "c: ERROR x509 cert import. " << gnutls_strerror (ret) << "\n";
|
std::cout << "c: ERROR x509 cert import. " << gnutls_strerror (ret) << "\n";
|
||||||
gnutls_x509_crt_deinit(cert);
|
gnutls_x509_crt_deinit(cert);
|
||||||
status = GNUTLS_E_CERTIFICATE_ERROR;
|
return GNUTLS_E_CERTIFICATE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gnutls_x509_crt_check_hostname (cert, hostname) == 0)
|
if (gnutls_x509_crt_check_hostname (cert, hostname) == 0)
|
||||||
@@ -366,7 +365,7 @@ int TLSClient::verify_certificate () const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GNUTLS_VERSION_NUMBER >= 0x030105
|
#if GNUTLS_VERSION_NUMBER >= 0x030104
|
||||||
gnutls_certificate_type_t type = gnutls_certificate_type_get (_session);
|
gnutls_certificate_type_t type = gnutls_certificate_type_get (_session);
|
||||||
gnutls_datum_t out;
|
gnutls_datum_t out;
|
||||||
ret = gnutls_certificate_verification_status_print (status, type, &out, 0);
|
ret = gnutls_certificate_verification_status_print (status, type, &out, 0);
|
||||||
@@ -377,6 +376,8 @@ int TLSClient::verify_certificate () const
|
|||||||
return GNUTLS_E_CERTIFICATE_ERROR;
|
return GNUTLS_E_CERTIFICATE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_debug)
|
||||||
|
std::cout << "c: INFO " << out.data << "\n";
|
||||||
gnutls_free (out.data);
|
gnutls_free (out.data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||||||
{
|
{
|
||||||
context.timer_render.start ();
|
context.timer_render.start ();
|
||||||
|
|
||||||
|
bool const obfuscate = context.config.getBoolean ("obfuscate");
|
||||||
bool const print_empty_columns = context.config.getBoolean ("print.empty.columns");
|
bool const print_empty_columns = context.config.getBoolean ("print.empty.columns");
|
||||||
std::vector <Column*> nonempty_columns;
|
std::vector <Column*> nonempty_columns;
|
||||||
std::vector <bool> nonempty_sort;
|
std::vector <bool> nonempty_sort;
|
||||||
@@ -321,6 +322,11 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||||||
|
|
||||||
if (cells[c].size () > max_lines)
|
if (cells[c].size () > max_lines)
|
||||||
max_lines = cells[c].size ();
|
max_lines = cells[c].size ();
|
||||||
|
|
||||||
|
if (obfuscate)
|
||||||
|
if (_columns[c]->type () == "string")
|
||||||
|
for (unsigned int line = 0; line < cells[c].size (); ++line)
|
||||||
|
cells[c][line] = obfuscateText (cells[c][line]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listing breaks are simply blank lines inserted when a column value
|
// Listing breaks are simply blank lines inserted when a column value
|
||||||
|
|||||||
@@ -114,6 +114,8 @@ void ViewText::set (int row, int col, Color color)
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
std::string ViewText::render ()
|
std::string ViewText::render ()
|
||||||
{
|
{
|
||||||
|
bool const obfuscate = context.config.getBoolean ("obfuscate");
|
||||||
|
|
||||||
// Determine minimal, ideal column widths.
|
// Determine minimal, ideal column widths.
|
||||||
std::vector <int> minimal;
|
std::vector <int> minimal;
|
||||||
std::vector <int> ideal;
|
std::vector <int> ideal;
|
||||||
@@ -265,6 +267,11 @@ std::string ViewText::render ()
|
|||||||
|
|
||||||
if (cells[col].size () > max_lines)
|
if (cells[col].size () > max_lines)
|
||||||
max_lines = cells[col].size ();
|
max_lines = cells[col].size ();
|
||||||
|
|
||||||
|
if (obfuscate)
|
||||||
|
if (_columns[col]->type () == "string")
|
||||||
|
for (unsigned int line = 0; line < cells[col].size (); ++line)
|
||||||
|
cells[col][line] = obfuscateText (cells[col][line]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < max_lines; ++i)
|
for (unsigned int i = 0; i < max_lines; ++i)
|
||||||
|
|||||||
@@ -160,20 +160,7 @@ int CmdDiagnostics::execute (std::string& output)
|
|||||||
#ifdef HAVE_COMMIT
|
#ifdef HAVE_COMMIT
|
||||||
<< " " << STRING_CMD_DIAG_COMMIT << ": " << COMMIT << "\n"
|
<< " " << STRING_CMD_DIAG_COMMIT << ": " << COMMIT << "\n"
|
||||||
#endif
|
#endif
|
||||||
<< " CMake: " << CMAKE_VERSION << "\n"
|
<< " CMake: " << CMAKE_VERSION << "\n";
|
||||||
<< " " << STRING_CMD_DIAG_CAPS << ":"
|
|
||||||
#ifdef HAVE_LIBPTHREAD
|
|
||||||
<< " +pthreads"
|
|
||||||
#else
|
|
||||||
<< " -pthreads"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBGNUTLS
|
|
||||||
<< " +tls"
|
|
||||||
#else
|
|
||||||
<< " -tls"
|
|
||||||
#endif
|
|
||||||
<< "\n";
|
|
||||||
|
|
||||||
out << " libuuid: "
|
out << " libuuid: "
|
||||||
#ifdef HAVE_UUID_UNPARSE_LOWER
|
#ifdef HAVE_UUID_UNPARSE_LOWER
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ int CmdShow::execute (std::string& output)
|
|||||||
" locking"
|
" locking"
|
||||||
" monthsperline"
|
" monthsperline"
|
||||||
" nag"
|
" nag"
|
||||||
|
" obfuscate"
|
||||||
" print.empty.columns"
|
" print.empty.columns"
|
||||||
" recurrence"
|
" recurrence"
|
||||||
" recurrence.confirmation"
|
" recurrence.confirmation"
|
||||||
|
|||||||
@@ -255,10 +255,13 @@ int CmdSync::execute (std::string& output)
|
|||||||
else if (upload_count > 0 && download_count > 0)
|
else if (upload_count > 0 && download_count > 0)
|
||||||
context.footnote (format (STRING_CMD_SYNC_SUCCESS3, upload_count, download_count));
|
context.footnote (format (STRING_CMD_SYNC_SUCCESS3, upload_count, download_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = 0;
|
||||||
}
|
}
|
||||||
else if (code == "201")
|
else if (code == "201")
|
||||||
{
|
{
|
||||||
context.footnote (STRING_CMD_SYNC_SUCCESS_NOP);
|
context.footnote (STRING_CMD_SYNC_SUCCESS_NOP);
|
||||||
|
status = 0;
|
||||||
}
|
}
|
||||||
else if (code == "301")
|
else if (code == "301")
|
||||||
{
|
{
|
||||||
@@ -266,6 +269,7 @@ int CmdSync::execute (std::string& output)
|
|||||||
context.config.set ("taskd.server", new_server);
|
context.config.set ("taskd.server", new_server);
|
||||||
context.error (STRING_CMD_SYNC_RELOCATE0);
|
context.error (STRING_CMD_SYNC_RELOCATE0);
|
||||||
context.error (" " + format (STRING_CMD_SYNC_RELOCATE1, new_server));
|
context.error (" " + format (STRING_CMD_SYNC_RELOCATE1, new_server));
|
||||||
|
status = 2;
|
||||||
}
|
}
|
||||||
else if (code == "430")
|
else if (code == "430")
|
||||||
{
|
{
|
||||||
@@ -335,6 +339,8 @@ bool CmdSync::send (
|
|||||||
const Msg& request,
|
const Msg& request,
|
||||||
Msg& response)
|
Msg& response)
|
||||||
{
|
{
|
||||||
|
// It is important that the ':' be the *last* colon, in order to support
|
||||||
|
// IPv6 addresses.
|
||||||
std::string::size_type colon = to.rfind (':');
|
std::string::size_type colon = to.rfind (':');
|
||||||
if (colon == std::string::npos)
|
if (colon == std::string::npos)
|
||||||
throw format (STRING_CMD_SYNC_BAD_SERVER, to);
|
throw format (STRING_CMD_SYNC_BAD_SERVER, to);
|
||||||
|
|||||||
@@ -58,6 +58,8 @@
|
|||||||
#include <l10n/epo-RUS.h>
|
#include <l10n/epo-RUS.h>
|
||||||
#elif PACKAGE_LANGUAGE == LANGUAGE_POL_POL
|
#elif PACKAGE_LANGUAGE == LANGUAGE_POL_POL
|
||||||
#include <l10n/pol-POL.h>
|
#include <l10n/pol-POL.h>
|
||||||
|
#elif PACKAGE_LANGUAGE == LANGUAGE_JPN_JPN
|
||||||
|
#include <l10n/jpn-JPN.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -254,10 +254,10 @@
|
|||||||
// commands/Cmd*
|
// commands/Cmd*
|
||||||
// USAGE strings are visible in 'task help'
|
// USAGE strings are visible in 'task help'
|
||||||
#define STRING_CMD_CONFLICT "Custom report '{1}' conflicts with built-in task command."
|
#define STRING_CMD_CONFLICT "Custom report '{1}' conflicts with built-in task command."
|
||||||
#define STRING_CMD_VERSION_USAGE "Shows the taskwarrior version number"
|
#define STRING_CMD_VERSION_USAGE "Shows the Taskwarrior version number"
|
||||||
#define STRING_CMD_VERSION_USAGE2 "Shows only the taskwarrior version number"
|
#define STRING_CMD_VERSION_USAGE2 "Shows only the Taskwarrior version number"
|
||||||
#define STRING_CMD_VERSION_MIT "Taskwarrior may be copied only under the terms of the MIT license, which may be found in the taskwarrior source kit."
|
#define STRING_CMD_VERSION_MIT "Taskwarrior may be copied only under the terms of the MIT license, which may be found in the Taskwarrior source kit."
|
||||||
#define STRING_CMD_VERSION_DOCS "Documentation for taskwarrior can be found using 'man task', 'man taskrc', 'man task-color', 'man task-sync' or at http://taskwarrior.org"
|
#define STRING_CMD_VERSION_DOCS "Documentation for Taskwarrior can be found using 'man task', 'man taskrc', 'man task-color', 'man task-sync' or at http://taskwarrior.org"
|
||||||
#define STRING_CMD_VERSION_BUILT "{1} {2} built for "
|
#define STRING_CMD_VERSION_BUILT "{1} {2} built for "
|
||||||
#define STRING_CMD_VERSION_UNKNOWN "unknown"
|
#define STRING_CMD_VERSION_UNKNOWN "unknown"
|
||||||
#define STRING_CMD_VERSION_COPY "Copyright (C) 2006 - 2015 P. Beckingham, F. Hernandez."
|
#define STRING_CMD_VERSION_COPY "Copyright (C) 2006 - 2015 P. Beckingham, F. Hernandez."
|
||||||
@@ -557,7 +557,7 @@
|
|||||||
#define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined."
|
#define STRING_CMD_CONTEXT_DEF_SUCC "Context '{1}' defined."
|
||||||
#define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined."
|
#define STRING_CMD_CONTEXT_DEF_FAIL "Context '{1}' not defined."
|
||||||
#define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided."
|
#define STRING_CMD_CONTEXT_DEF_USAG "Both context name and its definition must be provided."
|
||||||
#define STRING_CMD_CONTEXT_DEF_ABRT "Context definiton aborted."
|
#define STRING_CMD_CONTEXT_DEF_ABRT "Context definition aborted."
|
||||||
#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}"
|
#define STRING_CMD_CONTEXT_DEF_ABRT2 "Filter validation failed: {1}"
|
||||||
#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?"
|
#define STRING_CMD_CONTEXT_DEF_CONF "The filter '{1}' matches 0 pending tasks. Do you wish to continue?"
|
||||||
#define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted."
|
#define STRING_CMD_CONTEXT_DEL_SUCC "Context '{1}' deleted."
|
||||||
@@ -615,7 +615,7 @@
|
|||||||
#define STRING_CONFIG_DEPRECATED_VAR "Your .taskrc file contains variables that are deprecated:"
|
#define STRING_CONFIG_DEPRECATED_VAR "Your .taskrc file contains variables that are deprecated:"
|
||||||
|
|
||||||
// Context
|
// Context
|
||||||
#define STRING_CONTEXT_CREATE_RC "A configuration file could not be found in {1}\n\nWould you like a sample {2} created, so taskwarrior can proceed?"
|
#define STRING_CONTEXT_CREATE_RC "A configuration file could not be found in {1}\n\nWould you like a sample {2} created, so Taskwarrior can proceed?"
|
||||||
#define STRING_CONTEXT_NEED_RC "Cannot proceed without rc file."
|
#define STRING_CONTEXT_NEED_RC "Cannot proceed without rc file."
|
||||||
#define STRING_CONTEXT_RC_OVERRIDE "TASKRC override: {1}"
|
#define STRING_CONTEXT_RC_OVERRIDE "TASKRC override: {1}"
|
||||||
#define STRING_CONTEXT_DATA_OVERRIDE "TASKDATA override: {1}"
|
#define STRING_CONTEXT_DATA_OVERRIDE "TASKDATA override: {1}"
|
||||||
@@ -730,12 +730,12 @@
|
|||||||
#define STRING_EDIT_HEADER_1 "The 'task <id> edit' command allows you to modify all aspects of a task"
|
#define STRING_EDIT_HEADER_1 "The 'task <id> edit' command allows you to modify all aspects of a task"
|
||||||
#define STRING_EDIT_HEADER_2 "using a text editor. Below is a representation of all the task details."
|
#define STRING_EDIT_HEADER_2 "using a text editor. Below is a representation of all the task details."
|
||||||
#define STRING_EDIT_HEADER_3 "Modify what you wish, and when you save and quit your editor,"
|
#define STRING_EDIT_HEADER_3 "Modify what you wish, and when you save and quit your editor,"
|
||||||
#define STRING_EDIT_HEADER_4 "taskwarrior will read this file, determine what changed, and apply"
|
#define STRING_EDIT_HEADER_4 "Taskwarrior will read this file, determine what changed, and apply"
|
||||||
#define STRING_EDIT_HEADER_5 "those changes. If you exit your editor without saving or making"
|
#define STRING_EDIT_HEADER_5 "those changes. If you exit your editor without saving or making"
|
||||||
#define STRING_EDIT_HEADER_6 "modifications, taskwarrior will do nothing."
|
#define STRING_EDIT_HEADER_6 "modifications, Taskwarrior will do nothing."
|
||||||
|
|
||||||
#define STRING_EDIT_HEADER_7 "Lines that begin with # represent data you cannot change, like ID."
|
#define STRING_EDIT_HEADER_7 "Lines that begin with # represent data you cannot change, like ID."
|
||||||
#define STRING_EDIT_HEADER_8 "If you get too creative with your editing, taskwarrior will send you"
|
#define STRING_EDIT_HEADER_8 "If you get too creative with your editing, Taskwarrior will send you"
|
||||||
#define STRING_EDIT_HEADER_9 "back to the editor to try again."
|
#define STRING_EDIT_HEADER_9 "back to the editor to try again."
|
||||||
|
|
||||||
#define STRING_EDIT_HEADER_10 "Should you find yourself in an endless loop, re-editing the same file,"
|
#define STRING_EDIT_HEADER_10 "Should you find yourself in an endless loop, re-editing the same file,"
|
||||||
@@ -852,7 +852,7 @@
|
|||||||
#define STRING_TASK_NO_FF1 "Taskwarrior no longer supports file format 1, originally used between 27 November 2006 and 31 December 2007."
|
#define STRING_TASK_NO_FF1 "Taskwarrior no longer supports file format 1, originally used between 27 November 2006 and 31 December 2007."
|
||||||
#define STRING_TASK_NO_FF2 "Taskwarrior no longer supports file format 2, originally used between 1 January 2008 and 12 April 2009."
|
#define STRING_TASK_NO_FF2 "Taskwarrior no longer supports file format 2, originally used between 1 January 2008 and 12 April 2009."
|
||||||
#define STRING_TASK_NO_FF3 "Taskwarrior no longer supports file format 3, originally used between 23 March 2009 and 16 May 2009."
|
#define STRING_TASK_NO_FF3 "Taskwarrior no longer supports file format 3, originally used between 23 March 2009 and 16 May 2009."
|
||||||
#define STRING_TASK_PARSE_UNREC_FF "Unrecognized taskwarrior file format."
|
#define STRING_TASK_PARSE_UNREC_FF "Unrecognized Taskwarrior file format."
|
||||||
#define STRING_TASK_DEPEND_ITSELF "A task cannot be dependent on itself."
|
#define STRING_TASK_DEPEND_ITSELF "A task cannot be dependent on itself."
|
||||||
#define STRING_TASK_DEPEND_MISS_CREA "Could not create a dependency on task {1} - not found."
|
#define STRING_TASK_DEPEND_MISS_CREA "Could not create a dependency on task {1} - not found."
|
||||||
#define STRING_TASK_DEPEND_MISS_DEL "Could not delete a dependency on task {1} - not found."
|
#define STRING_TASK_DEPEND_MISS_DEL "Could not delete a dependency on task {1} - not found."
|
||||||
@@ -985,7 +985,7 @@
|
|||||||
" task add \"quoted ' quote\"\n" \
|
" task add \"quoted ' quote\"\n" \
|
||||||
" task add escaped \\' quote\n" \
|
" task add escaped \\' quote\n" \
|
||||||
"\n" \
|
"\n" \
|
||||||
"The argument -- tells taskwarrior to treat all other args as description, even " \
|
"The argument -- tells Taskwarrior to treat all other args as description, even " \
|
||||||
"if they would otherwise be attributes or tags:\n" \
|
"if they would otherwise be attributes or tags:\n" \
|
||||||
" task add -- project:Home needs scheduling\n" \
|
" task add -- project:Home needs scheduling\n" \
|
||||||
"\n" \
|
"\n" \
|
||||||
@@ -994,7 +994,7 @@
|
|||||||
"\n"
|
"\n"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
To be included later, before the 'precendence' line.
|
To be included later, before the 'precedence' line.
|
||||||
|
|
||||||
" + - Addition, subtraction\n" \
|
" + - Addition, subtraction\n" \
|
||||||
" ! Inversion\n" \
|
" ! Inversion\n" \
|
||||||
|
|||||||
1020
src/l10n/jpn-JPN.h
Normal file
1020
src/l10n/jpn-JPN.h
Normal file
File diff suppressed because it is too large
Load Diff
32
src/text.cpp
32
src/text.cpp
@@ -624,6 +624,38 @@ int strippedLength (const std::string& input)
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
const std::string obfuscateText (const std::string& input)
|
||||||
|
{
|
||||||
|
std::stringstream output;
|
||||||
|
std::string::size_type i = 0;
|
||||||
|
int character;
|
||||||
|
bool inside = false;
|
||||||
|
|
||||||
|
while ((character = utf8_next_char (input, i)))
|
||||||
|
{
|
||||||
|
if (inside)
|
||||||
|
{
|
||||||
|
output << (char) character;
|
||||||
|
|
||||||
|
if (character == 'm')
|
||||||
|
inside = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (character == 033)
|
||||||
|
inside = true;
|
||||||
|
|
||||||
|
if (inside || character == ' ')
|
||||||
|
output << (char) character;
|
||||||
|
else
|
||||||
|
output << 'x';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.str ();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const std::string format (char value)
|
const std::string format (char value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ bool closeEnough (const std::string&, const std::string&, unsigned int minLength
|
|||||||
std::string::size_type find (const std::string&, const std::string&, bool sensitive = true);
|
std::string::size_type find (const std::string&, const std::string&, bool sensitive = true);
|
||||||
std::string::size_type find (const std::string&, const std::string&, std::string::size_type, bool sensitive = true);
|
std::string::size_type find (const std::string&, const std::string&, std::string::size_type, bool sensitive = true);
|
||||||
int strippedLength (const std::string&);
|
int strippedLength (const std::string&);
|
||||||
|
const std::string obfuscateText (const std::string&);
|
||||||
const std::string format (char);
|
const std::string format (char);
|
||||||
const std::string format (int);
|
const std::string format (int);
|
||||||
const std::string formatHex (int);
|
const std::string formatHex (int);
|
||||||
|
|||||||
35
src/util.cpp
35
src/util.cpp
@@ -42,7 +42,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -228,40 +227,6 @@ const std::string uuid ()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// On Solaris no flock function exists.
|
|
||||||
#ifdef SOLARIS
|
|
||||||
int flock (int fd, int operation)
|
|
||||||
{
|
|
||||||
struct flock fl;
|
|
||||||
|
|
||||||
switch (operation & ~LOCK_NB)
|
|
||||||
{
|
|
||||||
case LOCK_SH:
|
|
||||||
fl.l_type = F_RDLCK;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOCK_EX:
|
|
||||||
fl.l_type = F_WRLCK;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOCK_UN:
|
|
||||||
fl.l_type = F_UNLCK;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fl.l_whence = 0;
|
|
||||||
fl.l_start = 0;
|
|
||||||
fl.l_len = 0;
|
|
||||||
|
|
||||||
return fcntl (fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &fl);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Run a binary with args, capturing output.
|
// Run a binary with args, capturing output.
|
||||||
int execute (
|
int execute (
|
||||||
|
|||||||
@@ -52,15 +52,6 @@ const std::string uuid ();
|
|||||||
|
|
||||||
int execute (const std::string&, const std::vector <std::string>&, const std::string&, std::string&);
|
int execute (const std::string&, const std::vector <std::string>&, const std::string&, std::string&);
|
||||||
|
|
||||||
#ifdef SOLARIS
|
|
||||||
#define LOCK_SH 1
|
|
||||||
#define LOCK_EX 2
|
|
||||||
#define LOCK_NB 4
|
|
||||||
#define LOCK_UN 8
|
|
||||||
|
|
||||||
int flock (int, int);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const std::string indentProject (
|
const std::string indentProject (
|
||||||
const std::string&,
|
const std::string&,
|
||||||
const std::string& whitespace = " ",
|
const std::string& whitespace = " ",
|
||||||
|
|||||||
4
test/.gitignore
vendored
4
test/.gitignore
vendored
@@ -2,6 +2,10 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.data
|
*.data
|
||||||
*.log
|
*.log
|
||||||
|
*.runlog
|
||||||
|
_run_all_parallel.txt
|
||||||
|
_run_all_serial.txt
|
||||||
|
_run_all_parallel_rc1
|
||||||
autocomplete.t
|
autocomplete.t
|
||||||
color.t
|
color.t
|
||||||
config.t
|
config.t
|
||||||
|
|||||||
@@ -2,4 +2,5 @@ Shell environment variables that affect how and what tests are executed:
|
|||||||
|
|
||||||
TASKW_SKIP -> Causes any test that needs Taskwarrior (task binary) to be skipped
|
TASKW_SKIP -> Causes any test that needs Taskwarrior (task binary) to be skipped
|
||||||
TASKD_SKIP -> Causes any test that needs Task Server (taskd binary) to be skipped
|
TASKD_SKIP -> Causes any test that needs Task Server (taskd binary) to be skipped
|
||||||
USE_PATH -> Causes tests to look for "task" and "taskd" in PATH instead of the default location
|
TASK_USE_PATH -> Causes tests to look for "task" in PATH instead of the default location
|
||||||
|
TASKD_USE_PATH -> Causes tests to look for "taskd" in PATH instead of the default location
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class Task(object):
|
|||||||
return f.readlines()
|
return f.readlines()
|
||||||
|
|
||||||
def runSuccess(self, args=(), input=None, merge_streams=False,
|
def runSuccess(self, args=(), input=None, merge_streams=False,
|
||||||
timeout=1):
|
timeout=5):
|
||||||
"""Invoke task with given arguments and fail if exit code != 0
|
"""Invoke task with given arguments and fail if exit code != 0
|
||||||
|
|
||||||
Use runError if you want exit_code to be tested automatically and
|
Use runError if you want exit_code to be tested automatically and
|
||||||
@@ -167,6 +167,19 @@ class Task(object):
|
|||||||
"""
|
"""
|
||||||
# Create a copy of the command
|
# Create a copy of the command
|
||||||
command = self._command[:]
|
command = self._command[:]
|
||||||
|
|
||||||
|
# Enable nicer-looking calls by allowing plain strings
|
||||||
|
try:
|
||||||
|
# Python 2.x
|
||||||
|
if isinstance(args, basestring):
|
||||||
|
import shlex
|
||||||
|
args = shlex.split(args)
|
||||||
|
except NameError:
|
||||||
|
# Python 3.x
|
||||||
|
if isinstance(args, str):
|
||||||
|
import shlex
|
||||||
|
args = shlex.split(args)
|
||||||
|
|
||||||
command.extend(args)
|
command.extend(args)
|
||||||
|
|
||||||
output = run_cmd_wait_nofail(command, input,
|
output = run_cmd_wait_nofail(command, input,
|
||||||
@@ -179,7 +192,7 @@ class Task(object):
|
|||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def runError(self, args=(), input=None, merge_streams=False, timeout=1):
|
def runError(self, args=(), input=None, merge_streams=False, timeout=5):
|
||||||
"""Invoke task with given arguments and fail if exit code == 0
|
"""Invoke task with given arguments and fail if exit code == 0
|
||||||
|
|
||||||
Use runSuccess if you want exit_code to be tested automatically and
|
Use runSuccess if you want exit_code to be tested automatically and
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division, print_function
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
@@ -81,6 +81,7 @@ class Taskd(object):
|
|||||||
run_cmd_wait(cmd, env=self.env)
|
run_cmd_wait(cmd, env=self.env)
|
||||||
|
|
||||||
self.config("server", "{0}:{1}".format(self.address, self.port))
|
self.config("server", "{0}:{1}".format(self.address, self.port))
|
||||||
|
self.config("family", "IPv4")
|
||||||
self.config("log", self.tasklog)
|
self.config("log", self.tasklog)
|
||||||
self.config("pid.file", self.taskpid)
|
self.config("pid.file", self.taskpid)
|
||||||
self.config("root", self.datadir)
|
self.config("root", self.datadir)
|
||||||
@@ -207,6 +208,8 @@ class Taskd(object):
|
|||||||
self.proc = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=DEVNULL,
|
self.proc = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=DEVNULL,
|
||||||
env=self.env)
|
env=self.env)
|
||||||
else:
|
else:
|
||||||
|
self.show_log_contents()
|
||||||
|
|
||||||
raise OSError("Taskd server is still running or crashed")
|
raise OSError("Taskd server is still running or crashed")
|
||||||
|
|
||||||
# Wait for server to listen by checking connectivity in the port
|
# Wait for server to listen by checking connectivity in the port
|
||||||
@@ -218,6 +221,8 @@ class Taskd(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
elif status == self.TASKD_NEVER_STARTED:
|
elif status == self.TASKD_NEVER_STARTED:
|
||||||
|
self.show_log_contents()
|
||||||
|
|
||||||
raise OSError("Task server was never started. "
|
raise OSError("Task server was never started. "
|
||||||
"This shouldn't happen!!")
|
"This shouldn't happen!!")
|
||||||
|
|
||||||
@@ -225,6 +230,8 @@ class Taskd(object):
|
|||||||
# Collect output logs
|
# Collect output logs
|
||||||
out, err = self.proc.communicate()
|
out, err = self.proc.communicate()
|
||||||
|
|
||||||
|
self.show_log_contents()
|
||||||
|
|
||||||
raise OSError(
|
raise OSError(
|
||||||
"Task server launched with '{0}' crashed or exited "
|
"Task server launched with '{0}' crashed or exited "
|
||||||
"prematurely. Exit code: {1}. "
|
"prematurely. Exit code: {1}. "
|
||||||
@@ -242,14 +249,18 @@ class Taskd(object):
|
|||||||
sleep(1 / tries_per_minute)
|
sleep(1 / tries_per_minute)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
self.show_log_contents()
|
||||||
|
|
||||||
raise OSError("Unknown running status for taskd '{0}'".format(
|
raise OSError("Unknown running status for taskd '{0}'".format(
|
||||||
status))
|
status))
|
||||||
|
|
||||||
# Force stop so we can collect output
|
# Force stop so we can collect output
|
||||||
self.stop()
|
proc = self.stop()
|
||||||
|
|
||||||
# Collect output logs
|
# Collect output logs
|
||||||
out, err = self.proc.communicate()
|
out, err = proc.communicate()
|
||||||
|
|
||||||
|
self.show_log_contents()
|
||||||
|
|
||||||
raise OSError("Task server didn't start and listen on port {0} after "
|
raise OSError("Task server didn't start and listen on port {0} after "
|
||||||
"{1} minutes. Stdout: {2!r}. Stderr: {3!r}.".format(
|
"{1} minutes. Stdout: {2!r}. Stderr: {3!r}.".format(
|
||||||
@@ -259,6 +270,8 @@ class Taskd(object):
|
|||||||
"""Stop the server by sending a SIGTERM and SIGKILL if fails to
|
"""Stop the server by sending a SIGTERM and SIGKILL if fails to
|
||||||
terminate.
|
terminate.
|
||||||
If it's already stopped OSError will be raised
|
If it's already stopped OSError will be raised
|
||||||
|
|
||||||
|
Returns: a reference to the old process object
|
||||||
"""
|
"""
|
||||||
if self.proc is None:
|
if self.proc is None:
|
||||||
raise OSError("Taskd server is not running")
|
raise OSError("Taskd server is not running")
|
||||||
@@ -272,9 +285,14 @@ class Taskd(object):
|
|||||||
# Wait for process to end to avoid zombies
|
# Wait for process to end to avoid zombies
|
||||||
self.proc.wait()
|
self.proc.wait()
|
||||||
|
|
||||||
|
# Keep a reference to the old process
|
||||||
|
proc = self.proc
|
||||||
|
|
||||||
# Unset the process to inform that no process is running
|
# Unset the process to inform that no process is running
|
||||||
self.proc = None
|
self.proc = None
|
||||||
|
|
||||||
|
return proc
|
||||||
|
|
||||||
def _check_pid(self):
|
def _check_pid(self):
|
||||||
"Check if self.proc is still running and a PID still exists"
|
"Check if self.proc is still running and a PID still exists"
|
||||||
# Wait ~1 sec for taskd to finish
|
# Wait ~1 sec for taskd to finish
|
||||||
@@ -339,4 +357,14 @@ class Taskd(object):
|
|||||||
|
|
||||||
return parse_datafile(file)
|
return parse_datafile(file)
|
||||||
|
|
||||||
|
def show_log_contents(self):
|
||||||
|
"""Print to to STDOUT the contents of taskd.log
|
||||||
|
"""
|
||||||
|
if os.path.isfile(self.tasklog):
|
||||||
|
with open(self.tasklog) as fh:
|
||||||
|
print("#### Start taskd.log ####")
|
||||||
|
for line in fh:
|
||||||
|
print(line, end='')
|
||||||
|
print("#### End taskd.log ####")
|
||||||
|
|
||||||
# vim: ai sts=4 et sw=4
|
# vim: ai sts=4 et sw=4
|
||||||
|
|||||||
@@ -129,9 +129,9 @@ def _queue_output(arguments, pidq, outputq):
|
|||||||
outputq.put((
|
outputq.put((
|
||||||
"",
|
"",
|
||||||
("Unexpected exception caught during execution of taskw: '{0}' . "
|
("Unexpected exception caught during execution of taskw: '{0}' . "
|
||||||
"If you are running out-of-tree tests set USE_PATH=1 in shell "
|
"If you are running out-of-tree tests set TASK_USE_PATH=1 or "
|
||||||
"env before execution and add the location of the task binary to "
|
"TASKD_USE_PATH=1 in shell env before execution and add the "
|
||||||
"the PATH".format(e)),
|
"location of the task(d) binary to the PATH".format(e)),
|
||||||
255)) # false exitcode
|
255)) # false exitcode
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
#! /usr/bin/env perl
|
|
||||||
################################################################################
|
|
||||||
##
|
|
||||||
## Copyright 2006 - 2015, 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
|
|
||||||
## in the Software without restriction, including without limitation the rights
|
|
||||||
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
## copies of the Software, and to permit persons to whom the Software is
|
|
||||||
## furnished to do so, subject to the following conditions:
|
|
||||||
##
|
|
||||||
## The above copyright notice and this permission notice shall be included
|
|
||||||
## in all copies or substantial portions of the Software.
|
|
||||||
##
|
|
||||||
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
## SOFTWARE.
|
|
||||||
##
|
|
||||||
## http://www.opensource.org/licenses/mit-license.php
|
|
||||||
##
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 2;
|
|
||||||
|
|
||||||
# Ensure environment has no influence.
|
|
||||||
delete $ENV{'TASKDATA'};
|
|
||||||
delete $ENV{'TASKRC'};
|
|
||||||
|
|
||||||
use File::Basename;
|
|
||||||
my $ut = basename ($0);
|
|
||||||
my $rc = $ut . '.rc';
|
|
||||||
|
|
||||||
# Create the rc file.
|
|
||||||
if (open my $fh, '>', $rc)
|
|
||||||
{
|
|
||||||
print $fh "data.location=.\n",
|
|
||||||
"confirmation=no\n";
|
|
||||||
close $fh;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Setup: Add a recurring task then remove the due date.
|
|
||||||
qx{../src/task rc:$rc add foo recur:yearly due:eoy 2>&1};
|
|
||||||
qx{../src/task rc:$rc list 2>&1};
|
|
||||||
qx{../src/task rc:$rc 2 modify due: 2>&1};
|
|
||||||
|
|
||||||
# Result: Somehow the due date is incremented and wraps around to 12/31/1969,
|
|
||||||
# then keeps going back to today.
|
|
||||||
my $output = qx{../src/task rc:$rc list 2>&1};
|
|
||||||
like ($output, qr/^1 task$/ms, "$ut: task foo shown");
|
|
||||||
unlike ($output, qr/1969/ms, "$ut: Should not display 12/31/1969");
|
|
||||||
|
|
||||||
# Cleanup.
|
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
|
|
||||||
exit 0;
|
|
||||||
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
#! /usr/bin/env perl
|
|
||||||
################################################################################
|
|
||||||
##
|
|
||||||
## Copyright 2006 - 2015, 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
|
|
||||||
## in the Software without restriction, including without limitation the rights
|
|
||||||
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
## copies of the Software, and to permit persons to whom the Software is
|
|
||||||
## furnished to do so, subject to the following conditions:
|
|
||||||
##
|
|
||||||
## The above copyright notice and this permission notice shall be included
|
|
||||||
## in all copies or substantial portions of the Software.
|
|
||||||
##
|
|
||||||
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
## SOFTWARE.
|
|
||||||
##
|
|
||||||
## http://www.opensource.org/licenses/mit-license.php
|
|
||||||
##
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 2;
|
|
||||||
|
|
||||||
# Ensure environment has no influence.
|
|
||||||
delete $ENV{'TASKDATA'};
|
|
||||||
delete $ENV{'TASKRC'};
|
|
||||||
|
|
||||||
use File::Basename;
|
|
||||||
my $ut = basename ($0);
|
|
||||||
my $rc = $ut . '.rc';
|
|
||||||
|
|
||||||
# Create the rc file.
|
|
||||||
if (open my $fh, '>', $rc)
|
|
||||||
{
|
|
||||||
print $fh "data.location=.\n",
|
|
||||||
"dateformat.info=m/d/Y\n",
|
|
||||||
"confirmation=no\n";
|
|
||||||
close $fh;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Setup: Add a recurring task, generate an instance, then add a project.
|
|
||||||
qx{../src/task rc:$rc add foo due:today recur:daily until:eom 2>&1};
|
|
||||||
my $output = qx{../src/task rc:$rc info 1 2>&1};
|
|
||||||
|
|
||||||
# Result: Make sure the 'until' date is rendered as a date, not an epoch.
|
|
||||||
unlike ($output, qr/Until\s+\d{10}/, "$ut: until is not shown as an epoch");
|
|
||||||
like ($output, qr/Until\s+\d+\/\d+\/\d{4}/, "$ut: until is shown as a date");
|
|
||||||
|
|
||||||
# Cleanup.
|
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
|
|
||||||
exit 0;
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ int main (int argc, char** argv)
|
|||||||
t.notok (d9.up (), "parent / --> false");
|
t.notok (d9.up (), "parent / --> false");
|
||||||
|
|
||||||
// Test permissions.
|
// Test permissions.
|
||||||
umask(0022);
|
umask (0022);
|
||||||
Directory d10 ("tmp/dir.perm");
|
Directory d10 ("tmp/dir.perm");
|
||||||
d10.create (0750);
|
d10.create (0750);
|
||||||
t.ok (d10.exists (), "Directory::create perm file exists");
|
t.ok (d10.exists (), "Directory::create perm file exists");
|
||||||
|
|||||||
73
test/feature.recurrence.t
Executable file
73
test/feature.recurrence.t
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
#!/usr/bin/env python2.7
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright 2006 - 2015, 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
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
#
|
||||||
|
# http://www.opensource.org/licenses/mit-license.php
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import unittest
|
||||||
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
from basetest import Task, TestCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestRecurrenceProblems(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.t = Task()
|
||||||
|
|
||||||
|
def test_recurring_due_removal(self):
|
||||||
|
"""Removing due from a recurring task causes date wrapping"""
|
||||||
|
# Originally bug.327.t
|
||||||
|
|
||||||
|
self.t(("add", "foo", "recur:yearly", "due:eoy"))
|
||||||
|
self.t(("list",)) # Trigger garbage collection
|
||||||
|
|
||||||
|
code, out, err = self.t.runError(("2", "modify", "due:"))
|
||||||
|
self.assertIn("cannot remove the due date from a recurring task", err)
|
||||||
|
|
||||||
|
code, out, err = self.t(("list",))
|
||||||
|
|
||||||
|
self.assertIn("\n1 task", out)
|
||||||
|
self.assertNotIn("1969", out)
|
||||||
|
|
||||||
|
def test_recurring_not_as_epoch(self):
|
||||||
|
"""Ensure 'until' is rendered as date, not epoch"""
|
||||||
|
# Originally bug.368.t
|
||||||
|
|
||||||
|
self.t.config("dateformat.info", "m/d/Y")
|
||||||
|
|
||||||
|
self.t(("add", "foo", "due:today", "recur:yearly", "until:eom"))
|
||||||
|
code, out, err = self.t(("info", "1"))
|
||||||
|
|
||||||
|
self.assertNotRegexpMatches(out, "Until\s+\d{10}")
|
||||||
|
self.assertRegexpMatches(out, "Until\s+\d+\/\d+\/\d{4}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from simpletap import TAPTestRunner
|
||||||
|
unittest.main(testRunner=TAPTestRunner())
|
||||||
|
|
||||||
|
# vim: ai sts=4 et sw=4
|
||||||
@@ -36,16 +36,17 @@ from basetest import Task, TestCase
|
|||||||
|
|
||||||
|
|
||||||
class TestFilter(TestCase):
|
class TestFilter(TestCase):
|
||||||
def setUp(self):
|
@classmethod
|
||||||
self.t = Task()
|
def setUpClass(cls):
|
||||||
|
cls.t = Task()
|
||||||
|
|
||||||
self.t(("add", "project:A", "prio:H", "+tag", "one", "foo"))
|
cls.t(("add", "project:A", "prio:H", "+tag", "one", "foo"))
|
||||||
self.t(("add", "project:A", "prio:H", "two"))
|
cls.t(("add", "project:A", "prio:H", "two"))
|
||||||
self.t(("add", "project:A", "three"))
|
cls.t(("add", "project:A", "three"))
|
||||||
self.t(("add", "prio:H", "four"))
|
cls.t(("add", "prio:H", "four"))
|
||||||
self.t(("add", "+tag", "five"))
|
cls.t(("add", "+tag", "five"))
|
||||||
self.t(("add", "six", "foo"))
|
cls.t(("add", "six", "foo"))
|
||||||
self.t(("add", "prio:L", "seven", "bar", "foo"))
|
cls.t(("add", "prio:L", "seven", "bar", "foo"))
|
||||||
|
|
||||||
def test_list(self):
|
def test_list(self):
|
||||||
"""filter - list"""
|
"""filter - list"""
|
||||||
|
|||||||
78
test/gc.t
Executable file
78
test/gc.t
Executable file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/usr/bin/env python2.7
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright 2006 - 2015, 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
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
#
|
||||||
|
# http://www.opensource.org/licenses/mit-license.php
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import unittest
|
||||||
|
# Ensure python finds the local simpletap module
|
||||||
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
from basetest import Task, TestCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestGC(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.t = Task()
|
||||||
|
self.t.config("report.gctest.description", "gctest")
|
||||||
|
self.t.config("report.gctest.columns", "id,description,tags")
|
||||||
|
self.t.config("report.gctest.sort", "id+")
|
||||||
|
self.t("add one")
|
||||||
|
self.t("add two")
|
||||||
|
self.t("add three")
|
||||||
|
|
||||||
|
def test_gc_off_id(self):
|
||||||
|
"""ID retained when GC off"""
|
||||||
|
self.t.config("gc", "off")
|
||||||
|
self.t("1 done")
|
||||||
|
code, out, err = self.t("gctest")
|
||||||
|
self.assertRegexpMatches(out, "1\s+one", "should still have ID")
|
||||||
|
|
||||||
|
def test_gc_off_mod(self):
|
||||||
|
"""mod by ID after done with gc off"""
|
||||||
|
self.t.config("gc", "off")
|
||||||
|
self.t("1 done")
|
||||||
|
self.t("gctest")
|
||||||
|
self.t("2 mod +TWO")
|
||||||
|
code, out, err = self.t("gctest")
|
||||||
|
self.assertRegexpMatches(out, "2\s+two\s+TWO", "modified 'two'")
|
||||||
|
|
||||||
|
def test_gc_on_id(self):
|
||||||
|
"""IDs reshuffle after report when GC on"""
|
||||||
|
self.t.config("gc", "on")
|
||||||
|
self.t("1 done")
|
||||||
|
self.t("2 mod +TWO")
|
||||||
|
code, out, err = self.t("gctest")
|
||||||
|
self.assertRegexpMatches(out, "1\s+two\s+TWO")
|
||||||
|
self.assertRegexpMatches(out, "2\s+three")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from simpletap import TAPTestRunner
|
||||||
|
unittest.main(testRunner=TAPTestRunner())
|
||||||
|
|
||||||
|
# vim: ai sts=4 et sw=4
|
||||||
@@ -36,7 +36,7 @@ Context context;
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (765);
|
UnitTest t (789);
|
||||||
|
|
||||||
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
std::vector <std::pair <std::string, Lexer::Type>> tokens;
|
||||||
std::string token;
|
std::string token;
|
||||||
@@ -278,6 +278,7 @@ int main (int argc, char** argv)
|
|||||||
// Pair
|
// Pair
|
||||||
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "name:value", { { "name:value", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "desc.cont:pattern", { { "desc.cont:pattern", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
|
{ "desc.any:", { { "desc.any:", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "pro:'P 1'", { { "pro:'P 1'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "pro:'P 1'", { { "pro:'P 1'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "pro:PROJECT", { { "pro:PROJECT", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "pro:PROJECT", { { "pro:PROJECT", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
{ "due:'eow - 2d'", { { "due:'eow - 2d'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
{ "due:'eow - 2d'", { { "due:'eow - 2d'", Lexer::Type::pair }, NO, NO, NO, NO }, },
|
||||||
@@ -373,6 +374,9 @@ int main (int argc, char** argv)
|
|||||||
{ "desc~pattern", { { "desc", Lexer::Type::dom },
|
{ "desc~pattern", { { "desc", Lexer::Type::dom },
|
||||||
{ "~", Lexer::Type::op },
|
{ "~", Lexer::Type::op },
|
||||||
{ "pattern", Lexer::Type::dom }, NO, NO }, },
|
{ "pattern", Lexer::Type::dom }, NO, NO }, },
|
||||||
|
{ "(+tag)", { { "(", Lexer::Type::op },
|
||||||
|
{ "+tag", Lexer::Type::tag },
|
||||||
|
{ ")", Lexer::Type::op }, NO, NO }, },
|
||||||
};
|
};
|
||||||
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
#define NUM_TESTS (sizeof (lexerTests) / sizeof (lexerTests[0]))
|
||||||
|
|
||||||
|
|||||||
116
test/run_all.in
116
test/run_all.in
@@ -3,6 +3,59 @@
|
|||||||
# Look for taskd in $PATH instead of task/src/
|
# Look for taskd in $PATH instead of task/src/
|
||||||
export TASKD_USE_PATH=1
|
export TASKD_USE_PATH=1
|
||||||
|
|
||||||
|
|
||||||
|
runlog_cleanup() {
|
||||||
|
if [ -f "_run_all_parallel.txt" ]; then
|
||||||
|
rm _run_all_parallel.txt
|
||||||
|
fi
|
||||||
|
if [ -f "_run_all_serial.txt" ]; then
|
||||||
|
rm _run_all_serial.txt
|
||||||
|
fi
|
||||||
|
if [ -f "_run_all_parallel_rc1" ]; then
|
||||||
|
rm _run_all_parallel_rc1
|
||||||
|
fi
|
||||||
|
for i in *.runlog; do
|
||||||
|
# Ugly hack. :)
|
||||||
|
if [ -f "$i" ]; then
|
||||||
|
rm *.runlog
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
get_numprocs() {
|
||||||
|
numprocs=""
|
||||||
|
# Most Linux systems and OSX have getconf and _NPROCESSORS_ONLN.
|
||||||
|
if command -v getconf >/dev/null 2>&1; then
|
||||||
|
numprocs=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OpenBSD doesn't know _NPROCESSORS_ONLN, but it does have hw.ncpu
|
||||||
|
if [ "$numprocs" = "" ] && command -v sysctl >/dev/null 2>&1; then
|
||||||
|
numprocs=$(sysctl -n hw.ncpu 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we still haven't found the number of CPU cores available, give up.
|
||||||
|
if [ "$numprocs" = "" ] || [ "$numprocs" -lt 1 ]; then
|
||||||
|
echo "Couldn't find number of CPU cores for parallelization. Assuming 2." 1>&2
|
||||||
|
numprocs=2
|
||||||
|
else
|
||||||
|
numprocs=$((numprocs+1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $numprocs
|
||||||
|
}
|
||||||
|
|
||||||
|
run_all_parallel() {
|
||||||
|
numprocs=$(get_numprocs)
|
||||||
|
cat _run_all_parallel.txt | xargs -n 1 -P $numprocs sh -c 'echo "#" $0 > $0.runlog; $0 >> $0.runlog 2>&1'
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
touch _run_all_parallel_rc1
|
||||||
|
fi
|
||||||
|
rm _run_all_parallel.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rc=0
|
rc=0
|
||||||
if [ x"$1" = x"--verbose" ];
|
if [ x"$1" = x"--verbose" ];
|
||||||
then
|
then
|
||||||
@@ -24,6 +77,69 @@ then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit $rc
|
exit $rc
|
||||||
|
|
||||||
|
elif [ "$1" = "--fast" ]; then
|
||||||
|
# Useful for faster local testing, might not be portable. Use at own risk.
|
||||||
|
# Results in (almost) the exact same "all.log" as a normal run.
|
||||||
|
# Ordering is off, but could easily be adjusted to be the same.
|
||||||
|
|
||||||
|
date > all.log
|
||||||
|
|
||||||
|
# Perl is used here to get the time in seconds
|
||||||
|
# because 'date +%s' isn't supported on Solaris.
|
||||||
|
STARTEPOCH=`perl -e 'print time'`
|
||||||
|
|
||||||
|
# Clean up after aborted runs
|
||||||
|
runlog_cleanup
|
||||||
|
|
||||||
|
for i in ${TESTBLOB}; do
|
||||||
|
if [ -x "$i" ]; then
|
||||||
|
# Only Python tests are guaranteed to run isolated.
|
||||||
|
if head -n 1 "$i" | grep -q '/usr/bin/env python'; then
|
||||||
|
echo $i >> _run_all_parallel.txt
|
||||||
|
else
|
||||||
|
echo $i >> _run_all_serial.txt
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "# Skipping $(basename $i) execute bit not set" >> all.log 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
run_all_parallel&
|
||||||
|
|
||||||
|
while read i; do
|
||||||
|
echo '#' $i >>all.log
|
||||||
|
|
||||||
|
$i >> all.log 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rc=1
|
||||||
|
fi
|
||||||
|
done < _run_all_serial.txt
|
||||||
|
|
||||||
|
while [ -f "_run_all_parallel.txt" ]; do
|
||||||
|
# Wait for the parallelized tests to finish running.
|
||||||
|
sleep 1 # sleep 0.1 is not portable.
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -f "_run_all_parallel_rc1" ]; then
|
||||||
|
rc=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat *.runlog >> all.log
|
||||||
|
|
||||||
|
runlog_cleanup
|
||||||
|
|
||||||
|
date >> all.log
|
||||||
|
|
||||||
|
ENDEPOCH=`perl -e 'print time'`
|
||||||
|
RUNTIME=`expr $ENDEPOCH - $STARTEPOCH`
|
||||||
|
|
||||||
|
printf "Pass: %5d\n" `grep -c '^ok' all.log`
|
||||||
|
printf "Fail: %5d\n" `grep -c '^not' all.log`
|
||||||
|
printf "Skipped: %5d\n" `grep -c '^skip' all.log`
|
||||||
|
printf "Runtime: %5d seconds\n" $RUNTIME
|
||||||
|
exit $rc
|
||||||
|
|
||||||
else
|
else
|
||||||
date > all.log
|
date > all.log
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user