mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Remove references to TDB2::read_only
A TC replica is always read-write.
This commit is contained in:
parent
f452100588
commit
35c8ce2ccb
3 changed files with 1 additions and 22 deletions
|
@ -851,8 +851,7 @@ int Context::dispatch (std::string &out)
|
||||||
assert (c);
|
assert (c);
|
||||||
|
|
||||||
// The command know whether they need a GC.
|
// The command know whether they need a GC.
|
||||||
if (c->needs_gc () &&
|
if (c->needs_gc ())
|
||||||
! tdb2.read_only ())
|
|
||||||
{
|
{
|
||||||
run_gc = config.getBoolean ("gc");
|
run_gc = config.getBoolean ("gc");
|
||||||
tdb2.gc ();
|
tdb2.gc ();
|
||||||
|
@ -862,13 +861,6 @@ int Context::dispatch (std::string &out)
|
||||||
run_gc = false;
|
run_gc = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// Only read-only commands can be run when TDB2 is read-only.
|
|
||||||
// TODO Implement TDB2::read_only
|
|
||||||
if (tdb2.read_only () && !c->read_only ())
|
|
||||||
throw std::string ("");
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This is something that is only needed for write commands with no other
|
// This is something that is only needed for write commands with no other
|
||||||
// filter processing.
|
// filter processing.
|
||||||
if (c->accepts_modifications () &&
|
if (c->accepts_modifications () &&
|
||||||
|
|
10
src/TDB2.cpp
10
src/TDB2.cpp
|
@ -1261,16 +1261,6 @@ bool TDB2::verifyUniqueUUID (const std::string& uuid)
|
||||||
return pending.id (uuid) != 0 ? false : true;
|
return pending.id (uuid) != 0 ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
bool TDB2::read_only ()
|
|
||||||
{
|
|
||||||
return pending._read_only ||
|
|
||||||
completed._read_only ||
|
|
||||||
undo._read_only ||
|
|
||||||
backlog._read_only
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int TDB2::num_local_changes ()
|
int TDB2::num_local_changes ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,9 +134,6 @@ public:
|
||||||
std::string uuid (int);
|
std::string uuid (int);
|
||||||
int id (const std::string&);
|
int id (const std::string&);
|
||||||
|
|
||||||
// Read-only mode.
|
|
||||||
bool read_only ();
|
|
||||||
|
|
||||||
int num_local_changes ();
|
int num_local_changes ();
|
||||||
int num_reverts_possible ();
|
int num_reverts_possible ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue