Commit graph

63 commits

Author SHA1 Message Date
Paul Beckingham
a262d41828 Backlog
- Removed backlog file processing, which slows down processing.  When
  2.1 has taskd support, the backlog will be cleared, but until then there
  is no point in accumulating transactions.
2012-01-03 00:55:20 -05:00
Paul Beckingham
6580095002 Copyright
- Year change.
2012-01-02 23:32:10 -05:00
Paul Beckingham
e5303a2180 Deletion
- An already-completed task may now also be deleted.
- Added unit tests.
2011-10-23 23:49:25 -04:00
Paul Beckingham
fce2469f41 Deletion
- Allows the deletion of an already-completed task, provided it is
  addressed by UUID.
- Displays UUID in cases where there is no ID.
2011-10-22 23:44:54 -04:00
Paul Beckingham
670fe1f3e5 Performance
- Added std::vector::reserve calls to reduce allocations and copying.
2011-10-21 00:12:45 -04:00
Paul Beckingham
cc168b137f Code Cleanup
- Removed incorrect comment.
2011-10-10 22:53:39 -04:00
Federico Hernandez
8116c6a103 License
- moving task from GPL to MIT license
  top level src directory
2011-10-08 00:04:01 +02:00
Paul Beckingham
4470a5f156 I18N
- Localized TDB2.
- Removed old debugging comments.
- Formatting fix in CmdBurndown.
2011-10-02 17:00:40 -04:00
Paul Beckingham
87d940c46d Bugs #822, #845
- Fixed bug #822, #845, which generated incorrect IDs (thanks to Matt Kraai and
  Michelle Crane).
2011-09-29 00:00:36 -04:00
Johannes Schlatow
295e23aac4 Merge
- removed previous hack that created a zero-byte undo.data file.
  Now the undo.data is created as needed in TDB2::merge.
2011-09-13 10:28:30 +02:00
Paul Beckingham
87df2f66ec Merge
- Fixed merge, with an egregious hack for now, by creating zero-byte undo.data
  file.  This goes against the whole TDB2 philosophy, so it is temporary.
- Updated PUNCHLIST.
- Removed old tdb comment from CmdMerge.
2011-09-13 00:51:58 -04:00
Paul Beckingham
dcd0bd1de7 TDB2
- Fixed a bug, or rather a side-effect of more efficient i/o.  Now that
  a TDB2::GC call does not write out files until the final TDB2::commit,
  the GC has the effect of not modifying task IDs based on shuffling tasks
  between pending.data and completed.data until the next command.  Fixed.
2011-09-13 00:22:11 -04:00
Paul Beckingham
9ada2f554a Bug
- The modify command no longer claims that a task was modified if no
  changes were applied.
2011-09-11 13:49:07 -04:00
Paul Beckingham
195c7d5142 TDB2
- Added TDB2::all_tasks as a helper function to load and combine tasks
  from pending and completed.
2011-09-05 10:45:58 -04:00
Paul Beckingham
751e8e7f90 Import YAML
- Implemented the import-yaml.pl external script.
- Added unit tests.
- Fixed problem where the pending tasks were not loaded prior to uuid
  verification.
2011-09-05 01:11:37 -04:00
Paul Beckingham
f74c33dc02 Bug
- Fixed a silly bug whereby TDB2::gc, once it loaded the data, wiped the TF2
  objects, such that TDB2::commit didn't know there was data to write.
  Hmm.  Time for a vacation.
2011-09-03 16:32:30 -04:00
Paul Beckingham
8bf1386b78 Bug
- Fixed an even worse bug whereby TDB2::gc never even bothered to load
  the data before running the GC.  Sigh.
2011-09-03 16:31:03 -04:00
Paul Beckingham
1e510f66ef Bug
- Fixed nasty bug whereby TF2::clear wiped the file names (pending.data etc) and
  so any subsequent TDB2::commit never even opened the file.  Yikes.
2011-09-03 16:30:15 -04:00
Paul Beckingham
eb992d3523 TDB2
- Implemented TDB2::gc.  Probably with a few really nasty bugs, to
  provide nice entertainment for the rest of the weekend.
2011-09-03 12:56:26 -04:00
Paul Beckingham
3d1a5acafb TDB2
- Implemented high-level TDB2::id and TDB2:uuid that delegates to TF2.
- Fixed a bug in TDB2::modify that failed to properly overwrite a task.
2011-09-03 11:17:12 -04:00
Paul Beckingham
63eb22fc7e TDB2 Merge
- Migrated TDB::merge to TDB2::merge.
- Removed obsoleted code from TDB.
- Modified unit tests for merge to use export instead of export.csv.
2011-09-01 23:48:35 -04:00
Paul Beckingham
e9c5b96344 Build
- Missed an include file.
2011-09-01 01:20:33 -04:00
Paul Beckingham
63dfb17bbc Undo
- Undo functionality restored, although not ideal.
2011-09-01 00:46:35 -04:00
Paul Beckingham
b09351c517 Task Validation
- Fixed validation bug whereby recurring child tasks inherited the
  parent status ("recurring") instead of the expected "pending".
- Modified 'add' command to code duplicated in Task::validate.
- Cleaned up associated bug.period.t unit test.
2011-08-31 01:34:59 -04:00
Paul Beckingham
c1f33a23d3 Undo
- Stubbed the undo implementation in TB2::revert (undo as a name is
  already taken), and in the process lose the capability.
