Push/Pull/Merge
- Re-enabled the commands.
This commit is contained in:
@@ -40,7 +40,7 @@ extern Context context;
|
|||||||
CmdLog::CmdLog ()
|
CmdLog::CmdLog ()
|
||||||
{
|
{
|
||||||
_keyword = "log";
|
_keyword = "log";
|
||||||
_usage = "task log [tags] [attrs] desc...";
|
_usage = "task log <modifications>";
|
||||||
_description = STRING_CMD_LOG_USAGE;
|
_description = STRING_CMD_LOG_USAGE;
|
||||||
_read_only = false;
|
_read_only = false;
|
||||||
_displays_id = false;
|
_displays_id = false;
|
||||||
|
|||||||
@@ -49,8 +49,11 @@ CmdMerge::CmdMerge ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdMerge::execute (std::string& output)
|
int CmdMerge::execute (std::string& output)
|
||||||
{
|
{
|
||||||
/*
|
Arguments words = context.args.extract_simple_words ();
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file;
|
||||||
|
if (words.size ())
|
||||||
|
file = words[0]._first;
|
||||||
|
|
||||||
std::string pushfile = "";
|
std::string pushfile = "";
|
||||||
std::string tmpfile = "";
|
std::string tmpfile = "";
|
||||||
|
|
||||||
@@ -91,7 +94,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) )
|
||||||
{
|
{
|
||||||
context.task.set ("description", uri.data);
|
// context.task.set ("description", uri.data);
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
context.commands["push"]->execute (out);
|
context.commands["push"]->execute (out);
|
||||||
@@ -101,7 +104,6 @@ int CmdMerge::execute (std::string& output)
|
|||||||
throw std::string ("No uri was specified for the merge. Either specify "
|
throw std::string ("No uri was specified for the merge. Either specify "
|
||||||
"the uri of a remote .task directory, or create a "
|
"the uri of a remote .task directory, or create a "
|
||||||
"'merge.default.uri' entry in your .taskrc file.");
|
"'merge.default.uri' entry in your .taskrc file.");
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,10 @@ CmdPull::CmdPull ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdPull::execute (std::string& output)
|
int CmdPull::execute (std::string& output)
|
||||||
{
|
{
|
||||||
/*
|
Arguments words = context.args.extract_simple_words ();
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file;
|
||||||
|
if (words.size ())
|
||||||
|
file = words[0]._first;
|
||||||
|
|
||||||
Uri uri (file, "pull");
|
Uri uri (file, "pull");
|
||||||
uri.parse ();
|
uri.parse ();
|
||||||
@@ -112,7 +114,6 @@ int CmdPull::execute (std::string& output)
|
|||||||
throw std::string ("No uri was specified for the pull. Either specify "
|
throw std::string ("No uri was specified for the pull. Either specify "
|
||||||
"the uri of a remote .task directory, or create a "
|
"the uri of a remote .task directory, or create a "
|
||||||
"'pull.default.uri' entry in your .taskrc file.");
|
"'pull.default.uri' entry in your .taskrc file.");
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,10 @@ CmdPush::CmdPush ()
|
|||||||
// this is potentially on another machine, no checking can be performed.
|
// this is potentially on another machine, no checking can be performed.
|
||||||
int CmdPush::execute (std::string& output)
|
int CmdPush::execute (std::string& output)
|
||||||
{
|
{
|
||||||
/*
|
Arguments words = context.args.extract_simple_words ();
|
||||||
std::string file = trim (context.task.get ("description"));
|
std::string file;
|
||||||
|
if (words.size ())
|
||||||
|
file = words[0]._first;
|
||||||
|
|
||||||
Uri uri (file, "push");
|
Uri uri (file, "push");
|
||||||
uri.parse ();
|
uri.parse ();
|
||||||
@@ -96,7 +98,6 @@ int CmdPush::execute (std::string& output)
|
|||||||
throw std::string ("No uri was specified for the push. Either specify "
|
throw std::string ("No uri was specified for the push. Either specify "
|
||||||
"the uri of a remote .task directory, or create a "
|
"the uri of a remote .task directory, or create a "
|
||||||
"'push.default.uri' entry in your .taskrc file.");
|
"'push.default.uri' entry in your .taskrc file.");
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user