From 295e23aac4a297e55b84ca7343912a612f52fd1d Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Tue, 13 Sep 2011 10:28:30 +0200 Subject: [PATCH] Merge - removed previous hack that created a zero-byte undo.data file. Now the undo.data is created as needed in TDB2::merge. --- src/TDB2.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 6c7515588..f60bf2390 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -503,10 +503,6 @@ void TDB2::set_location (const std::string& location) undo.target (location + "/undo.data"); backlog.target (location + "/backlog.data"); synch_key.target (location + "/synch.key"); - - // TODO Awful miserable hack to make merge work with TDB2. - if (! undo._file.exists ()) - undo._file.create (); } //////////////////////////////////////////////////////////////////////////////// @@ -690,6 +686,9 @@ void TDB2::merge (const std::string& mergeFile) if (r.size () < 3) throw std::string ("There are no changes to merge."); + if (! undo._file.exists ()) + undo._file.create (); + // load undo file (left/local branch) std::vector l; if (! File::read (undo._file._data, l))