From 9c41610f567ffe64239c5996d74986276e1ed7c2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Jan 2014 19:23:54 -0500 Subject: [PATCH] Merge Errors - Fixed errors from merge mistakes. --- src/CMakeLists.txt | 1 - src/Task.cpp | 6 +++--- src/columns/ColDate.cpp | 4 ++-- test/roundtrip.t | 13 +++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 906a304bc..a23eeaa22 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,7 +28,6 @@ set (task_SRCS A3.cpp A3.h OldDuration.cpp OldDuration.h Path.cpp Path.h RX.cpp RX.h - Socket.cpp Socket.h TDB2.cpp TDB2.h Task.cpp Task.h Taskmod.cpp Taskmod.h diff --git a/src/Task.cpp b/src/Task.cpp index 53bff51ae..3fc74cfae 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1880,7 +1880,7 @@ void Task::modify ( long l = (long) strtod (result.c_str (), NULL); if (labs (l) < 5 * 365 * 86400) { - Duration dur (value); + OldDuration dur (value); Date now; now += l; (*this).set (name, now.toEpochString ()); @@ -1892,7 +1892,7 @@ void Task::modify ( } } - // Durations too. + // OldDurations too. else if (name == "recur" || column->type () == "duration") { @@ -1905,7 +1905,7 @@ void Task::modify ( std::string result = e.evalExpression ((*this)); context.debug (std::string ("Eval '") + value + "' --> '" + result + "'"); - Duration d (value); + OldDuration d (value); // Deliberately storing the 'raw' value, which is necessary for // durations like 'weekday'.. diff --git a/src/columns/ColDate.cpp b/src/columns/ColDate.cpp index db82fd60f..c58ee1dfb 100644 --- a/src/columns/ColDate.cpp +++ b/src/columns/ColDate.cpp @@ -125,7 +125,7 @@ void ColumnDate::measure (Task& task, unsigned int& minimum, unsigned int& maxim { Date now; if (date > now) - minimum = maximum = Duration (date - now).format ().length (); + minimum = maximum = OldDuration (date - now).format ().length (); } else throw format (STRING_COLUMN_BAD_FORMAT, _name, _style); @@ -207,7 +207,7 @@ void ColumnDate::render ( lines.push_back ( color.colorize ( rightJustify ( - Duration (date - now).format (), width))); + OldDuration (date - now).format (), width))); else lines.push_back (""); } diff --git a/test/roundtrip.t b/test/roundtrip.t index 20d3a3f87..182849a74 100755 --- a/test/roundtrip.t +++ b/test/roundtrip.t @@ -61,14 +61,15 @@ unlink 'pending.data', 'completed.data', 'undo.data'; qx{../src/task rc:roundtrip.rc import ./roundtrip2.json 2>&1}; # Examine. +# +# ID Created P Project Tags Description +# -- ---------- - ------- --------- ----------- +# 1 1/7/2014 H A one/1 +# 2 1/7/2014 tag1 tag2 two -# ID Project Pri Added Started Due Recur Countdown Age Deps Tags Description -# -- ------- --- -------- ------- --- ----- --------- --- ---- --------- --------- -# 1 A H 8/7/2010 - one/1 -# 2 8/7/2010 - tag1 tag2 two my $output = qx{../src/task rc:roundtrip.rc long 2>&1}; -like ($output, qr/1.+A.+H.+\d+\/\d+\/\d+.+(?:-|\d+).+one\/1/, '2 round trips task 1 identical'); -like ($output, qr/2.+\d+\/\d+\/\d+.+(?:-|\d+).+tag1\stag2\stwo/, '2 round trips task 2 identical'); +like ($output, qr/1\s+\d+\/\d+\/\d+\s+H\s+A\s+one\/1/, '2 round trips task 1 identical'); +like ($output, qr/2\s+\d+\/\d+\/\d+\s+tag1\s+tag2\s+two/, '2 round trips task 2 identical'); # Compare the actual JSON files. $output = qx{diff ./roundtrip1.json ./roundtrip2.json 2>&1};