Commit graph

2611 commits

Author SHA1 Message Date
Paul Beckingham
d15cccdb7d Bug #694
- Fixed bug #694, which allows attributes to be modified while annotating a
  task (thanks to Aikido Guy).
2011-08-23 22:30:01 -04:00
Paul Beckingham
2f60bdf9d0 Bug #720
- Fixed bug #720, so that when the 'info' report renders total active time,
  it uses a lossless format (thanks to Bernhard B).
2011-08-23 22:15:00 -04:00
Paul Beckingham
89d3b4e805 Bug #737
- Fixed bug #737, which allows wait dates after due dates, but provides a
  warning (thanks to Arkady Grudzinsky).
2011-08-23 21:36:09 -04:00
Paul Beckingham
2e09ddd900 Unit Tests
- Fixed some tests that used old message text.
- Fixed tests that relied on 'log'ed tasks still being written into
  pending.data.
- Removed obsolete auto-info tests.
2011-08-23 20:12:19 -04:00
Paul Beckingham
9641dde54f Debug Mode
- No longer generates parsing diagrams if debug mode is off.
2011-08-23 07:14:26 -04:00
Paul Beckingham
1dc2257156 TDB2 Conversion
- Migrated several commands over to use TDB2.  Have to start somewhere.
2011-08-23 00:47:46 -04:00
Paul Beckingham
e573801517 TDB2 - Diagnostics
- Added a diagnostic dump of the TDB2 state in debug mode.
- Added a call to TDB2::dump at the start of TDB2::commit.
- Removed unnecessary calls to TDB2::dump.
2011-08-22 23:04:38 -04:00
Paul Beckingham
013061803f Helper Functions
- Implemented rightJustifyZero for zero-padded integer strings.
2011-08-22 22:24:43 -04:00
Paul Beckingham
589627852f Duration Bug
- Removed the unnecessary ::getInt parse before ::getNumber, which was
  causing "-1.2d" to not parse.
- Removed verbose debug statement.
2011-08-21 23:32:37 -04:00
Paul Beckingham
6ed2bcd605 Durations
- Removed support for ' 1 wk', namely spaces before and after the ordinal.
  This removes (some) ambiguity in more complex command lines.
- Fixed unit tests accordingly.
2011-08-21 23:19:10 -04:00
Paul Beckingham
501953a6da TDB2
- Verifies that a UUID is not already found in the data.  This prevents
  erroneous double-import.  Or triple...
2011-08-21 22:37:02 -04:00
Paul Beckingham
d7ba2b2b62 Portability
- Fixed compiler warning.
2011-08-21 22:36:11 -04:00
Paul Beckingham
7a778ba317 E9 operator_equal
- Fixed broken logic in operator_equal.
- Fixed typos in op_and.t unit test.
- Fixed descriptions in op_or.t.
2011-08-21 18:38:04 -04:00
Paul Beckingham
e0ecb7a2d8 E9 - Relational Operators
- Added missing-data handling for the relational operators <, <=, >
  and >=.
2011-08-21 16:54:50 -04:00
Paul Beckingham
f11c8ee5c6 Unit Tests
- Added unit tests for the '<=' and '>=' operators.  All tests pass,
  which makes a nice treat.
- Added more tests to '<' and '>' operators, so that all three data
  types are covered.
2011-08-21 16:45:38 -04:00
Paul Beckingham
a4fca31e7d Unit Tests
- Added unit tests for the '<' and '>' operators.  Many fail.  Sigh.
2011-08-21 16:28:01 -04:00
Paul Beckingham
ee42f9898f Unit Tests
- Added unit tests for the 'and', 'or' and 'xor' operators.  Many of
  them fail.  As expected.
2011-08-21 15:59:47 -04:00
Paul Beckingham
788eea8d80 E9 operator_not
- Corrected the implementation of the ! operator, which was previously
  doing ... nothing.
2011-08-21 15:38:07 -04:00
Paul Beckingham
6e976e7d7c E9 - operator_equal
- Added proper handling for missing dates to the '=' operator.  This
  is a trial run of enhancements to lots of other operators to come.
