Commit graph

5184 commits

Author SHA1 Message Date
Paul Beckingham
b4077775c2 Filter: When GC is turned off, disable the query shortcuts, which do not apply. 2015-09-19 07:49:55 -04:00
Tomas Babej
45dea75faa CmdEdit: Do not allow concurrent edits 2015-09-16 20:24:13 -04:00
Scott Kostyshak
2690d9bdf3 Task: Correct a false-positive warning
- The command "task 1 modify due: wait:2days" gave the following
   output:

    Warning: You have specified that the 'wait' date is after the
    'due' date.

  Now, we check if the due date is zero, in which case the due date is
  being removed.
2015-09-15 17:02:59 -04:00
Paul Beckingham
11009fd3ff CLI2: Multiple 'limit:N' args are now properly handled
- The 'next' report has 'limit:page' in the filter, and when an additional arg
  was specified, only the first was obeyed. This means that it could not be
  effectively overriden.
2015-09-15 17:02:59 -04:00
Paul Beckingham
b4e5285a50 Lexer: Updated list of Unicode space characters 2015-09-15 17:02:59 -04:00
Wilhelm Schuermann
605f8020b7 Nibbler: Improve import performance
Takes the "import" performance test from 5m5s on a test machine to 13s
total.

A huge part of the previously morbid performance were memory allocation
and release for very little benefit in the JSON parser.  With this new
approach the copying is kept to a minimum.  There is still room for
improvements.
2015-09-15 18:14:18 +02:00
Wilhelm Schuermann
e478396a04 DOM: Prevent use-after-free in CLI2::canonicalize 2015-09-15 12:57:18 +02:00
Tomas Babej
514c869aea sort: Do not use Variant to sort UDA strings
String UDA defer the evaluation of the sort_compare method
to the '<' operator of the Variant class, since the logic for
comparing string UDAs (which can have custom sort orders) is
already implemented there.

However, since primary use case of Variant is the filter evaluation,
it handles trivial (empty) values in a manner which does not allow
for its direct usage as the comparison operator between sort UDAs.

When filtering, a trivial (empty) value should neither match
'uda < A' nor 'uda >= A'. However, when sorting tasks upon values of
this UDA, precisely one of the above expressions *must* be true.

This commit implements the UDA string sorting logic directly in
the sort_compare method.
2015-09-13 09:16:07 -04:00
Tomas Babej
b9f217a716 Context: Add timer that measures the total command duration explicitly 2015-09-12 17:36:57 -04:00
Paul Beckingham
ed58263c16 Timer: Added static ::now method for timestamps 2015-09-12 14:02:13 -04:00
Paul Beckingham
f42de556fa CmdUnique: Changed from std::to_string to ::format
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015
2015-09-12 09:52:09 -04:00
Paul Beckingham
75aa4008e1 CmdUnique: Missing header 2015-09-12 09:40:48 -04:00
Tomas Babej
2d0ac20720 CmdUnique: Special-case 'id' attribute 2015-09-12 09:25:01 -04:00
Paul Beckingham
d026eb759f Config: Removed unnecessary parentheses in report filters, given TW-1656 2015-09-12 09:21:05 -04:00
Paul Beckingham
360071712f CLI2: Removed references to PSEUDO args, now they are demoted to config settings 2015-09-12 09:20:31 -04:00
Paul Beckingham
84b3055690 CLI2: Pseudo-args demoted to config settings
- When 'limit:N' is encountered, it is removed from the command line, and
  added as a config setting, equivalent to 'rc.limit:N'.
