if (currentProject == null) throw new SAXException(RepoText.get().invalidManifest); currentProject.addCopyFile(new CopyFile( rootRepo, currentProject.getPath(),
if (currentProject == null) throw new SAXException(RepoText.get().invalidManifest); currentProject.addCopyFile(new CopyFile( rootRepo, currentProject.getPath(),
if (currentProject == null) throw new SAXException(RepoText.get().invalidManifest); currentProject.addCopyFile(new CopyFile( rootRepo, currentProject.getPath(),
private void addSubmodule(String name, String url, String path, String revision, List<CopyFile> copyfiles, List<LinkFile> linkfiles, Git git) throws GitAPIException, IOException { assert (!repo.isBare()); assert (git != null); if (!linkfiles.isEmpty()) { throw new UnsupportedOperationException( JGitText.get().nonBareLinkFilesNotSupported); } SubmoduleAddCommand add = git.submoduleAdd().setName(name).setPath(path) .setURI(url); if (monitor != null) add.setProgressMonitor(monitor); Repository subRepo = add.call(); if (revision != null) { try (Git sub = new Git(subRepo)) { sub.checkout().setName(findRef(revision, subRepo)).call(); } subRepo.close(); git.add().addFilepattern(path).call(); } for (CopyFile copyfile : copyfiles) { copyfile.copy(); git.add().addFilepattern(copyfile.dest).call(); } }
private void addSubmodule(String url, String name, String revision, List<CopyFile> copyfiles, Set<String> groups, String recommendShallow) throws GitAPIException, IOException { if (repo.isBare()) { RepoProject proj = new RepoProject(url, name, revision, null, groups, recommendShallow); proj.addCopyFiles(copyfiles); bareProjects.add(proj); } else { SubmoduleAddCommand add = git .submoduleAdd() .setPath(name) .setURI(url); if (monitor != null) add.setProgressMonitor(monitor); Repository subRepo = add.call(); if (revision != null) { try (Git sub = new Git(subRepo)) { sub.checkout().setName(findRef(revision, subRepo)) .call(); } subRepo.close(); git.add().addFilepattern(name).call(); } for (CopyFile copyfile : copyfiles) { copyfile.copy(); git.add().addFilepattern(copyfile.dest).call(); } } }
private void addSubmodule(String name, String url, String path, String revision, List<CopyFile> copyfiles, List<LinkFile> linkfiles, Git git) throws GitAPIException, IOException { assert (!repo.isBare()); assert (git != null); if (!linkfiles.isEmpty()) { throw new UnsupportedOperationException( JGitText.get().nonBareLinkFilesNotSupported); } SubmoduleAddCommand add = git.submoduleAdd().setName(name).setPath(path) .setURI(url); if (monitor != null) add.setProgressMonitor(monitor); Repository subRepo = add.call(); if (revision != null) { try (Git sub = new Git(subRepo)) { sub.checkout().setName(findRef(revision, subRepo)).call(); } subRepo.close(); git.add().addFilepattern(path).call(); } for (CopyFile copyfile : copyfiles) { copyfile.copy(); git.add().addFilepattern(copyfile.dest).call(); } }