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

@@ -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,10 +272,7 @@ 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.set (row, 1, "-");
*/
// If an alternating row color is specified, notify the table.

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