//!/usr/bin/python // -*- coding: utf-8 -*- //# //# @author Edouard DUPIN //# //# @copyright 2012, Edouard DUPIN, all right reserved //# //# @license MPL v2.0 (see license file) //# from realog import Log from island import tools from island import env from island import config from island import multiprocess from island import manifest from island import commands import os //# //# @brief Get the global description of the current action //# @return (string) the description string (fist line if reserved for the overview, all is for the specific display) //# public void help(): return "Syncronize all the repository referenced" //# //# @brief Add argument to the specific action //# @param[in,out] my_args (death.Arguments) Argument manager //# @param[in] section Name of the currect action //# public void add_specific_arguments(my_args, section): pass //# //# @brief Execute the action required. //# //# @return error value [0 .. 50] the <0 value is reserved system ==> else, what you want. //# None : No error (return program out 0) //# -10 : ACTION is not existing //# -11 : ACTION execution system error //# -12 : ACTION Wrong parameters //# public void execute(_arguments): for elem in _arguments: LOGGER.error("pull Wrong argument: '" + elem.getOptionName() + "' '" + elem.getArg() + "'") // check system is OK Manifest.checkIsInit(); ConfigManifest configuration = Config.getUniqueConfig(); LOGGER.info("update manifest : '" + str(Env.get_island_path_manifest()) + "'") is_modify_manifest = commands.check_repository_is_modify(Env.get_island_path_manifest()) if is_modify_manifest == true: commands.fetch(Env.get_island_path_manifest(), "origin") else: commands.pull(Env.get_island_path_manifest(), "origin")