private File getFile(String path, boolean create) throws PatchApplyException { File f = new File(getRepository().getWorkTree(), path); if (create) try { File parent = f.getParentFile(); FileUtils.mkdirs(parent, true); FileUtils.createNewFile(f); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().createNewFileFailed, f), e); } return f; }
if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh)); if (!newLines.get(hh.getNewStartLine() - 1 + pos) .equals(hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh));
f = getFile(fh.getOldPath(), false); if (!f.delete()) throw new PatchApplyException(MessageFormat.format( JGitText.get().cannotDeleteFile, f)); break; StandardCopyOption.ATOMIC_MOVE); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().renameFileFailed, f, dest), e); throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, e.getMessage()), e);
private File getFile(String path, boolean create) throws PatchApplyException { File f = new File(getRepository().getWorkTree(), path); if (create) try { File parent = f.getParentFile(); FileUtils.mkdirs(parent, true); FileUtils.createNewFile(f); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().createNewFileFailed, f), e); } return f; }
private File getFile(String path, boolean create) throws PatchApplyException { File f = new File(getRepository().getWorkTree(), path); if (create) try { File parent = f.getParentFile(); FileUtils.mkdirs(parent, true); FileUtils.createNewFile(f); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().createNewFileFailed, f), e); } return f; }
if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh)); if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh));
if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh)); if (!newLines.get(hh.getNewStartLine() - 1 + pos) .equals(hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh));
if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh)); if (!newLines.get(hh.getNewStartLine() - 1 + pos) .equals(hunkLine.substring(1))) { throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, hh));
f = getFile(fh.getOldPath(), false); if (!f.delete()) throw new PatchApplyException(MessageFormat.format( JGitText.get().cannotDeleteFile, f)); break; StandardCopyOption.ATOMIC_MOVE); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().renameFileFailed, f, dest), e); throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, e.getMessage()), e);
f = getFile(fh.getOldPath(), false); if (!f.delete()) throw new PatchApplyException(MessageFormat.format( JGitText.get().cannotDeleteFile, f)); break; StandardCopyOption.ATOMIC_MOVE); } catch (IOException e) { throw new PatchApplyException(MessageFormat.format( JGitText.get().renameFileFailed, f, dest), e); throw new PatchApplyException(MessageFormat.format( JGitText.get().patchApplyException, e.getMessage()), e);