- Applied patch to correct autopush after merge, thanks to Johannes.
This commit is contained in:
Paul Beckingham 2011-09-13 18:07:56 -04:00
parent 295e23aac4
commit 761def8fb7
2 changed files with 17 additions and 3 deletions

View file

@ -96,7 +96,21 @@ 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 // Derive autopush uri from merge.default.uri? otherwise: change prompt above
// Change the "merge" command to "push".
std::vector <Arg>::iterator i;
for (i = context.a3.begin (); i != context.a3.end (); ++i)
{
if (i->_category == Arg::cat_command)
{
i->_raw = "push";
break;
}
}
// Append the URI argument.
context.a3.push_back (Arg (uri._data, Arg::cat_literal));
std::string out; std::string out;
context.commands["push"]->execute (out); context.commands["push"]->execute (out);

View file

@ -143,11 +143,11 @@ unlike ($output, qr/Missing/, "no missing entry");
$output = qx{../src/task rc:3.rc merge}; $output = qx{../src/task rc:3.rc merge};
like ($output, qr/Merge complete/, "res3: post-merge completed"); like ($output, qr/Merge complete/, "res3: post-merge completed");
unlike ($output, qr/Missing/, "no missing entry"); unlike ($output, qr/Missing/, "no missing entry");
like ($output, qr/Retain/, "retained changes"); like ($output, qr/Retain/, "retained changes"); # 16
# pre-merge 1st # pre-merge 1st
$output = qx{../src/task rc:1.rc merge}; $output = qx{../src/task rc:1.rc merge};
like ($output, qr/Merge complete/, "res1: pre-merge completed"); like ($output, qr/Merge complete/, "res1: pre-merge completed"); # 17
unlike ($output, qr/Missing/, "no missing entry"); unlike ($output, qr/Missing/, "no missing entry");
qx{../src/task rc:1.rc add Task5}; qx{../src/task rc:1.rc add Task5};