private Collection<RefDiff> fetchRemoteData(final Repository clone, final Remote remote, final int depth) { // Fetch remote data final TransferSummary fetchResults; final String remoteName = remote.getName(); final ProgressListener progress = getProgressListener(); fetchResults = clone.command(FetchOp.class)// .addRemote(remoteName)// .setDepth(depth)// .setProgressListener(progress)// .call(); Map<String, Collection<RefDiff>> changedRefs = fetchResults.getRefDiffs(); String fetchURL = remote.getFetchURL(); Collection<RefDiff> refs = changedRefs.get(fetchURL); if (refs == null) { refs = ImmutableList.of(); } return refs; }
private Collection<RefDiff> fetchRemoteData(final Repository clone, Remote remote, final int depth, final boolean cloneIndexes) { // Fetch remote data final TransferSummary fetchResults; final ProgressListener progress = getProgressListener(); fetchResults = clone.command(FetchOp.class)// .addRemote(remote)// .setDepth(depth)// .setAutofetchTags(true)// .setFetchIndexes(cloneIndexes)// .setProgressListener(progress)// .call(); Map<String, Collection<RefDiff>> changedRefs = fetchResults.getRefDiffs(); String fetchURL = remote.getFetchURL(); Collection<RefDiff> refs = changedRefs.get(fetchURL); if (refs == null) { refs = ImmutableList.of(); } return refs; }
getProgressListener().started(); TransferSummary fetchResult = command(FetchOp.class).addRemote(remote).setDepth(depth.or(0)) .setFullDepth(fullDepth).setAll(all).setProgressListener(subProgress(80.f)).call();
@Test public void testFetchDepthWithFullRepo() throws Exception { prepareForFetch(true); FetchOp fetch = fetchOp(); fetch.setDepth(2); fetch.call(); verifyFetch(); }
@Test public void testFetchDepthWithFullRepo() throws Exception { prepareForFetch(true); FetchOp fetch = fetchOp(); fetch.setDepth(2); fetch.call(); verifyFetch(); }
fetch.setDepth(3); fetch.call();
fetch.setDepth(3); fetch.call();
fetch.setProgressListener(cli.getProgressListener()); fetch.setAll(all).setPrune(prune).setFullDepth(fulldepth); fetch.setDepth(depth); fetch.setFetchIndexes(withIndexes);
fetch.setProgressListener(cli.getProgressListener()); fetch.setAll(all).setPrune(prune).setFullDepth(fulldepth); fetch.setDepth(depth); fetch.setFetchIndexes(withIndexes);
fetch.setProgressListener(cli.getProgressListener()); fetch.setAll(all).setPrune(prune).setFullDepth(fulldepth); fetch.setDepth(depth);
TransferSummary fetchResult = command(FetchOp.class)// .setDepth(depth.or(0))//