summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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());