public static ArrayMemory valueOf(RemoteConfig value) { ArrayMemory memory = new ArrayMemory(); memory.refOfIndex("name").assign(value.getName()); memory.refOfIndex("receivePack").assign(value.getReceivePack()); memory.refOfIndex("uploadPack").assign(value.getUploadPack()); memory.refOfIndex("mirror").assign(value.isMirror()); memory.refOfIndex("timeout").assign(value.getTimeout()); memory.refOfIndex("tagOpt").assign(value.getTagOpt().name()); ArrayMemory uris = ArrayMemory.createListed(value.getURIs().size()); for (URIish urIish : value.getURIs()) { uris.add(urIish.toPrivateString()); } memory.refOfIndex("uris").assign(uris); return memory; }
/** * Apply provided remote configuration on this transport. * * @param cfg * configuration to apply on this transport. */ public void applyConfig(RemoteConfig cfg) { setOptionUploadPack(cfg.getUploadPack()); setOptionReceivePack(cfg.getReceivePack()); setTagOpt(cfg.getTagOpt()); fetch = cfg.getFetchRefSpecs(); push = cfg.getPushRefSpecs(); timeout = cfg.getTimeout(); }
/** * Apply provided remote configuration on this transport. * * @param cfg * configuration to apply on this transport. */ public void applyConfig(final RemoteConfig cfg) { setOptionUploadPack(cfg.getUploadPack()); setOptionReceivePack(cfg.getReceivePack()); setTagOpt(cfg.getTagOpt()); fetch = cfg.getFetchRefSpecs(); push = cfg.getPushRefSpecs(); timeout = cfg.getTimeout(); }
/** * Apply provided remote configuration on this transport. * * @param cfg * configuration to apply on this transport. */ public void applyConfig(RemoteConfig cfg) { setOptionUploadPack(cfg.getUploadPack()); setOptionReceivePack(cfg.getReceivePack()); setTagOpt(cfg.getTagOpt()); fetch = cfg.getFetchRefSpecs(); push = cfg.getPushRefSpecs(); timeout = cfg.getTimeout(); }