mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Merge
added missing gc, unit tests ok (almost)
This commit is contained in:
parent
92d9b980b5
commit
45a07f4d85
2 changed files with 6 additions and 1 deletions
|
@ -49,6 +49,10 @@ CmdMerge::CmdMerge ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdMerge::execute (std::string& output)
|
int CmdMerge::execute (std::string& output)
|
||||||
{
|
{
|
||||||
|
// invoke gc before merging in order to update data files
|
||||||
|
context.tdb.gc ();
|
||||||
|
context.tdb2.gc ();
|
||||||
|
|
||||||
std::vector <std::string> words = context.a3.extract_words ();
|
std::vector <std::string> words = context.a3.extract_words ();
|
||||||
std::string file;
|
std::string file;
|
||||||
if (words.size ())
|
if (words.size ())
|
||||||
|
@ -92,6 +96,7 @@ int CmdMerge::execute (std::string& output)
|
||||||
if ( ((sAutopush == "ask") && (confirm ("Would you like to push the merged changes to \'" + uri._data + "\'?")) )
|
if ( ((sAutopush == "ask") && (confirm ("Would you like to push the merged changes to \'" + uri._data + "\'?")) )
|
||||||
|| (bAutopush) )
|
|| (bAutopush) )
|
||||||
{
|
{
|
||||||
|
// TODO derive autopush uri from merge.default.uri? otherwise: change prompt above
|
||||||
// context.task.set ("description", uri._data);
|
// context.task.set ("description", uri._data);
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
|
|
|
@ -159,7 +159,7 @@ my $report_r = qx{../src/task rc:remote.rc list};
|
||||||
like ($report_l, qr/left_added/, "local-merge: left_added is present");
|
like ($report_l, qr/left_added/, "local-merge: left_added is present");
|
||||||
like ($report_l, qr/right_added/, "local-merge: right_added is present");
|
like ($report_l, qr/right_added/, "local-merge: right_added is present");
|
||||||
like ($report_l, qr/H.*left_modified/, "local-merge: left_modified ok");
|
like ($report_l, qr/H.*left_modified/, "local-merge: left_modified ok");
|
||||||
like ($report_l, qr/\*.*left_newer.*stay/, "local-merge: left_newer ok");
|
like ($report_l, qr/\*.*left_newer.*stay/, "local-merge: left_newer ok, undo-completed");
|
||||||
like ($report_l, qr/realProject.*right_newer.*gym/, "local-merge: right_newer ok");
|
like ($report_l, qr/realProject.*right_newer.*gym/, "local-merge: right_newer ok");
|
||||||
|
|
||||||
$report_l = qx{../src/task rc:local.rc export};
|
$report_l = qx{../src/task rc:local.rc export};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue