- 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");
completed.target (location + "/completed.data");
undo.target (location + "/undo.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 ("---\n");
/*
// Add task to backlog.
backlog.add_task (task);
*/
}
////////////////////////////////////////////////////////////////////////////////
@ -599,10 +594,8 @@ void TDB2::modify (Task& task)
undo.add_line ("new " + task.composeF4 ());
undo.add_line ("---\n");
/*
// Add modified task to backlog.
backlog.add_task (task);
*/
}
}
@ -615,31 +608,11 @@ void TDB2::commit ()
pending.commit ();
completed.commit ();
undo.commit ();
/*
backlog.commit ();
synch_key.commit ();
*/
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
void readTaskmods (std::vector <std::string> &input,
@ -1868,10 +1841,8 @@ bool TDB2::read_only ()
{
return pending._read_only ||
completed._read_only ||
undo._read_only /*||
backlog._read_only ||
synch_key._read_only
*/
undo._read_only ||
backlog._read_only
;
}
@ -1881,10 +1852,7 @@ void TDB2::clear ()
pending.clear ();
completed.clear ();
undo.clear ();
/*
backlog.clear ();
synch_key.clear ();
*/
_location = "";
_id = 1;
@ -1898,10 +1866,7 @@ void TDB2::dump ()
context.debug (pending.dump ());
context.debug (completed.dump ());
context.debug (undo.dump ());
/*
context.debug (backlog.dump ());
context.debug (synch_key.dump ());
*/
context.debug ("");
}
}

View file

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