Esempio n. 1
0
 public static RevCommit fetchPatchSet(
     IProgressMonitor monitor, Repository repository, RemoteConfig remote, PatchSet patchSet)
     throws IOException, CoreException, URISyntaxException {
   try {
     // commit was already fetched
     return EGitUiUtil.getRevCommit(repository, patchSet);
   } catch (MissingObjectException e) {
     // need to fetch it
     RefSpec refSpec = new RefSpec(patchSet.getRefName() + ":FETCH_HEAD"); // $NON-NLS-1$
     return fetchRefSpec(monitor, repository, remote, refSpec);
   }
 }
 private String fetchParent(PatchSet patchSet, IProgressMonitor monitor)
     throws URISyntaxException, CoreException, IOException {
   RevCommit targetCommit = EGitUiUtil.getRevCommit(repository, patchSet);
   RevCommit parentCommit = targetCommit.getParents()[0];
   return parentCommit.getName();
 }