mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Make warning about new tags adhere to :quiet hint
This commit is contained in:
parent
7771d94dee
commit
4f5eb6eb0c
18 changed files with 49 additions and 49 deletions
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -98,7 +98,7 @@ int CmdContinue (
|
|||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
{
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << '\n' << intervalSummarize (database, rules, interval);
|
||||
|
@ -110,7 +110,7 @@ int CmdContinue (
|
|||
to_copy.range.end = end_time;
|
||||
|
||||
validate (cli, rules, database, to_copy);
|
||||
database.addInterval (to_copy);
|
||||
database.addInterval (to_copy, rules.getBoolean ("verbose"));
|
||||
|
||||
database.endTransaction ();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -64,7 +64,7 @@ int CmdDelete (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
dirty = false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -62,7 +62,7 @@ int CmdFill (
|
|||
autoFill (rules, database, to);
|
||||
validate (cli, rules, database, to);
|
||||
std::cout << "# to " << to.dump () << "\n";
|
||||
database.addInterval (to);
|
||||
database.addInterval (to, rules.getBoolean ("verbose"));
|
||||
|
||||
// Note: Feedback generated inside autoFill().
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -77,7 +77,7 @@ int CmdJoin (
|
|||
database.deleteInterval (second);
|
||||
|
||||
validate (cli, rules, database, combined);
|
||||
database.addInterval (combined);
|
||||
database.addInterval (combined, rules.getBoolean ("verbose"));
|
||||
|
||||
database.endTransaction ();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -77,7 +77,7 @@ int CmdLengthen (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
dirty = false;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ int CmdLengthen (
|
|||
Duration dur (delta);
|
||||
i.range.end += dur.toTime_t ();
|
||||
validate (cli, rules, database, i);
|
||||
database.addInterval (i);
|
||||
database.addInterval (i, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << "Lengthened @" << id << " by " << dur.formatHours () << '\n';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -80,7 +80,7 @@ int CmdMove (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
}
|
||||
|
||||
// Move start time.
|
||||
|
@ -107,7 +107,7 @@ int CmdMove (
|
|||
database.deleteInterval (tracked[tracked.size () - id]);
|
||||
|
||||
validate (cli, rules, database, i);
|
||||
database.addInterval (i);
|
||||
database.addInterval (i, rules.getBoolean ("verbose"));
|
||||
|
||||
database.endTransaction ();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -73,7 +73,7 @@ int CmdResize (
|
|||
|
||||
i.range.end = i.range.start + dur.toTime_t ();
|
||||
validate (cli, rules, database, i);
|
||||
database.addInterval (i);
|
||||
database.addInterval (i, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << "Resized @" << id << " to " << dur.formatHours () << '\n';
|
||||
|
|
|
@ -75,7 +75,7 @@ int CmdShorten (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
dirty = false;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ int CmdShorten (
|
|||
|
||||
i.range.end -= dur.toTime_t ();
|
||||
validate (cli, rules, database, i);
|
||||
database.addInterval (i);
|
||||
database.addInterval (i, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << "Shortened @" << id << " by " << dur.formatHours () << '\n';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -77,10 +77,10 @@ int CmdSplit (
|
|||
database.deleteInterval (tracked[tracked.size () - id]);
|
||||
|
||||
validate (cli, rules, database, first);
|
||||
database.addInterval (first);
|
||||
database.addInterval (first, rules.getBoolean ("verbose"));
|
||||
|
||||
validate (cli, rules, database, second);
|
||||
database.addInterval (second);
|
||||
database.addInterval (second, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << "Split @" << id << '\n';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -66,7 +66,7 @@ int CmdStart (
|
|||
|
||||
for (auto& interval : flatten (modified, getAllExclusions (rules, modified.range)))
|
||||
{
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << intervalSummarize (database, rules, interval);
|
||||
|
@ -85,7 +85,7 @@ int CmdStart (
|
|||
|
||||
// Update database. An open interval does not need to be flattened.
|
||||
validate (cli, rules, database, now);
|
||||
database.addInterval (now);
|
||||
database.addInterval (now, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << intervalSummarize (database, rules, now);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -78,7 +78,7 @@ int CmdStop (
|
|||
|
||||
for (auto& interval : flatten (modified, getAllExclusions (rules, modified.range)))
|
||||
{
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << intervalSummarize (database, rules, interval);
|
||||
|
@ -103,7 +103,7 @@ int CmdStop (
|
|||
modified.range.start = modified.range.end;
|
||||
modified.range.end = {0};
|
||||
validate (cli, rules, database, modified);
|
||||
database.addInterval (modified);
|
||||
database.addInterval (modified, rules.getBoolean ("verbose"));
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << '\n' << intervalSummarize (database, rules, modified);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -70,7 +70,7 @@ int CmdTag (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
dirty = false;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ int CmdTag (
|
|||
i.tag (tag);
|
||||
|
||||
//TODO validate (cli, rules, database, i);
|
||||
database.modifyInterval (tracked[tracked.size () - id], i);
|
||||
database.modifyInterval (tracked[tracked.size () - id], i, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -49,7 +49,7 @@ int CmdTrack (
|
|||
|
||||
for (auto& interval : flatten (filter, getAllExclusions (rules, filter.range)))
|
||||
{
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << intervalSummarize (database, rules, interval);
|
||||
|
|
|
@ -34,7 +34,7 @@ static void undoIntervalAction(UndoAction& action, Database& database)
|
|||
Interval before = Interval::fromJson (action.getBefore ());
|
||||
Interval after = Interval::fromJson (action.getAfter ());
|
||||
|
||||
database.modifyInterval (after, before);
|
||||
database.modifyInterval (after, before, false);
|
||||
}
|
||||
|
||||
static void undoConfigAction (UndoAction& action, Rules &rules, Database& database)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2015 - 2018, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -70,7 +70,7 @@ int CmdUntag (
|
|||
// Update database.
|
||||
database.deleteInterval (latest);
|
||||
for (auto& interval : flatten (modified, exclusions))
|
||||
database.addInterval (interval);
|
||||
database.addInterval (interval, rules.getBoolean ("verbose"));
|
||||
|
||||
dirty = false;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ int CmdUntag (
|
|||
i.untag (tag);
|
||||
|
||||
// TODO validate (cli, rules, database, i);
|
||||
database.modifyInterval (tracked[tracked.size () - id], i);
|
||||
database.modifyInterval (tracked[tracked.size () - id], i, rules.getBoolean ("verbose"));
|
||||
|
||||
if (rules.getBoolean ("verbose"))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue