Wrapped "push" and "pull"

FossilOrigin-Name: ab5fd401a09cc503168a86761b95c28e52d2875a
This commit is contained in:
kostas
2015-04-26 18:26:39 +00:00
parent 496224f030
commit 895770b14b
5 changed files with 31 additions and 9 deletions

View File

@ -109,6 +109,18 @@ bool Bridge::listFiles(QStringList &files)
return runFossil(QStringList() << "ls" << "-l", &files, RUNFLAGS_SILENT_ALL);
}
//------------------------------------------------------------------------------
bool Bridge::pushRepository()
{
return runFossil(QStringList() << "push");
}
//------------------------------------------------------------------------------
bool Bridge::pullRepository()
{
return runFossil(QStringList() << "pull");
}
//------------------------------------------------------------------------------
bool Bridge::stashList(stashmap_t& stashes)
{

View File

@ -86,6 +86,8 @@ public:
bool openRepository(const QString &repositoryPath, const QString& workspacePath);
bool newRepository(const QString &repositoryPath);
bool closeRepository();
bool pushRepository();
bool pullRepository();
bool uiRunning() const;
bool startUI(const QString &httpPort);

View File

@ -1901,7 +1901,11 @@ void MainWindow::on_actionPush_triggered()
return;
}
#ifndef BRIDGE_ENABLED
runFossil(QStringList() << "push");
#else
bridge.pushRepository();
#endif
}
//------------------------------------------------------------------------------
@ -1915,7 +1919,11 @@ void MainWindow::on_actionPull_triggered()
return;
}
#ifndef BRIDGE_ENABLED
runFossil(QStringList() << "pull");
#else
bridge.pullRepository();
#endif
}
//------------------------------------------------------------------------------