List of usage examples for org.eclipse.jgit.lib Repository writeRebaseTodoFile
public void writeRebaseTodoFile(String path, List<RebaseTodoLine> steps, boolean append) throws IOException
From source file:org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.java
License:Open Source License
/** * Writes the plan to the FS./*from w w w. j a v a 2 s .co m*/ * <p> * Only {@link PlanElement Elements} of {@link ElementType#TODO} are * persisted. * * @param repository * the plan belongs to * * @return true if the todo file has been written successfully, otherwise * false */ private boolean persist(Repository repository) { if (repository == null || repository.getRepositoryState() != RepositoryState.REBASING_INTERACTIVE) { return false; } List<RebaseTodoLine> todoLines = new LinkedList<RebaseTodoLine>(); for (PlanElement element : planList.getSecondList()) todoLines.add(element.getRebaseTodoLine()); try { repository.writeRebaseTodoFile(REBASE_TODO, todoLines, false); } catch (IOException e) { Activator.logError(CoreText.RebaseInteractivePlan_WriteRebaseTodoFailed, e); throw new RuntimeException(e); } return true; }