private void createRevertCommitsInfoFiles(List<RevCommit> commitsToRebase) { for (int i = 0; i < commitsToRebase.size(); i++) { try { String blobName = REVERT_PREFIX + Integer.toString(i + 1); CharSequence contents = commitsToRebase.get(i).getId().toString(); putBlob(context().blobStore(), blobName, contents); } catch (Exception e) { throw new IllegalStateException("Cannot create revert commits info", e); } } try { putBlob(context().blobStore(), NEXT, "1"); } catch (Exception e) { throw new IllegalStateException("Cannot create next revert commit info", e); } }
private void createRevertCommitsInfoFiles(List<RevCommit> commitsToRebase) { for (int i = 0; i < commitsToRebase.size(); i++) { try { String blobName = REVERT_PREFIX + Integer.toString(i + 1); CharSequence contents = commitsToRebase.get(i).getId().toString(); putBlob(context().blobStore(), blobName, contents); } catch (Exception e) { throw new IllegalStateException("Cannot create revert commits info", e); } } try { putBlob(context().blobStore(), NEXT, "1"); } catch (Exception e) { throw new IllegalStateException("Cannot create next revert commit info", e); } }
private boolean applyNextCommit(final boolean useCommitChanges) { Repository repository = repository(); List<String> nextFile = readLines(context().blobStore(), NEXT); List<String> commitFile = readLines(context().blobStore(), commitBlobName); if (commitFile.isEmpty()) { return false; context().blobStore().removeBlob(commitBlobName); int newIdx = Integer.parseInt(idx) + 1; putBlob(context().blobStore(), NEXT, Integer.toString(newIdx)); return true;
private boolean applyNextCommit(boolean useCommitChanges) { Repository repository = repository(); List<String> nextFile = readLines(context().blobStore(), NEXT); List<String> commitFile = readLines(context().blobStore(), commitBlobName); if (commitFile.isEmpty()) { return false; context().blobStore().removeBlob(commitBlobName); int newIdx = Integer.parseInt(idx) + 1; putBlob(context().blobStore(), NEXT, Integer.toString(newIdx)); return true;