- Added backlog handling for add/modify.
This commit is contained in:
Paul Beckingham 2012-10-01 23:30:57 -04:00
parent becd8f155c
commit 337e5557b3
2 changed files with 3 additions and 40 deletions

View file

@ -531,10 +531,7 @@ void TDB2::set_location (const std::string& location)
pending.target (location + "/pending.data"); pending.target (location + "/pending.data");
completed.target (location + "/completed.data"); completed.target (location + "/completed.data");
undo.target (location + "/undo.data"); undo.target (location + "/undo.data");
/*
backlog.target (location + "/backlog.data"); backlog.target (location + "/backlog.data");
synch_key.target (location + "/synch.key");
*/
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -565,10 +562,8 @@ void TDB2::add (Task& task)
undo.add_line ("new " + task.composeF4 ()); undo.add_line ("new " + task.composeF4 ());
undo.add_line ("---\n"); undo.add_line ("---\n");
/*
// Add task to backlog. // Add task to backlog.
backlog.add_task (task); backlog.add_task (task);
*/
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -599,10 +594,8 @@ void TDB2::modify (Task& task)
undo.add_line ("new " + task.composeF4 ()); undo.add_line ("new " + task.composeF4 ());
undo.add_line ("---\n"); undo.add_line ("---\n");
/*
// Add modified task to backlog. // Add modified task to backlog.
backlog.add_task (task); backlog.add_task (task);
*/
} }
} }
@ -615,31 +608,11 @@ void TDB2::commit ()
pending.commit (); pending.commit ();
completed.commit (); completed.commit ();
undo.commit (); undo.commit ();
/*
backlog.commit (); backlog.commit ();
synch_key.commit ();
*/
context.timer_commit.stop (); context.timer_commit.stop ();
} }
////////////////////////////////////////////////////////////////////////////////
void TDB2::synch ()
{
context.timer_synch.start ();
// TODO Get local synch_key.
// TODO Get backlog.
// TODO Compose synch ticket.
// TODO Issue synch ticket.
// TODO Receive synch response.
// TODO Extract remotes.
// TODO Apply remotes.
// TODO Store synch_key.
context.timer_synch.stop ();
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Helper function for TDB::merge // Helper function for TDB::merge
void readTaskmods (std::vector <std::string> &input, void readTaskmods (std::vector <std::string> &input,
@ -1868,10 +1841,8 @@ bool TDB2::read_only ()
{ {
return pending._read_only || return pending._read_only ||
completed._read_only || completed._read_only ||
undo._read_only /*|| undo._read_only ||
backlog._read_only || backlog._read_only
synch_key._read_only
*/
; ;
} }
@ -1881,10 +1852,7 @@ void TDB2::clear ()
pending.clear (); pending.clear ();
completed.clear (); completed.clear ();
undo.clear (); undo.clear ();
/*
backlog.clear (); backlog.clear ();
synch_key.clear ();
*/
_location = ""; _location = "";
_id = 1; _id = 1;
@ -1898,10 +1866,7 @@ void TDB2::dump ()
context.debug (pending.dump ()); context.debug (pending.dump ());
context.debug (completed.dump ()); context.debug (completed.dump ());
context.debug (undo.dump ()); context.debug (undo.dump ());
/*
context.debug (backlog.dump ()); context.debug (backlog.dump ());
context.debug (synch_key.dump ());
*/
context.debug (""); context.debug ("");
} }
} }

View file

@ -103,7 +103,6 @@ public:
void add (Task&); void add (Task&);
void modify (Task&); void modify (Task&);
void commit (); void commit ();
void synch ();
void merge (const std::string&); void merge (const std::string&);
void revert (); void revert ();
int gc (); int gc ();
@ -133,8 +132,7 @@ public:
TF2 pending; TF2 pending;
TF2 completed; TF2 completed;
TF2 undo; TF2 undo;
// TF2 backlog; TF2 backlog;
// TF2 synch_key;
private: private:
std::string _location; std::string _location;