- removed previous hack that created a zero-byte undo.data file.
  Now the undo.data is created as needed in TDB2::merge.
This commit is contained in:
Johannes Schlatow 2011-09-13 10:28:30 +02:00
parent 561af0a0f5
commit 295e23aac4

View file

@ -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 <std::string> l;
if (! File::read (undo._file._data, l))