@Test public void testdoScanRepoAndTransRemote() { ExplainInfo explainInfo = new ExplainInfo(); explainInfo.setRepo("http: explainInfo.setScanPath(JSON.toJSONString(Arrays.asList("cmdb/cmdb-service/src/main/resources/sql"))); explainInfo.setNotifyEmails(JSON.toJSONString(Arrays.asList("xiaozhenxing@net"))); ExplainDTO explainDTO = new ExplainDTO(explainInfo); explainService.doScanRepo(explainDTO); }
@Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet.remove("head"); return refSet; } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.EMPTY_SET; }
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet.remove("head"); return refSet; } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.EMPTY_SET; } }
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet.remove("head"); return refSet; } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.EMPTY_SET; }  }
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet.remove("head"); return refSet; } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.EMPTY_SET; }  @Override void addRepoExplainSub(ExplainDTO explainDTO); @Override void delRepoExplainSub(long id); @Override TableVO<List<ExplainDTO>> queryRepoExplainSubList(String repo, int page, int length); @Override Set<String> doScanRepo(ExplainDTO explainDTO); @Override TableVO<List<String>> queryRepoList(String repo, int page, int length); @Override ExplainDTO getRepoSubById(long id); @Override TableVO<List<ExplainJob>> queryJobs(ExplainJob explainJob, int page, int length); @Override boolean subJob(ExplainJob explainJob); @Override boolean unsubJob(ExplainJob explainJob); }
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet.remove("head"); return refSet; } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.EMPTY_SET; }  @Override void addRepoExplainSub(ExplainDTO explainDTO); @Override void delRepoExplainSub(long id); @Override TableVO<List<ExplainDTO>> queryRepoExplainSubList(String repo, int page, int length); @Override Set<String> doScanRepo(ExplainDTO explainDTO); @Override TableVO<List<String>> queryRepoList(String repo, int page, int length); @Override ExplainDTO getRepoSubById(long id); @Override TableVO<List<ExplainJob>> queryJobs(ExplainJob explainJob, int page, int length); @Override boolean subJob(ExplainJob explainJob); @Override boolean unsubJob(ExplainJob explainJob);  }