Mercurial > hg > icedrobot > ika
view src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueRefresh.java @ 18:9c7b23248996
Add new plugins to handle guilt patch queue.
author | Mario Torre <neugens.limasoftware@gmail.com> |
---|---|
date | Tue, 05 Apr 2011 23:03:18 +0200 |
parents | |
children |
line wrap: on
line source
/* * IKA - IcedRobot Kiosk Application * Copyright (C) 2011 IcedRobot team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.icedrobot.ika.plugins.scm; import joptsimple.OptionSet; import org.icedrobot.ika.plugins.IkaPluginResult; import org.icedrobot.ika.runtime.scm.GITPatchQueue; /** * Handles patch queues in IcedRobot, abstracting the underliying patch queue * system. * * This is the implementation of the qrefresh command. */ public class IkaPatchQueueRefresh extends IkaPatchQueueHandler { @Override public String getName() { return "qrefresh"; } @Override public String getDescription() { return "refreshes an ika managed patch in the patch queue"; } @Override public IkaPluginResult execute(String[] args) { OptionSet options = parser.parse(args); if (options.has(PatchQueueOption.HELP.getOption())) { displayUsage(); } else { boolean force = options.has(PatchQueueOption.FORCE.getDescription()); GITPatchQueue.refresh(force); } return IkaPluginResult.OK; } @Override protected boolean hasArgument() { return false; } }