Merge
- 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:
@@ -503,10 +503,6 @@ void TDB2::set_location (const std::string& location)
|
|||||||
undo.target (location + "/undo.data");
|
undo.target (location + "/undo.data");
|
||||||
backlog.target (location + "/backlog.data");
|
backlog.target (location + "/backlog.data");
|
||||||
synch_key.target (location + "/synch.key");
|
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)
|
if (r.size () < 3)
|
||||||
throw std::string ("There are no changes to merge.");
|
throw std::string ("There are no changes to merge.");
|
||||||
|
|
||||||
|
if (! undo._file.exists ())
|
||||||
|
undo._file.create ();
|
||||||
|
|
||||||
// load undo file (left/local branch)
|
// load undo file (left/local branch)
|
||||||
std::vector <std::string> l;
|
std::vector <std::string> l;
|
||||||
if (! File::read (undo._file._data, l))
|
if (! File::read (undo._file._data, l))
|
||||||
|
|||||||
Reference in New Issue
Block a user