@Test public void shouldNotFailIfFileContainsLocalModification() throws Exception { File repoDir = unzip("repo-svn.zip"); String scmUrl = "file: File baseDir = new File(checkout(scmUrl), "dummy-svn"); when(fs.baseDir()).thenReturn(baseDir); DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA) .setLines(28) .setModuleBaseDir(baseDir.toPath()) .build(); Files.write(baseDir.toPath().resolve(DUMMY_JAVA), "\n BlameOutput blameResult = mock(BlameOutput.class); when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile)); newSvnBlameCommand().blame(input, blameResult); verifyZeroInteractions(blameResult); }
@Override public void blame(final BlameInput input, final BlameOutput output) { FileSystem fs = input.fileSystem(); LOG.debug("Working directory: " + fs.baseDir().getAbsolutePath()); SVNClientManager clientManager = null; try { clientManager = newSvnClientManager(configuration); for (InputFile inputFile : input.filesToBlame()) { blame(clientManager, inputFile, output); } } finally { if (clientManager != null) { try { clientManager.dispose(); } catch (Exception e) { LOG.warn("Unable to dispose SVN ClientManager", e); } } } }
SvnBlameCommand extends BlameCommand { @Override public void blame(final BlameInput input, final BlameOutput output) { FileSystem fs = input.fileSystem(); LOG.debug("Working directory: " + fs.baseDir().getAbsolutePath()); SVNClientManager clientManager = null; try { clientManager = newSvnClientManager(configuration); for (InputFile inputFile : input.filesToBlame()) { blame(clientManager, inputFile, output); } } finally { if (clientManager != null) { try { clientManager.dispose(); } catch (Exception e) { LOG.warn("Unable to dispose SVN ClientManager", e); } } } } }
SvnBlameCommand extends BlameCommand { @Override public void blame(final BlameInput input, final BlameOutput output) { FileSystem fs = input.fileSystem(); LOG.debug("Working directory: " + fs.baseDir().getAbsolutePath()); SVNClientManager clientManager = null; try { clientManager = newSvnClientManager(configuration); for (InputFile inputFile : input.filesToBlame()) { blame(clientManager, inputFile, output); } } finally { if (clientManager != null) { try { clientManager.dispose(); } catch (Exception e) { LOG.warn("Unable to dispose SVN ClientManager", e); } } } } SvnBlameCommand(SvnConfiguration configuration); }
SvnBlameCommand extends BlameCommand { @Override public void blame(final BlameInput input, final BlameOutput output) { FileSystem fs = input.fileSystem(); LOG.debug("Working directory: " + fs.baseDir().getAbsolutePath()); SVNClientManager clientManager = null; try { clientManager = newSvnClientManager(configuration); for (InputFile inputFile : input.filesToBlame()) { blame(clientManager, inputFile, output); } } finally { if (clientManager != null) { try { clientManager.dispose(); } catch (Exception e) { LOG.warn("Unable to dispose SVN ClientManager", e); } } } } SvnBlameCommand(SvnConfiguration configuration); @Override void blame(final BlameInput input, final BlameOutput output); }
SvnBlameCommand extends BlameCommand { @Override public void blame(final BlameInput input, final BlameOutput output) { FileSystem fs = input.fileSystem(); LOG.debug("Working directory: " + fs.baseDir().getAbsolutePath()); SVNClientManager clientManager = null; try { clientManager = newSvnClientManager(configuration); for (InputFile inputFile : input.filesToBlame()) { blame(clientManager, inputFile, output); } } finally { if (clientManager != null) { try { clientManager.dispose(); } catch (Exception e) { LOG.warn("Unable to dispose SVN ClientManager", e); } } } } SvnBlameCommand(SvnConfiguration configuration); @Override void blame(final BlameInput input, final BlameOutput output);  }