From 5ecbd85020f29ad6a5686294824985c1614e53e3 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Sun, 4 Jul 2010 01:19:44 +0200 Subject: [PATCH] Bug - merge command resulted in an error if completed/deleted tasks were overwritten with pending tasks --- src/TDB.cpp | 6 +++++- src/Taskmod.cpp | 2 +- src/Taskmod.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index 396b7dfa8..1f32fed18 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -991,6 +991,10 @@ void TDB::undo () //////////////////////////////////////////////////////////////////////////////// void TDB::merge (const std::string& mergeFile) { + /////////////////////////////////////// + // Copyright 2010, Johannes Schlatow. + /////////////////////////////////////// + // list of modifications that we want to add to the local database std::list mods; @@ -1224,7 +1228,7 @@ void TDB::merge (const std::string& mergeFile) DEBUG_STR(" concat the first match to left branch"); // concat the oldest (but still newer) modification on the right // to the endpoint on the left - mods.front().setBefore(tmod_l.getBefore()); + mods.front().setBefore(tmod_l.getAfter()); } } } // for diff --git a/src/Taskmod.cpp b/src/Taskmod.cpp index c66fa6d43..9bde012f7 100644 --- a/src/Taskmod.cpp +++ b/src/Taskmod.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // task - a command line task list manager. // -// Copyright 2006 - 2010, Paul Beckingham. +// Copyright 2006 - 2010, Paul Beckingham, Johannes Schlatow. // All rights reserved. // // This program is free software; you can redistribute it and/or modify it under diff --git a/src/Taskmod.h b/src/Taskmod.h index 0296783cc..771c61fd2 100644 --- a/src/Taskmod.h +++ b/src/Taskmod.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // task - a command line task list manager. // -// Copyright 2006 - 2010, Paul Beckingham. +// Copyright 2006 - 2010, Paul Beckingham, Johannes Schlatow. // All rights reserved. // // This program is free software; you can redistribute it and/or modify it under