- Add detection of <modifications> when running the 'undo' command
  and generate an error.
2011-08-30 00:42:04 -04:00
Paul Beckingham
0f627bd44e TDB2
- Added TDB2::clear and TF2::clear methods.
2011-08-28 08:13:41 -04:00
Paul Beckingham
50fa2c0ddf TDB2
- Every task in pending.data an ID.
2011-08-28 00:02:15 -04:00
Paul Beckingham
1e70f00c29 TDB2
- Properly handles cases where tasks are added, then existing data files
  are loaded.  The 'add' list and the 'loaded' list needed to be merged.
2011-08-27 23:30:51 -04:00
Paul Beckingham
c23f663408 TDB2
- Fixed problem with backlog - TDB2::modify should call backlog.add_task
  but was calling backlog.modify_task.
2011-08-27 20:56:41 -04:00
Paul Beckingham
0eec42ce4a TDB2
- Corrected maintenance of the _lines vector during TDB2::add_line.
- Implemented TDB2::modify_task undo maintenance.
- Added unit tests for TDB2.  Which fail.
2011-08-27 16:33:19 -04:00
Paul Beckingham
17dfbabb39 TDB2 & Task
- Fixed next_id handling in load_tasks.
- Removed unnecessary load in next_id.
- Added missing encode call.
index 8c0d2e9..3d1b7ce 100644
--- a/src/Task.cpp
+++ b/src/Task.cpp
@@ -528,7 +528,7 @@ std::string Task::composeF4 () const
     {
       ff4 += (first ? "" : " ")
            + it->first
-           + ":\"" + json::encode (it->second) + "\"";
+           + ":\"" + encode (json::encode (it->second)) + "\"";
       first = false;
     }
   }
2011-08-27 11:18:43 -04:00
Paul Beckingham
e127f33e3a TDB2::siblings
- TDB2 helper function to locate sibling tasks.
2011-08-26 01:58:07 -04:00
Paul Beckingham
60ca284e3a TDB2::get
- Implemented high-level accessors for tasks, by ID and UUID.  This
  permits full DOM implementation.
2011-08-25 22:13:47 -04:00
Paul Beckingham
dab06f8672 Code Cleanup
- All objects now use the same convention for naming members.  The
  consistency is a good thing.
2011-08-25 21:54:28 -04:00
Paul Beckingham
fb6dc5058f TDB2
- Full implementation of TDB2::add, which includes pending/completed, undo
  and backlog.
- Removed obsolete TF2::commitUndo, which is no longer necessary.
- Added File::truncate method, to allow a TDB2 shortcut.
2011-08-25 00:29:54 -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
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
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
8af6d70685 TDB2 - Timing
- Added timing information to TDB2 for performance measuring.
2011-08-14 21:02:30 -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
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
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
Paul Beckingham
fb9e82ed0e TDB2 parsing
- TDB2::load_lines was splitting the text on \n, but because the last
  line contains \n, there was an additional blank line.  This is what
  split_minimal is for.
- split_minimal contained a copy/paste bug that added the extra line
  if the input was non-trivial, instead of if the remainder was non-
  trivial.
- Fixed incorrect unit test accordingly.
2011-08-13 23:19:11 -04:00
Paul Beckingham
bfad448f82 TDB2 - id <--> uuid mapping
- Migrated TDB mapping over to TDB2 mapping, which occurs at the TF2 level.
  This should (soon) restore task dependencies.
2011-08-13 17:43:07 -04:00
Johannes Schlatow
413f2f6db6 Bug
- merge was playing ping-pong with different undo.data results
  in a setup with three machines
2011-08-09 00:13:21 +02:00
Paul Beckingham
ffa5bc43fe E9
- Working towards arg date/duration eval.
2011-08-06 00:59:14 -04:00
Paul Beckingham
137b00a14a Expressions
- Commented out troublesome "distance_from_command" code.
- Commented out DOM diagnostics, for now.
- Commented out TDB2 diagnostics, for now.
- Category "seq" arguments are now assigned type "exp".
- All type "exp" arguments are now tokenized.
2011-07-17 13:52:55 -04:00
Paul Beckingham
3a5370ddf1 Filters
- Implemented Command::filter_shortcut to detect when a filter begins
  with "status:pending" and skip the loading/parsing of completed.data.
- Removed obsolete att.t.cpp tests.
- Removed diagnostics from TDB2::TDB2 that were causing a segfault.
  I suppose there is no std::cout available during global ctors?
2011-07-14 00:46:01 -04:00
Paul Beckingham
8827f9c978 TDB2
- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2.
- Implemented simple append writes in TDB2.
- Modified CmdImport to accept and parse JSON.
- Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks
  to return a const vector ref, which is a Very Good Thing.
- Corrected usage for the export command.
- Implemented Task::urgency as a call to Task::urgency_c, which is a const
  overload to allow urgency calculations (without caching) for const Task
  objects.
- Removed obolete code from TDB.
- Added lots of diagnostic output for TDB2 - it's annoying, but will be
  gone soon.
- Added mention in CmdHelp of the new <filter> and <modifications>
  syntax elements.  Needs more.
- Added Command::filter overload which uses TDB2.  Not in use yet.
2011-07-13 23:53:57 -04:00