Code Cleanup

- Removed last traces of synch.key.
This commit is contained in:
Paul Beckingham 2012-10-02 00:00:43 -04:00
parent b1443e831b
commit cd6d08f97c
5 changed files with 2 additions and 21 deletions

View file

@ -77,7 +77,6 @@ Files
completed.data
undo.data
backlog.data
synch.key
The pending.data file aspires to contain only pending, waiting and recurring
tasks, but this is only correct after a GC, and before any tasks are modified.
@ -94,9 +93,6 @@ Files
been transmitted to the task server. It grows unbounded between 'synch'
commands.
The synch.key file contains a synch receipt that is used to optimize synch
operations.
Filter
A filter is simply a set of command line arguments, but is only a subset of

View file

@ -525,13 +525,8 @@ void Context::shadow ()
if (shadow_file._data == location + "/undo.data")
throw std::string (STRING_CONTEXT_SHADOW_U);
/*
if (shadow_file._data == location + "/backlog.data")
throw std::string (STRING_CONTEXT_SHADOW_B);
*/
if (shadow_file._data == location + "/synch.key")
throw std::string (STRING_CONTEXT_SHADOW_S);
// Compose the command. Put the rc overrides up front, so that they may
// be overridden by rc.shadow.command.

View file

@ -189,7 +189,6 @@ void TF2::add_line (const std::string& line)
}
////////////////////////////////////////////////////////////////////////////////
// This is so that synch.key can just overwrite and not grow.
void TF2::clear_lines ()
{
_lines.clear ();

View file

@ -63,12 +63,7 @@ int CmdStatistics::execute (std::string& output)
size_t dataSize = context.tdb2.pending._file.size ()
+ context.tdb2.completed._file.size ()
+ context.tdb2.undo._file.size ()
/*
// TODO Re-enable this once 2.1 has taskd support.
+ context.tdb2.backlog._file.size ()
+ context.tdb2.synch_key._file.size ()
*/
;
+ context.tdb2.backlog._file.size ();
// Count the undo transactions.
std::vector <std::string> undoTxns = context.tdb2.undo.get_lines ();
@ -277,9 +272,6 @@ int CmdStatistics::execute (std::string& output)
// sense to include this.
row = view.addRow ();
view.set (row, 0, STRING_CMD_STATS_LAST_SYNC);
if (context.tdb2.synch_key._file.exists ())
view.set (row, 1, Date (context.tdb2.synch_key._file.mtime ()).toISO ());
else
view.set (row, 1, "-");
*/

View file

@ -543,7 +543,6 @@
#define STRING_CONTEXT_SHADOW_C "Configuration variable 'shadow.file' is set to " "overwrite your completed tasks. Please change it."
#define STRING_CONTEXT_SHADOW_U "Configuration variable 'shadow.file' is set to " "overwrite your undo log. Please change it."
#define STRING_CONTEXT_SHADOW_B "Configuration variable 'shadow.file' is set to " "overwrite your backlog file. Please change it."
#define STRING_CONTEXT_SHADOW_S "Configuration variable 'shadow.file' is set to " "overwrite your synch.key file. Please change it."
#define STRING_CONTEXT_SHADOW_UPDATE "[Shadow file '{1}' updated.]"
// Date