mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
[BREAKING] remove diff display from 'task undo'
TaskChampion does not make the necessary information available to accomplish this, but see #2928.
This commit is contained in:
parent
87467f72c7
commit
4b814bc602
2 changed files with 3 additions and 2 deletions
|
@ -780,8 +780,7 @@ void TDB2::revert ()
|
||||||
std::string prior;
|
std::string prior;
|
||||||
revert_undo (u, uuid, when, current, prior);
|
revert_undo (u, uuid, when, current, prior);
|
||||||
|
|
||||||
// Display diff and confirm.
|
// Confirm.
|
||||||
show_diff (current, prior, when);
|
|
||||||
if (! Context::getContext ().config.getBoolean ("confirmation") ||
|
if (! Context::getContext ().config.getBoolean ("confirmation") ||
|
||||||
confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
|
confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,6 +74,7 @@ class TestUndoStyle(TestCase):
|
||||||
self.t("add one project:foo priority:H")
|
self.t("add one project:foo priority:H")
|
||||||
self.t("1 modify +tag project:bar priority:")
|
self.t("1 modify +tag project:bar priority:")
|
||||||
|
|
||||||
|
@unittest.expectedFailure # undo diffs are not supported
|
||||||
def test_undo_side_style(self):
|
def test_undo_side_style(self):
|
||||||
"""Test that 'rc.undo.style:side' generates the right output"""
|
"""Test that 'rc.undo.style:side' generates the right output"""
|
||||||
self.t.config("undo.style", "side")
|
self.t.config("undo.style", "side")
|
||||||
|
@ -81,6 +82,7 @@ class TestUndoStyle(TestCase):
|
||||||
self.assertNotRegex(out, "-tags:\s*\n\+tags:\s+tag")
|
self.assertNotRegex(out, "-tags:\s*\n\+tags:\s+tag")
|
||||||
self.assertRegex(out, "tags\s+tag\s*")
|
self.assertRegex(out, "tags\s+tag\s*")
|
||||||
|
|
||||||
|
@unittest.expectedFailure # undo diffs are not supported
|
||||||
def test_undo_diff_style(self):
|
def test_undo_diff_style(self):
|
||||||
"""Test that 'rc.undo.style:diff' generates the right output"""
|
"""Test that 'rc.undo.style:diff' generates the right output"""
|
||||||
self.t.config("undo.style", "diff")
|
self.t.config("undo.style", "diff")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue