Class DiffTools


  • public class DiffTools
    extends Object
    Manages diff tools.
    • Constructor Detail

      • DiffTools

        public DiffTools​(Repository repo)
        Creates the external diff-tools manager for given repository.
        Parameters:
        repo - the repository
    • Method Detail

      • compare

        public int compare​(String newPath,
                           String oldPath,
                           String newId,
                           String oldId,
                           String toolName,
                           BooleanTriState prompt,
                           BooleanTriState gui,
                           BooleanTriState trustExitCode)
        Compare two versions of a file.
        Parameters:
        newPath - the new file path
        oldPath - the old file path
        newId - the new object ID
        oldId - the old object ID
        toolName - the selected tool name (can be null)
        prompt - the prompt option
        gui - the GUI option
        trustExitCode - the "trust exit code" option
        Returns:
        the return code from executed tool
      • getToolNames

        public Set<String> getToolNames()
        Returns:
        the tool names
      • getNotAvailableTools

        public Map<String,​ExternalDiffTool> getNotAvailableTools()
        Returns:
        the NOT available predefined tools
      • getDefaultToolName

        public String getDefaultToolName​(BooleanTriState gui)
        Parameters:
        gui - use the diff.guitool setting ?
        Returns:
        the default tool name
      • isInteractive

        public boolean isInteractive()
        Returns:
        is interactive (config prompt enabled) ?