2011-08-21 14:33:10 -04:00
Paul Beckingham
2b961c128a DEVELOPER File
- Added some clarification, minor changes.
2011-08-21 14:31:49 -04:00
Paul Beckingham
de9dbbbb3d A3, Arg
- Some attribute values (ie wait:tomorrow) when parsed, need to take
  the data type of the attribute (date) and use that as an implied type
  of the value (date literal).
- Arg renders type-less and category-less values as "", instead of "none".
  Cleaner output.
2011-08-21 14:24:26 -04:00
Paul Beckingham
a3ba91c2a3 Recurrence
- Recurrence values are now stored in a parsed state, and rendered by
  Duration::formatCompact.
2011-08-21 13:43:54 -04:00
Paul Beckingham
1714601ce4 Duration
- Allowed durations to be specified numerically as seconds, in string form.
  This flexibility allows the removal of special-case handling that stores
  recurrence periods in raw form ('monthly'), reducing code size.  As a
  consequence this means that recurrence may now be rendered according to
  Duration::formatCompact, which is desirable.
- Added supporting unit tests.
2011-08-21 13:32:55 -04:00
Paul Beckingham
9a126ce717 Error Handling
- Improved some task validation errors by including data.
- Improved the phrasing of some error to be less pompous.
- Marked validation errors that need to be downgraded to warnings.
2011-08-21 12:35:47 -04:00
Paul Beckingham
1b55a48757 Unit Tests
- Eliminated obsolete benchmark.t.
- Removed the 'quick' mode logic to skip benchmarks in run_all.
- Restored bug.480.t tests that hung earlier.
2011-08-21 01:09:32 -04:00
Paul Beckingham
7aa4efef8d Expression Refactor
- Refactoring complete.  Arg objects now uses enumerations for _type
  and _category, which should help with performance.
2011-08-21 01:06:50 -04:00
Paul Beckingham
9086f51d29 Merge branch '2.0.0' of tasktools.org:task into 2.0.0 2011-08-20 17:09:04 -04:00
Paul Beckingham
215364958e Expressions Refactor - Clarified expansion rules
- Arg now has a _value member that reflects the value in play, rather
  than the input _raw value.  Only _value is used in eval.
- DOM expansion capabilities are now controlled by rc.dom.
2011-08-20 17:06:50 -04:00
Federico Hernandez
556ee1165d Portability
Added a reference to the Darwin 32bit version task to the task-faq
man page as well.
2011-08-20 23:01:47 +02:00
Paul Beckingham
c6229a6ca6 Unit Tests
- Removed benchmark2.t - it is no longer useful, and duplicates benchmark.t,
  which is itself not long for this world.
2011-08-20 14:56:09 -04:00
Paul Beckingham
438e65036b Expression Refactor
- Arguments are now categorized as either "literal" or a specific
  category, with accompanying type.  Type is inferred for literals,
  and referenced for attributes.
2011-08-20 14:02:48 -04:00
Paul Beckingham
a2a9bfc933 Portability - Building on 32-bit Darwin
- Added notes on building for 32-bit hardware running Darwin (thanks
  to John Hammond).
2011-08-20 11:16:30 -04:00
Paul Beckingham
516e368df0 Expression Refactor
- E9 now uses Arg object in place of Term.  This means A3 and E9 are
  now using a common object.
2011-08-20 10:11:24 -04:00
Paul Beckingham
816b07e868 Expressions - Refactor
- The A3::Arg object is very similar to the E9::Term object, so the two are
  being merged.  First step is to separate A3::Arg into it's own space, then
  add a _type member.
- Added more valid stop characters as terminators for various arg types.
- Removed redundant E9 special handling for dates, which is already built in
  to the Date object.
2011-08-19 22:42:19 -04:00
Paul Beckingham
7dd3e081c7 Bug #804 - URL link and break line
- Addressed bug #804 by allowing rc.hyphenate to control whether hyphens are
  inserted when long lines are broken.  This may help prevent xterm from
  mis-parsing URLs in task annotations, when wrapped (thanks to Yann Davin).
