# HG changeset patch # User Mario Torre # Date 1314911815 -7200 # Node ID 5463492cd2c9049b0c21f993df9a6ab42fd73c74 # Parent 627ae8325780379cec9767714dd3c59c8d3e29c3 Add new init plugin, also remove old unused plugins. diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/borg/AndroidAssimilator.java --- a/src/main/java/org/icedrobot/ika/plugins/borg/AndroidAssimilator.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.borg; - -import org.icedrobot.ika.runtime.scm.Repository; -import org.icedrobot.ika.runtime.scm.GITRepository; -import java.io.File; -import java.io.IOException; -import java.util.Properties; -import java.util.concurrent.CyclicBarrier; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.icedrobot.ika.plugins.IkaPluginException; - -/** - * @author Mario Torre - */ -class AndroidAssimilator { - - static String ANDROID_REPOS_CONFIGS = - "/org/icedrobot/ika/plugins/borg/repositories.properties"; - - static String ANDROID_SUBREPOS_CONFIGS = - "/org/icedrobot/ika/plugins/borg/subrepositories.properties"; - - static void assimilate(File base) { - - // contains all the remote repositories that we need to create and - // jeopardise - Properties configs = new Properties(); - try { - configs.load(AndroidAssimilator.class. - getResourceAsStream(ANDROID_REPOS_CONFIGS)); - - } catch (IOException ex) { - throw new IkaPluginException("cannot load configurations", ex); - } - - // we spawn as many thread as a repositories to clone - // so all the cloning (and assimilating) operations are - // actually perfomed in parallel per repository - CyclicBarrier barrier = new CyclicBarrier(configs.size() + 1); - for (Object name : configs.keySet()) { - - String[] data = configs.getProperty((String) name).split(","); - Repository repository = new GITRepository((String) name, base, - data[0], data[1], - data[2]); - - ClonerTask task = new ClonerTask(repository, barrier); - Thread thread = new Thread(task, repository.getName()); - thread.setDaemon(true); - thread.start(); - } - - // wait that all task are terinated before returning - try { - barrier.await(); - System.err.println("done!"); - } catch (Throwable ex) { - Logger.getLogger(ClonerTask.class.getName()).log(Level.SEVERE, - ex.getMessage(), ex); - throw new IkaPluginException(ex.getMessage(), ex); - } - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/borg/ClonerTask.java --- a/src/main/java/org/icedrobot/ika/plugins/borg/ClonerTask.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.borg; - -import org.icedrobot.ika.runtime.scm.Repository; -import org.icedrobot.ika.runtime.scm.HGRepository; -import java.io.File; - -import java.util.Properties; - -import java.util.concurrent.CyclicBarrier; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.icedrobot.ika.plugins.IkaPluginException; - -/** - * @author Mario Torre - */ -class ClonerTask implements Runnable { - - private Repository repository; - private CyclicBarrier barrier; - - public ClonerTask(Repository repository, CyclicBarrier barrier) { - - this.repository = repository; - this.barrier = barrier; - } - - @Override - public void run() { - try { - // create the local path first, if it doesn't exist already - // then start populating it with the Android code - System.err.println("create local directory: " + repository); - repository.createRoot(); - - // second, clone the main icedrobot repository - - System.err.println("cloning: " + repository.getRemotePath()); - repository.makeClone(); - - Properties configs = new Properties(); - configs.load(AndroidAssimilator.class.getResourceAsStream( - AndroidAssimilator.ANDROID_SUBREPOS_CONFIGS)); - - String subrepos = configs.getProperty(repository.getName()); - for (String repo : subrepos.split(",")) { - Repository subRepository = - repository.makeSubRepository(repo, repo, "icedrobot"); - - String sep = File.separator; - Repository hgPatchQueue = - new HGRepository(repo, subRepository.getFullPath(), - ".git" + sep + "patches", - repository.getBaseDirectory() + - sep + "icedrobot" + sep + "projects" + - sep + subRepository.getName() + sep + - "patches"); - hgPatchQueue.createRoot(); - hgPatchQueue.makeClone(); - - subRepository.applyPatchQueue(); - } - - // synchronise with other tasks - barrier.await(); - - } catch (Throwable ex) { - - barrier.reset(); - Logger.getLogger(ClonerTask.class.getName()).log(Level.SEVERE, - ex.getMessage(), ex); - throw new IkaPluginException(ex.getMessage(), ex); - } - } - - -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/borg/IcedRobotCloner.java --- a/src/main/java/org/icedrobot/ika/plugins/borg/IcedRobotCloner.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.borg; - -import org.icedrobot.ika.runtime.scm.Repository; -import org.icedrobot.ika.runtime.scm.HGRepository; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; - -import joptsimple.OptionParser; -import joptsimple.OptionSet; - -import org.icedrobot.ika.plugins.IkaPlugin; -import org.icedrobot.ika.plugins.IkaPluginException; -import org.icedrobot.ika.plugins.IkaPluginResult; - -/** - * @author Mario Torre - */ -public class IcedRobotCloner implements IkaPlugin { - - static final String ICEDROBOT_REPOS_CONFIGS = - "/org/icedrobot/ika/plugins/borg/icedrobot.properties"; - - @Override - public String getName() { - return "assimilate"; - } - - @Override - public String getDescription() { - return "clone the necessary Android respositories and " + - "assimilate IcedRobot"; - } - - @Override - public IkaPluginResult execute(String[] args) { - - String destinationDir = null; - String icedrobot = null; - if (args != null) { - OptionParser parser = new OptionParser(); - parser.accepts("dest").withRequiredArg(); - parser.accepts("icedrobot").withRequiredArg(); - parser.accepts("help"); - - OptionSet options = parser.parse(args); - if (options.has("help")) { - displayUsage(); - return IkaPluginResult.OK; - } - - if (options.has("dest")) { - destinationDir = (String) options.valueOf("dest"); - File dest = new File(destinationDir); - - try { - destinationDir = dest.getCanonicalPath(); - } catch (IOException ex) { - throw new IkaPluginException(ex.getMessage(), ex); - } - } - - if (options.has("icedrobot")) { - icedrobot = (String) options.valueOf("icedrobot"); - } - } - - if (icedrobot == null) { - Properties configs = new Properties(); - try { - configs.load(IcedRobotCloner.class. - getResourceAsStream(ICEDROBOT_REPOS_CONFIGS)); - icedrobot = configs.getProperty("icedrobot"); - - } catch (IOException ex) { - throw new IkaPluginException("cannot determine icedrobot " + - "repository location", ex); - } - } - - if (destinationDir == null) { - displayUsage(); - return IkaPluginResult.FAILURE; - } - - // create first the main source directory - System.out.println("creating main repository container into " + - "directory \"" + destinationDir + "\"..."); - - File repositoryLocation = new File(destinationDir); - if (repositoryLocation.exists()) { - System.out.println("destination directory " + - repositoryLocation + - " already existing"); - } else if (!repositoryLocation.mkdir()) { - throw new IkaPluginException("cannot create directory " + - repositoryLocation); - } - - // now clone the icedrobot reposutory - System.out.println("...done... now cloning icedrobot: " + icedrobot); - Repository icedrobotRepository = - new HGRepository("icedrobot", repositoryLocation, "icedrobot", - icedrobot); - icedrobotRepository.createRoot(); - icedrobotRepository.makeClone(); - - // now assimilate! - System.out.println("cloning repositories..."); - AndroidAssimilator.assimilate(repositoryLocation); - - System.out.println("creating main repository container..."); - - System.out.println("resistance is futile, IcedRobot assimilated"); - return IkaPluginResult.OK; - } - - private void displayUsage() { - System.out.println("Usage: ika assimilate --dest=" + - " " + - "--icedrobot="); - System.out.println("\t--dest"); - System.out.println("\t\t\tdirectory where to create the " + - "IcedRobot snapshot"); - System.out.println("\t\t\tThis argument is mandatory."); - System.out.println("\t--icedrobot"); - System.out.println("\t\t\tlocation of the remote repository"); - System.out.println("\t\t\tThis argument is optional, if not given"); - System.out.println("\t\t\tthen the default is retrived from " + - "the configuration files"); - System.out.println("\t--help"); - System.out.println("\t\t\tprint usage information"); - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaInitPlugin.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/org/icedrobot/ika/plugins/scm/IkaInitPlugin.java Thu Sep 01 23:16:55 2011 +0200 @@ -0,0 +1,178 @@ +/* + * 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 . + */ + +package org.icedrobot.ika.plugins.scm; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.Set; +import joptsimple.OptionParser; + +import joptsimple.OptionSet; + +import org.icedrobot.ika.plugins.IkaPlugin; +import org.icedrobot.ika.plugins.IkaPluginException; +import org.icedrobot.ika.plugins.IkaPluginResult; +import org.icedrobot.ika.runtime.IkaRuntime; +import org.icedrobot.ika.runtime.scm.GITCommand; + +/** + * Clones an IcedRobot repository. + */ +public class IkaInitPlugin implements IkaPlugin { + + private static final String PROPERTIES = + "/org/icedrobot/ika/plugins/borg/icedrobot.properties"; + + static enum Options { + + SRC("icedrobot", "source repository"), + DEST("dest", "target directory"), + HELP("help", "display a short help"); + final private String option; + final private String description; + + Options(String option, String description) { + this.option = option; + this.description = description; + } + + public String getOption() { + return option; + } + + public String getDescription() { + return description; + } + } + + static OptionParser parser; + static { + parser = new OptionParser() { + { + accepts(Options.HELP.getOption(), + Options.HELP.getDescription()); + accepts(Options.DEST.getOption(), + Options.DEST.getDescription()).withRequiredArg(); + accepts(Options.SRC.getOption(), + Options.SRC.getDescription()).withRequiredArg(); + } + }; + } + + @Override + public String getName() { + return "clone"; + } + + @Override + public String getDescription() { + return "clones an icedrobot workspace"; + } + + @Override + public IkaPluginResult execute(String[] args) { + // clone without option, grabs everything from the known master + // repository given the --icedrobot option, will grab the code from + // the given repository, finally the --dest option sets the target + // directory in all cases, it clones the fill workspace + if (args == null) { + displayUsage(parser); + return IkaPluginResult.OK; + } + + OptionSet options = parser.parse(args); + if (options.has(Options.HELP.getOption())) { + displayUsage(parser); + return IkaPluginResult.OK; + } + + try { + String source = getSourceFromPropertyFile(); + List commandLine = new ArrayList(); + if (options.has(Options.SRC.getOption())) { + source = (String) options.valueOf(Options.SRC.getOption()); + } + commandLine.add(source); + + File dest = new File("./icedrobot"); + if (options.has(Options.DEST.getOption())) { + String _dest = (String) options.valueOf(Options.DEST.getOption()); + commandLine.add(_dest); + dest = new File(_dest); + } + + // clone the root repository + GITCommand command = new GITCommand("git", "clone", + commandLine.toArray(new + String[commandLine.size()])); + System.err.println(command); + IkaRuntime.exec(new File("."), command); + + // now we need to load the conf file to grab the subrepo list + Set subrepos = getSubRepos(dest.getCanonicalPath()); + for (Object repo : subrepos) { + command = new GITCommand("git", "clone", source + "/" + repo); + System.err.println(command); + IkaRuntime.exec(dest, command); + } + + } catch (Exception e) { + e.printStackTrace(); + displayUsage(parser); + } + + return IkaPluginResult.OK; + } + + private Set getSubRepos(String dest) { + Properties subrepos = new Properties(); + try { + System.err.println("reading: " + dest + "/.ika.properties"); + subrepos.load(new FileInputStream(dest + "/.ika.properties")); + + } catch (IOException ex) { + throw new IkaPluginException("cannot load plugin list", ex); + } + + return subrepos.keySet(); + } + + private String getSourceFromPropertyFile() { + Properties def = new Properties(); + try { + def.load(getClass().getResourceAsStream(PROPERTIES)); + + } catch (IOException ex) { + throw new IkaPluginException("cannot load plugin list", ex); + } + + return def.getProperty("icedrobot"); + } + + private void displayUsage(OptionParser parser) { + try { + parser.printHelpOn(System.out); + + } catch (IOException ignored) { } + } +} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaInitRepository.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaInitRepository.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import joptsimple.OptionParser; -import joptsimple.OptionSet; - -import org.icedrobot.ika.plugins.IkaPlugin; -import org.icedrobot.ika.plugins.IkaPluginResult; -import org.icedrobot.ika.runtime.scm.GITRepository; -import org.icedrobot.ika.runtime.scm.HGRepository; -import org.icedrobot.ika.runtime.scm.Repository; - -/** - * @author Mario Torre - */ -public class IkaInitRepository implements IkaPlugin { - - private static final String HELP = "help"; - private static final String HELP_DESC = "print this brief help"; - - @Override - public String getName() { - return "init"; - } - - @Override - public String getDescription() { - return "creates a new ika managed repository"; - } - - @Override - public IkaPluginResult execute(String[] args) { - - OptionParser parser = new OptionParser(); - parser.accepts(HELP, HELP_DESC); - - if (args == null) { - displayUsage(parser); - return IkaPluginResult.OK; - } - - OptionSet options = parser.parse(args); - if (options.has(HELP)) { - displayUsage(parser); - - } else { - List files = options.nonOptionArguments(); - if (files.size() != 2) { - displayUsage(parser); - - } else { - String destinationDir = files.get(1); - System.err.println("dest: " + destinationDir); - File base = new File(destinationDir); - if (!base.exists()) { - System.out.println("desitination directory doesn't exist"); - return IkaPluginResult.FAILURE; - } - - System.err.println("base.getName(): " + base.getName()); - Repository repository = new GITRepository(base.getName(), base, - "", "", "icedrobot"); - repository.create(); - - repository.initPatchQueue(); - - String s = File.separator; - File basePath = new File(repository.getFullPath() + s + - ".git" + s + "patches"); - - Repository hgRepo = new HGRepository(base.getName(), basePath, - "", ""); - hgRepo.create(); - } - } - return IkaPluginResult.OK; - } - - private void displayUsage(OptionParser parser) { - System.out.println("ika " + getName() + " /directory/to/initialise"); - try { - parser.printHelpOn(System.out); - - } catch (IOException ignore) { } - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueAdd.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueAdd.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -import java.util.LinkedList; -import java.util.List; -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 qadd command. - */ -public class IkaPatchQueueAdd extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qapplied"; - } - - @Override - public String getDescription() { - return "print the list of applied patches int this ika managed " + - "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.getOption()); - List files = options.nonOptionArguments(); - if (files.size() < 2) { - displayUsage(); - } else { - List fileList = - new LinkedList(files.subList(1, files.size())); - GITPatchQueue.add(fileList, force); - } - } - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return true; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueApplied.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueApplied.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * 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 . - */ - -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 qapplied command. - */ -public class IkaPatchQueueApplied extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qapplied"; - } - - @Override - public String getDescription() { - return "print the list of applied patches int this ika managed " + - "patch queue"; - } - - @Override - public IkaPluginResult execute(String[] args) { - - OptionSet options = parser.parse(args); - if (options.has(PatchQueueOption.HELP.getOption())) { - displayUsage(); - } else { - GITPatchQueue.applied(); - } - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return false; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueHandler.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueHandler.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * 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 . - */ -package org.icedrobot.ika.plugins.scm; - -import java.io.IOException; -import joptsimple.OptionParser; -import org.icedrobot.ika.plugins.IkaPlugin; - -/** - */ -abstract class IkaPatchQueueHandler implements IkaPlugin { - - static OptionParser parser; - - static { - parser = new OptionParser() { - { - accepts(PatchQueueOption.HELP.getOption(), - PatchQueueOption.HELP.getDescription()); - accepts(PatchQueueOption.FORCE.getOption(), - PatchQueueOption.FORCE.getDescription()); - accepts(PatchQueueOption.ALL.getOption(), - PatchQueueOption.ALL.getDescription()); - } - }; - } - - abstract protected boolean hasArgument(); - - protected void displayUsage() { - String fileName = "name.patch"; - if (hasArgument()) { - fileName = ""; - } - System.out.println("ika " + getName() + " [-f] " + fileName); - System.out.println(getDescription()); - try { - parser.printHelpOn(System.out); - - } catch (IOException ignore) {} - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueNew.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueNew.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -import java.util.List; -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 qnew command. - */ -public class IkaPatchQueueNew extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qnew"; - } - - @Override - public String getDescription() { - return "creates a new 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.getOption()); - List files = options.nonOptionArguments(); - if (files.size() != 2) { - displayUsage(); - } else { - GITPatchQueue.newPatch(files.get(1), force); - } - } - - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return true; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueuePop.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueuePop.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -import java.util.List; -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 qpop command. - */ -public class IkaPatchQueuePop extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qpop"; - } - - @Override - public String getDescription() { - return "applies the patches to the managed source tree"; - } - - @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.getOption()); - boolean all = options.has(PatchQueueOption.ALL.getOption()); - List files = options.nonOptionArguments(); - if (files.size() > 2) { - displayUsage(); - } else if (files.size() == 1) { - GITPatchQueue.pop(force, all); - } else { - GITPatchQueue.pop(files.get(1), force, all); - } - } - - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return true; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueuePush.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueuePush.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -import java.util.List; -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 qpush command. - */ -public class IkaPatchQueuePush extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qpush"; - } - - @Override - public String getDescription() { - return "applies the patches to the managed source tree"; - } - - @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.getOption()); - boolean all = options.has(PatchQueueOption.ALL.getOption()); - List files = options.nonOptionArguments(); - if (files.size() > 2) { - displayUsage(); - } else if (files.size() == 1) { - GITPatchQueue.push(force, all); - } else { - GITPatchQueue.push(files.get(1), force, all); - } - } - - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return true; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueRefresh.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueRefresh.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * 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 . - */ - -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; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueStatus.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/IkaPatchQueueStatus.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * 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 . - */ - -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 qstatus command. - */ -public class IkaPatchQueueStatus extends IkaPatchQueueHandler { - - @Override - public String getName() { - return "qstatus"; - } - - @Override - public String getDescription() { - return "print the status of the tracked files in an ika managed " + - "patch queue"; - } - - @Override - public IkaPluginResult execute(String[] args) { - - OptionSet options = parser.parse(args); - if (options.has(PatchQueueOption.HELP.getOption())) { - displayUsage(); - } else { - GITPatchQueue.status(); - } - return IkaPluginResult.OK; - } - - @Override - protected boolean hasArgument() { - return false; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/plugins/scm/PatchQueueOption.java --- a/src/main/java/org/icedrobot/ika/plugins/scm/PatchQueueOption.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.plugins.scm; - -enum PatchQueueOption { - - FORCE("f", "force the execution of the command"), - ALL("all", "apply all"), - HELP("help", "display a short help"); - - final private String option; - final private String description; - - PatchQueueOption(String option, String description) { - this.option = option; - this.description = description; - } - - public String getOption() { - return option; - } - - public String getDescription() { - return description; - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/runtime/scm/GITCommand.java --- a/src/main/java/org/icedrobot/ika/runtime/scm/GITCommand.java Wed Aug 31 22:25:47 2011 +0200 +++ b/src/main/java/org/icedrobot/ika/runtime/scm/GITCommand.java Thu Sep 01 23:16:55 2011 +0200 @@ -20,7 +20,7 @@ import org.icedrobot.ika.runtime.RuntimeCommand; -class GITCommand extends RuntimeCommand{ +public class GITCommand extends RuntimeCommand { public GITCommand (String name, String subcommand, String... arguments) { super("git " + subcommand + " (" + name + ")", arguments); this.commandLine.add(0, subcommand); diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/runtime/scm/GITRepository.java --- a/src/main/java/org/icedrobot/ika/runtime/scm/GITRepository.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.runtime.scm; - -import java.io.File; -import java.io.IOException; -import org.icedrobot.ika.plugins.IkaPluginException; -import org.icedrobot.ika.runtime.IkaRuntime; -import org.icedrobot.ika.runtime.RuntimeCommand; - -public class GITRepository extends Repository { - - /** - * Creates a new git Repository with the give name as ID, the - * base directory as the location where the clone will be performed, the - * relativePath as the name of the cloned repository, the remotePath as the - * location of the source repository and branch as the version of the - * repository to clone. - */ - public GITRepository(String name, File baseDirectory, String relativePath, - String remotePath, String branch) { - - this.name = name; - this.baseDirectory = baseDirectory; - this.relativePath = relativePath; - this.remotePath = remotePath; - - this.branch = branch; - - String canonicalPath; - try { - canonicalPath = baseDirectory.getCanonicalPath(); - } catch (IOException ex) { - throw new IkaPluginException(ex.getMessage(), ex); - } - - this.fullPath = new File(canonicalPath + File.separator + relativePath); - } - - /** - * Clone the git Repository. - * If the git Repository allready exist then pop local patches and - * then fetch and merge new changesets from the remotePath. - */ - @Override - public void makeClone() { - File git = new File(fullPath + File.separator + name + - File.separator + ".git" ); - RuntimeCommand command; - - if(!git.exists()) { - command = new GITCommand(name, "clone", "--progress", "-b", - getBranch(), remotePath ); - IkaRuntime.exec(getFullPath(), command); - } else { - File patchQueue = new File(fullPath + File.separator + name + - File.separator + ".git" + - File.separator + "patches" ); - if(patchQueue.exists()) { - command = new GuiltCommand(name, "pop", "--all"); - IkaRuntime.exec(new File(getFullPath() + File.separator + name), - command); - } - - command = new GITCommand(name, "fetch", "--progress"); - IkaRuntime.exec(new File(getFullPath() + File.separator + name), - command); - - command = new GITCommand(name, "merge", "HEAD"); - IkaRuntime.exec(new File(getFullPath() + File.separator + name), - command); - } - } - - /** - * Create new git and initialize it to the prefered branch. - * Skipped if the git branch already exist. - */ - @Override - public void create() { - - File repoBranch = new File(fullPath + File.separator + ".git" + - File.separator + "refs" + - File.separator + "heads" + - File.separator + getBranch()); - if(!repoBranch.exists()) { - - RuntimeCommand command = new GITCommand(name, "init", "."); - IkaRuntime.exec(getFullPath(), command); - - command = new GITCommand(name, "add", "--all"); - IkaRuntime.exec(getFullPath(), command); - - command = new GITCommand(name, "commit", "-m", "initial_repository", - "--verbose"); - IkaRuntime.exec(getFullPath(), command); - - command = new GITCommand(name, "branch", getBranch()); - IkaRuntime.exec(getFullPath(), command); - - command = new GITCommand(name, "checkout", getBranch()); - IkaRuntime.exec(getFullPath(), command); - - System.err.println(">>>>>>>> done: " + this + " <<<<<<<<"); - } else { - System.err.println(">>>>>>>> already done: " + this + " <<<<<<<<"); - } - } - - /** - * - */ - @Override - public Repository makeSubRepository(String name, String relativePath, - String branch) { - - if (name.equals(".")) { - name = this.getName(); - } - Repository subRepository = - new GITRepository(name, new File(getFullPath() + File.separator + - getName()), - relativePath, null, branch); - subRepository.create(); - return subRepository; - } - - @Override - public void applyPatchQueue() { - GuiltCommand guilt = new GuiltCommand(name, "push", "--all"); - IkaRuntime.exec(getFullPath(), guilt); - } - - @Override - public void initPatchQueue() { - GuiltCommand guilt = new GuiltCommand(name, "init"); - IkaRuntime.exec(getFullPath(), guilt); - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/runtime/scm/HGCommand.java --- a/src/main/java/org/icedrobot/ika/runtime/scm/HGCommand.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.runtime.scm; - -import org.icedrobot.ika.runtime.RuntimeCommand; - -/** - * - * @author giulio - */ - class HgCommand extends RuntimeCommand { - public HgCommand (String name, String subcommand, String... arguments) { - super ("hg " + subcommand + " (" + name + ")", arguments); - this.commandLine.add(0, subcommand); - this.commandLine.add(0, "--debug"); - this.commandLine.add(0, "hg"); - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/runtime/scm/HGRepository.java --- a/src/main/java/org/icedrobot/ika/runtime/scm/HGRepository.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.runtime.scm; - -import java.io.File; -import org.icedrobot.ika.runtime.IkaRuntime; -import org.icedrobot.ika.runtime.RuntimeCommand; - -public class HGRepository extends Repository { - - /** - * Creates a new mercurial forest Repository with the give name as ID, the - * base directory as the location where the clone will be performed, the - * relativePath as the name of the cloned repository, the remotePath as the - * location of the source repository. The Forest extension is needed - * to create the repository. The branch is always HEAD. - */ - public HGRepository(String name, File baseDirectory, - String relativePath, - String remotePath) { - - this.name = name; - this.baseDirectory = baseDirectory; - this.relativePath = relativePath; - this.remotePath = remotePath; - - this.fullPath = new File(baseDirectory.getAbsolutePath() + - File.separator + relativePath); - } - - /** - * Clone hg Repository. - * If the hg Repository allready exist then quickly pull in - * new changesets and update. - */ - @Override - public void makeClone() { - File hg = new File(this.fullPath + File.separator + ".hg"); - RuntimeCommand command; - - if(!hg.exists()){ - command = new HgCommand(remotePath, "clone", - remotePath, getFullPath().toString()); - IkaRuntime.exec(getFullPath(), command); - } else { - command = new HgCommand(remotePath, "pull", remotePath); - IkaRuntime.exec(getFullPath(), command); - - command = new HgCommand(remotePath, "update"); - IkaRuntime.exec(getFullPath(), command); - } - } - - @Override - public String getBranch() { - // only HEAD is supported - return "HEAD"; - } - - /** - * - */ - @Override - public Repository makeSubRepository(String name, String relativePath, - String branch) { - - throw new UnsupportedOperationException("not supported yet"); - } - - @Override - public void applyPatchQueue() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public void create() { - File hg = new File(this.fullPath + File.separator + ".hg"); - if(!hg.exists()){ - RuntimeCommand command = new HgCommand(name, "init", "."); - IkaRuntime.exec(getFullPath(), command); - - command = new HgCommand(name, "add"); - IkaRuntime.exec(getFullPath(), command); - - command = new HgCommand(name, "commit", "-minitial_repository"); - IkaRuntime.exec(getFullPath(), command); - } else { - System.out.println("hg " + this + "allready exist"); - } - } - - @Override - public void initPatchQueue() { - throw new UnsupportedOperationException("Not supported yet."); - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/java/org/icedrobot/ika/runtime/scm/Repository.java --- a/src/main/java/org/icedrobot/ika/runtime/scm/Repository.java Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* - * 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 . - */ - -package org.icedrobot.ika.runtime.scm; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.icedrobot.ika.plugins.IkaPluginException; - -/** - * @author Mario Torre - */ -public abstract class Repository { - - protected String name; - protected File baseDirectory; - protected File fullPath; - - protected String relativePath; - protected String remotePath; - protected String branch; - - public abstract void create(); - abstract public void initPatchQueue(); - public abstract void applyPatchQueue(); - public abstract void makeClone(); - public abstract Repository makeSubRepository(String name, - String relativePath, - String branch); - - /** - * Create the directory under which this repository will be located if it - * doesn't exist. - */ - public void createRoot() { - File p = getFullPath(); - if(!p.exists()) - p.mkdir(); - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @return the baseDirectory - */ - public File getBaseDirectory() { - return baseDirectory; - } - - /** - * @return the fullPath - */ - public File getFullPath() { - try { - return fullPath.getCanonicalFile(); - } catch (IOException ex) { - throw new IkaPluginException(ex.toString(), ex); - } - } - - /** - * @return the relativePath - */ - public String getRelativePath() { - return relativePath; - } - - /** - * @return the remotePath - */ - public String getRemotePath() { - return remotePath; - } - - /** - * @return the branch - */ - public String getBranch() { - return branch; - } - - @Override - public String toString() { - return fullPath.toString(); - } -} diff -r 627ae8325780 -r 5463492cd2c9 src/main/resources/core_plugins.properties --- a/src/main/resources/core_plugins.properties Wed Aug 31 22:25:47 2011 +0200 +++ b/src/main/resources/core_plugins.properties Thu Sep 01 23:16:55 2011 +0200 @@ -1,22 +1,6 @@ # list of core plugins, the keys are the names and the values the class name version=org.icedrobot.ika.plugins.help.IkaVersion -assimilate=org.icedrobot.ika.plugins.borg.IcedRobotCloner -init=org.icedrobot.ika.plugins.scm.IkaInitRepository -qnew=org.icedrobot.ika.plugins.scm.IkaPatchQueueNew -qrefresh=org.icedrobot.ika.plugins.scm.IkaPatchQueueRefresh -qstatus=org.icedrobot.ika.plugins.scm.IkaPatchQueueStatus -qapplied=org.icedrobot.ika.plugins.scm.IkaPatchQueueApplied -qadd=org.icedrobot.ika.plugins.scm.IkaPatchQueueAdd -qpush=org.icedrobot.ika.plugins.scm.IkaPatchQueuePush -qpop=org.icedrobot.ika.plugins.scm.IkaPatchQueuePop -# aliases for the patch queue -new=org.icedrobot.ika.plugins.scm.IkaPatchQueueNew -refresh=org.icedrobot.ika.plugins.scm.IkaPatchQueueRefresh -status=org.icedrobot.ika.plugins.scm.IkaPatchQueueStatus -applied=org.icedrobot.ika.plugins.scm.IkaPatchQueueApplied -add=org.icedrobot.ika.plugins.scm.IkaPatchQueueAdd -push=org.icedrobot.ika.plugins.scm.IkaPatchQueuePush -pop=org.icedrobot.ika.plugins.scm.IkaPatchQueuePop +init=org.icedrobot.ika.plugins.scm.IkaInitPlugin # ika2 build support plugins logtags=org.icedrobot.ika.plugins.build.logtags.IkaLogtagsGenerator diff -r 627ae8325780 -r 5463492cd2c9 src/main/resources/org/icedrobot/ika/plugins/borg/icedrobot.properties --- a/src/main/resources/org/icedrobot/ika/plugins/borg/icedrobot.properties Wed Aug 31 22:25:47 2011 +0200 +++ b/src/main/resources/org/icedrobot/ika/plugins/borg/icedrobot.properties Thu Sep 01 23:16:55 2011 +0200 @@ -1,3 +1,3 @@ # defautl location for the icedrobot root repositories -icedrobot=http://icedtea.classpath.org/icedrobot/hg/icedrobot/ - +#icedrobot=http://icedtea.classpath.org/icedrobot/hg/icedrobot/ +icedrobot=/home/neugens/work_space/icedrobot2/icedrobot diff -r 627ae8325780 -r 5463492cd2c9 src/main/resources/org/icedrobot/ika/plugins/borg/repositories.properties --- a/src/main/resources/org/icedrobot/ika/plugins/borg/repositories.properties Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -# list of android repositories -dalvik=.,git://android.git.kernel.org/platform/dalvik.git,android-2.3.2_r1 -core=system,git://android.git.kernel.org/platform/system/core.git,android-2.3.2_r1 -safe-iop=external,git://android.git.kernel.org/platform/external/safe-iop.git,android-2.3.2_r1 -nist-sip=external,git://android.git.kernel.org/platform/external/nist-sip.git,android-2.3.2_r1 -base=frameworks,git://android.git.kernel.org/platform/frameworks/base.git,android-2.3.2_r1 -libcore=.,git://android.git.kernel.org/platform/libcore.git,android-2.3.2_r1 diff -r 627ae8325780 -r 5463492cd2c9 src/main/resources/org/icedrobot/ika/plugins/borg/subrepositories.properties --- a/src/main/resources/org/icedrobot/ika/plugins/borg/subrepositories.properties Wed Aug 31 22:25:47 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -# subrepository configurations -dalvik=vm,libnativehelper,libdex,dx -safe-iop=. -nist-sip=. -core=libcutils,include -base=. -libcore=.