- This simplifieѕ subsequent command line parsing.
2015-09-12 09:03:15 -04:00
Paul Beckingham
c59afe34c4 TW-1656: Implicitly parenthesize argv filter
- Thanks to Daniel Shahaf.
2015-09-12 08:57:38 -04:00
Paul Beckingham
1f47e8c99f TW-1692: 42//' segfaults
- Thanks to Daniel Shahaf.
2015-09-12 07:34:56 -04:00
Paul Beckingham
2bdaa37e32 CLI2: Removed unnecessary processing of filter 2015-09-11 08:44:39 -04:00
Paul Beckingham
442ef6a29b CLI2: Combined two conditions 2015-09-11 08:43:55 -04:00
Paul Beckingham
cd736a0d70 TW-1688: task fails to import
- Thanks to Rainer Müller.
2015-09-11 07:49:29 -04:00
Paul Beckingham
f55afe33d7 Color: Removed FEATURE_COLOR conditional compile
- No need any more.
2015-09-10 22:17:25 -04:00
Paul Beckingham
f2ac258bf1 Column: Missing include 2015-09-10 00:03:03 -04:00
Paul Beckingham
204f9195d2 Config: Given TW-1678, removed unsupported column formats from default config 2015-09-09 23:42:35 -04:00
Paul Beckingham
93e6ef5fb9 TW-1678: segfault in ~ViewTask()
- Column::setStyle now validates column styles.
- Thanks to Daniel Shahaf.
2015-09-09 23:41:37 -04:00
Paul Beckingham
3c54c78e3a Sorting: All dates now sort the same as 'due' dates 2015-09-08 17:57:25 -04:00
Paul Beckingham
047198bf6e CMake: Fixed regex that excludes files for tarball 2015-09-07 17:43:26 -04:00
Federico Hernandez
06c6b94fd4 Renamed 2.4.5 to 2.5.0 2015-09-07 22:54:17 +02:00
Paul Beckingham
7a0927effe Task: Project attributes are exempt from DOM expansion 2015-09-07 16:40:32 -04:00
Paul Beckingham
2854304e60 DOM: Refactored the contextual ::get 2015-09-07 16:12:54 -04:00
Paul Beckingham
992cb6369a DOM: Factored out element size 2015-09-07 15:13:12 -04:00
Paul Beckingham
3b4dc9acb3 CLI2: Removed unused arg
- Thanks to Tomas Babej.
2015-09-07 12:44:41 -04:00
Paul Beckingham
249a4b0f64 Eval: Removed useless comment 2015-09-07 12:36:23 -04:00
Tomas Babej
d210c6d07f debug: Display parser trees at level 2, eval output at 3 2015-09-07 12:22:35 -04:00
Paul Beckingham
e4132f6a02 CLI2: Expand DOM references in single-token values 2015-09-07 11:49:55 -04:00
Tomas Babej
023cc3c383 CmdEdit: Do not bump annotation timestamps without need 2015-09-06 21:54:20 -04:00
Paul Beckingham
58d52a0191 Task: Factored out eval, added eval for tags. 2015-09-06 16:26:05 -04:00
Paul Beckingham
ff965c95d3 TW-1687: task add due:som appears to be interpreted as 'someday'
- Thanks to Alan Young.
2015-09-06 15:48:05 -04:00
Paul Beckingham
c256096118 CmdDenotate: Migrated to use new MISCELLANEOUS args 2015-09-06 15:19:34 -04:00
Paul Beckingham
d60a2f9954 CLI2: Properly categorize FILTER, MODIFICATION, MISCELLANEOUS
- Now that CLI2::categorizeArgs is complete, all that remains is to make sure
  the individual commands comply.
2015-09-06 14:53:46 -04:00
Paul Beckingham
d1fe1279ed Command: Code cleanup, added ::category accessor
- The Command object failed to initialize all member on construction and
  initialized them out of order (is this still a thing in C++11?).
- The _category was the only member with no accessor, which is not right.
2015-09-06 14:07:21 -04:00
Paul Beckingham
77b17379d6 CmdAdd/Log: No longer obey context
Context is good for filtering, terrible for commands that do not take filters.
2015-09-06 14:05:58 -04:00
Paul Beckingham
9db03a317b CmdAliases: Code formatting 2015-09-06 14:05:45 -04:00
Paul Beckingham
c1e86f59e2 Color: Removed unnecessary copy 2015-09-06 12:24:49 -04:00
Paul Beckingham
16b8f90048 Task: Removed commented code 2015-09-06 03:05:19 -04:00
Paul Beckingham
af43a3119f L10n: Removed unused strings 2015-09-06 02:19:31 -04:00
Paul Beckingham
9bb2e4f8f5 CmdVersion: Removed redundant arg checks 2015-09-06 02:15:49 -04:00
Paul Beckingham
3b18ca4f50 CmdUDAs: Remvoed redundant arg checks 2015-09-06 02:14:36 -04:00
Paul Beckingham
4183667efd CmdReports: Removed redundant arg checks 2015-09-06 02:12:16 -04:00
Paul Beckingham
d55b5907cd CmdLogo: Removed redundant arg checks 2015-09-06 02:11:15 -04:00