summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-03-01 20:01:45 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2017-03-04 23:00:00 +0000
commit52267a1651a448edef0b8c74968091b6fb0935d0 (patch)
tree26f611dfd2f599d6a56877435015c8eb9d823a8c
parentAddress failing test cases by applying a merge operation on modified filelist... (diff)
downloadgentoobrowse-api-52267a1651a448edef0b8c74968091b6fb0935d0.tar.bz2
gentoobrowse-api-52267a1651a448edef0b8c74968091b6fb0935d0.tar.xz
gentoobrowse-api-52267a1651a448edef0b8c74968091b6fb0935d0.zip
Update update util to support git operations
-rw-r--r--gentoobrowse-api/util/update.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gentoobrowse-api/util/update.cpp b/gentoobrowse-api/util/update.cpp
index dbb43ee..0bf2a1c 100644
--- a/gentoobrowse-api/util/update.cpp
+++ b/gentoobrowse-api/util/update.cpp
@@ -8,13 +8,15 @@ int
main(int c, char ** v)
{
std::string endpoint;
- bool background, tree, bugs, changeLog, sendNotifications;
+ bool background, tree, bugs, changeLog, sendNotifications, pull, git;
po::options_description opts("Gentoo Browse Util::Update options");
opts.add_options()
("endpoint", po::value(&endpoint)->default_value("tcp -p 9001"), "Service endpoint")
("background,b", po::value(&background)->default_value(false)->zero_tokens(), "Background")
("bugs", po::value(&bugs)->default_value(true), "Update bugs")
("tree", po::value(&tree)->default_value(true), "Update tree")
+ ("pull", po::value(&pull)->default_value(true), "Perform a git pull on repositories")
+ ("git", po::value(&git)->default_value(true), "Update tree using git")
("changeLog", po::value(&changeLog)->default_value(true), "Update change log")
("notifications", po::value(&sendNotifications)->default_value(true), "Send notification emails")
("help,h", "Show help")
@@ -34,7 +36,8 @@ main(int c, char ** v)
m->ice_ping();
std::set<Ice::AsyncResultPtr> jobs;
- if (tree) jobs.insert(m->begin_refreshPackageTree());
+ if (pull) m->updateRepositories();
+ if (tree) jobs.insert(git ? m->begin_refreshPackageTreeGit() : m->begin_refreshPackageTree());
if (bugs) jobs.insert(m->begin_refreshBugs());
if (changeLog) jobs.insert(m->begin_refreshChangeLogs());