- Added unit tests.
2011-08-17 22:39:28 -04:00
Paul Beckingham
08fcb5362e Bug - Durations
- Duration were parsed as <int><unit> in A3, whereas <number><unit> is
  correct.
- Added Nibbler::str method for internal access.
- Nibbler::save, ::restore now return positions.  Useful for extracting
  substrings.
- Modified countdown.t to use the (now) correct units for durations.
2011-08-17 00:45:09 -04:00
Paul Beckingham
ee2960b9b0 Date/Duration Distinction
- When a date attribute is updated, the expression may have evaluated to
  a duration, which at this point is simply a number.  If it is below a
  certain threshold (5y) then it is considered a duration and added to
  'now', otherwise it is considered a date.
2011-08-16 23:50:26 -04:00
Paul Beckingham
ac9d1f3bfa Performance Timing
- Change the was performance measurements are taken.  This in preparation
  to automated daily perf charts, leading to efforts to speed up certain
  operations.
2011-08-15 21:53:01 -04:00
Paul Beckingham
ad38d5b92e Bug - File open issue
- If a file (pending.data) is open and locked, trying to open it again
  caused an error, whereas is now does nothing and reports success.
- Corrected timing info in Command::filter.
2011-08-14 21:23:01 -04:00
Paul Beckingham
e403574c34 Unit Test - bug.605.t
- Enabled the (failing) unit test, which now stands a chance of being
  fixed.
2011-08-14 21:03:40 -04:00
Paul Beckingham
8af6d70685 TDB2 - Timing
- Added timing information to TDB2 for performance measuring.
2011-08-14 21:02:30 -04:00
Paul Beckingham
49cabc1bfd Unit Tests
- All unit tests now clean up the new backlog.data and synch.key files.
2011-08-14 14:09:12 -04:00
Paul Beckingham
b0c8cff6a2 A3 - attribute modifier syntax
- Restored the <name>.<modifier>[:=]<value> syntax that was reduced
  to just <name>.<modifier>:<value> to make parsing easier.  Now that
  A3 is more sophisticated, we can have our sugar back.
2011-08-14 13:29:06 -04:00
Paul Beckingham
d59cddcc6c Default Command - next
- The new 'next' report is now the default command.  It was 'list', but
  'next' is much better.
2011-08-14 13:14:12 -04:00
Paul Beckingham
ef35a0cc18 TDB2 - Task IDs
- TF2::load_tasks now properly assigns task IDs.
- TDB2::next_id properly determines the next ID.
2011-08-14 13:08:37 -04:00
Paul Beckingham
f1d429cc96 E9 - Date Handling
- Made dateformat a class member, to reduce multiple lookups to one.
- Added operator-specific data handling.
2011-08-14 12:32:37 -04:00
Paul Beckingham
06d54b2e72 Commands - Calendar
- Converted the 'cal' command to TDB2.
- Reinstated command line handling for 'cal' command, but realized there
  is a conflict with filters.  Filtering disabled for 'cal' until a good
  solution is found.
- Converted recur.cpp to use TDB2, which eliminates the file locking
  problems that occur when both TDB and TDB2 are in use at the same time.
  This will cause other issues until all commands are converted to TDB2.
2011-08-14 12:04:34 -04:00
Paul Beckingham
b1ad00313f TDB2 & CmdCustom
- Converted CmdCustom to use TDB2, which means that for the first time,
  2.0 is now optimizing data load based on filter characteristics.  This
  means that "task list" and "task next" etc are now *fast*.
- Improved diagnostics for TDB2, for debugging.
2011-08-14 12:00:10 -04:00
Paul Beckingham
9a862bc75a File - locking
- Made locking an integral part of the File object, so that a client
  may now call File::lock multiple times with no effect beyond the first
  call.  This simplifies situations like the 'cal' command that must scan
  for recurrence changes, modify tasks, then optionally run a second
  report, all without locking issues.
2011-08-14 11:54:53 -04:00
Paul Beckingham
1f58856299 TDB2 - Recurrence
- Re-enabled the recurrence handling code and converted from TDB to
  TDB2.  Time for some difficult TDB2 work.  But first, coffee.
2011-08-14 10:19:59 -04:00