Skip to content

Latest commit

 

History

History
643 lines (398 loc) · 19 KB

diff-tool.md

File metadata and controls

643 lines (398 loc) · 19 KB

Diff Tools

Initial difference behavior

Behavior when an input is verified for the first time.

Behavior depends on if an EmptyFiles can be found matching the current extension.

  • If an EmptyFiles can be found matching the current extension, then the tool will be launch to compare the input to that empty file.
  • If no EmptyFiles can be found no tool will be launched.

Detected difference behavior

Behavior when a difference is detected between the input an existing current verified file.

Not Running

If no tool is running for the comparison of the current verification (per test), a new tool instance will be launched.

Is Running

If a tool is running for the comparison of the current verification (per test), and a new verification fails, the following logic will be applied:

Auto Refresh Mdi Behavior
true true No action. Current instance will refresh
true false No action. Current instance will refresh
false true Open new instance. Previous instance must be manually closed
false false Kill current and open new instance

This allows, in most cases, for no manual closing of the tool to be required.

MaxInstancesToLaunch

By default a maximum of 5 tool instances will be launched. This prevents a change that break many test from causing too much load on a machine.

This value can be changed:

Using an environment variable

Setting the DiffEngine_MaxInstances environment variable to the number of instances to launch.

Using code

DiffRunner.MaxInstancesToLaunch(10);

snippet source | anchor

Successful verification behavior

If a tool is running for the comparison of the current verification (per test), and a new verification passes, the following logic will be applied:

Mdi Behavior
true No action taken. Previous instance must be manually closed
false Kill current instance

This allows, in most cases, for no manual closing of the tool to be required.

Disable orphaned process detection

Resharper has a feature Check for orphaned processes spawned by test runner.

By default, ReSharper maintains a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications.

Since this project launches diff tools, it will trigger this feature an a dialog will show:

All unit tests are finished, but chid processes spawned by the test runner proces are still running. Terminate child process?

R# terminate process dialog

As such this feature needs to be disabled:

ReSharper | Options | Tools | Unit Testing | Test Runner

Disable R# orphaned processes detection

Supported Tools:

  • Is MDI: True
  • Supports auto-refresh: True
  • Supports text files: True
  • Supported binaries: bmp, dib, emf, gif, jif, j2c, j2k, jp2, jpc, jpeg, jpg, jpx, pbm, pcx, pgm, png, ppm, ras, tif, tiff, tga, wmf

Notes:

Windows settings:

  • Example arguments: /nowait "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\Araxis\Araxis Merge\Compare.exe
    • %ProgramW6432%\Araxis\Araxis Merge\Compare.exe
    • %ProgramFiles(x86)%\Araxis\Araxis Merge\Compare.exe

OSX settings:

  • Example arguments: -nowait "tempFile" "targetFile"
  • Scanned path: /Applications/Araxis Merge.app/Contents/Utilities/compare
  • Is MDI: False
  • Supports auto-refresh: True
  • Supports text files: True
  • Supported binaries: mp3, xls, xlsm, xlsx, doc, docm, docx, dot, dotm, dotx, pdf, bmp, gif, ico, jpg, jpeg, png, tif, tiff, rtf

Notes:

Windows settings:

  • Example arguments: /solo /leftreadonly "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\Beyond Compare *\BCompare.exe
    • %ProgramW6432%\Beyond Compare *\BCompare.exe
    • %ProgramFiles(x86)%\Beyond Compare *\BCompare.exe

OSX settings:

  • Example arguments: -solo -leftreadonly "tempFile" "targetFile"
  • Scanned path: /Applications/Beyond Compare.app/Contents/MacOS/bcomp

Linux settings:

  • Example arguments: -solo -leftreadonly "tempFile" "targetFile"
  • Scanned path: /usr/lib/beyondcompare/bcomp
  • Is MDI: True
  • Supports auto-refresh: False
  • Supports text files: True

Notes:

Windows settings:

  • Example arguments: "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\Devart\Code Compare\CodeCompare.exe
    • %ProgramW6432%\Devart\Code Compare\CodeCompare.exe
    • %ProgramFiles(x86)%\Devart\Code Compare\CodeCompare.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True
  • Supported binaries: jpg, jp2, j2k, png, gif, psd, tif, bmp, pct, pict, pic, ico, ppm, pgm, pbm, pnm, zip, jar, ear, tar, tgz, tbz2, gz, bz2, doc, docx, xls, xlsx, ppt, pdf, rtf, html, htm

Notes:

Windows settings:

  • Example arguments: -mi "tempFile" "targetFile"
  • Scanned path: C:\Program Files\Deltopia\DeltaWalker\DeltaWalker.exe

OSX settings:

  • Example arguments: -mi "tempFile" "targetFile"
  • Scanned path: /Applications/DeltaWalker.app/Contents/MacOS/DeltaWalker
  • Is MDI: False
  • Supports auto-refresh: True
  • Supports text files: True

Notes:

  • Disable single instance: \ Preferences \ Tabs \ uncheck Use single instance and open new diffs in tabs.

Windows settings:

  • Example arguments: "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\Diffinity\Diffinity.exe
    • %ProgramW6432%\Diffinity\Diffinity.exe
    • %ProgramFiles(x86)%\Diffinity\Diffinity.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Windows settings:

  • Example arguments: --nosplash "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\SourceGear\Common\DiffMerge\sgdm.exe
    • %ProgramW6432%\SourceGear\Common\DiffMerge\sgdm.exe
    • %ProgramFiles(x86)%\SourceGear\Common\DiffMerge\sgdm.exe

OSX settings:

  • Example arguments: --nosplash "tempFile" "targetFile"
  • Scanned path: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge

Linux settings:

  • Example arguments: --nosplash "tempFile" "targetFile"
  • Scanned path: /usr/bin/diffmerge
  • Is MDI: False
  • Supports auto-refresh: True
  • Supports text files: True

Notes:

  • Command line reference
  • /nh: do not add files or directories to comparison history
  • /diffonly: diff-only merge mode: hide the merge pane

Windows settings:

  • Example arguments: "tempFile" "targetFile" /nh /diffonly /dn1:tempFile /dn2:targetFile

  • Scanned paths:

    • %ProgramFiles%\ExamDiff Pro\ExamDiff.exe
    • %ProgramW6432%\ExamDiff Pro\ExamDiff.exe
    • %ProgramFiles(x86)%\ExamDiff Pro\ExamDiff.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True
  • Supported binaries: bmp, gif, jpeg, jpg, png, wbmp

Notes:

Windows settings:

  • Example arguments: "tempFile" "targetFile" -ge1

  • Scanned paths:

    • %ProgramFiles%\Guiffy\guiffy.exe
    • %ProgramW6432%\Guiffy\guiffy.exe
    • %ProgramFiles(x86)%\Guiffy\guiffy.exe

OSX settings:

  • Example arguments: "tempFile" "targetFile" -ge1
  • Scanned path: /Applications/Guiffy/guiffyCL.command
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True
  • Supported binaries: bmp, gif, ico, jpg, jpeg, png, tiff, tif

OSX settings:

  • Example arguments: "tempFile" "targetFile"
  • Scanned path: /usr/local/bin/ksdiff
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Notes:

  • --cs CreateBakFiles=0 to not save a .orig file when merging

Windows settings:

  • Example arguments: "tempFile" "targetFile" --cs CreateBakFiles=0

  • Scanned paths:

    • %ProgramFiles%\KDiff3\kdiff3.exe
    • %ProgramW6432%\KDiff3\kdiff3.exe
    • %ProgramFiles(x86)%\KDiff3\kdiff3.exe

OSX settings:

  • Example arguments: "tempFile" "targetFile" --cs CreateBakFiles=0
  • Scanned path: /Applications/kdiff3.app/Contents/MacOS/kdiff3
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Windows settings:

  • Example arguments: "tempFile" "targetFile"

  • Scanned paths:

    • %LOCALAPPDATA%\Programs\Meld\meld.exe
    • %ProgramFiles%\Meld\meld.exe
    • %ProgramW6432%\Meld\meld.exe
    • %ProgramFiles(x86)%\Meld\meld.exe

OSX settings:

  • Example arguments: "tempFile" "targetFile"
  • Scanned path: /Applications/meld.app/Contents/MacOS/meld

Linux settings:

  • Example arguments: "tempFile" "targetFile"
  • Scanned path: /usr/bin/meld
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Notes:

Windows settings:

  • Example arguments: -d "tempFile" "targetFile"
  • Scanned path: %ChocolateyToolsLocation%\neovim\*\nvim.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True
  • Supported binaries: bmp, gif, jpg, jpeg, png, pbm, pgm, ppm, tif, tiff, xbm, xpm

Windows settings:

  • Example arguments: "tempFile" "targetFile" "targetFile" "tempFile"

  • Scanned paths:

    • %ProgramFiles%\Perforce\p4merge.exe
    • %ProgramW6432%\Perforce\p4merge.exe
    • %ProgramFiles(x86)%\Perforce\p4merge.exe

OSX settings:

  • Example arguments: "tempFile" "targetFile" "targetFile" "tempFile"
  • Scanned path: /Applications/p4merge.app/Contents/MacOS/p4merge

Linux settings:

  • Example arguments: "tempFile" "targetFile" "targetFile" "tempFile"
  • Scanned path: /usr/bin/p4merge
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Notes:

Windows settings:

  • Example arguments: diff "tempFile" "targetFile"

  • Scanned paths:

    • %LOCALAPPDATA%\JetBrains\Installations\Rider*\bin\rider64.exe
    • %ProgramFiles%\JetBrains\JetBrains Rider *\bin\rider64.exe
    • %ProgramW6432%\JetBrains\JetBrains Rider *\bin\rider64.exe
    • %ProgramFiles(x86)%\JetBrains\JetBrains Rider *\bin\rider64.exe
    • %JetBrains Rider%\rider64.exe
    • %LOCALAPPDATA%\JetBrains\Toolbox\apps\Rider\*\*\bin\rider64.exe

OSX settings:

  • Example arguments: diff "tempFile" "targetFile"

  • Scanned paths:

    • %HOME%/Library/Application Support/JetBrains/Toolbox/apps/Rider/*/*/Rider EAP.app/Contents/MacOS/rider
    • %HOME%/Library/Application Support/JetBrains/Toolbox/apps/Rider/*/*/Rider.app/Contents/MacOS/rider
    • /Applications/Rider EAP.app/Contents/MacOS/rider
    • /Applications/Rider.app/Contents/MacOS/rider

Linux settings:

  • Example arguments: diff "tempFile" "targetFile"

  • Scanned paths:

    • %HOME%/.local/share/JetBrains/Toolbox/apps/Rider/*/*/bin/rider.sh
    • /opt/jetbrains/rider/bin/rider.sh
    • /usr/share/rider/bin/rider.sh
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Windows settings:

  • Example arguments: mergetool "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\Sublime Merge\smerge.exe
    • %ProgramW6432%\Sublime Merge\smerge.exe
    • %ProgramFiles(x86)%\Sublime Merge\smerge.exe

OSX settings:

  • Example arguments: mergetool "tempFile" "targetFile"
  • Scanned path: /Applications/smerge.app/Contents/MacOS/smerge

Linux settings:

  • Example arguments: mergetool "tempFile" "targetFile"
  • Scanned path: /usr/bin/smerge
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

OSX settings:

  • Example arguments: "tempFile" "targetFile"
  • Scanned path: /Applications/TkDiff.app/Contents/MacOS/tkdiff
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Windows settings:

  • Example arguments: "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\TortoiseGit\bin\TortoiseGitMerge.exe
    • %ProgramW6432%\TortoiseGit\bin\TortoiseGitMerge.exe
    • %ProgramFiles(x86)%\TortoiseGit\bin\TortoiseGitMerge.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: False
  • Supported binaries: bmp, gif, ico, jpg, jpeg, png, tif, tiff

Windows settings:

  • Example arguments: /left:"tempFile" /right:"targetFile"

  • Scanned paths:

    • %ProgramFiles%\TortoiseSVN\bin\TortoiseIDiff.exe
    • %ProgramW6432%\TortoiseSVN\bin\TortoiseIDiff.exe
    • %ProgramFiles(x86)%\TortoiseSVN\bin\TortoiseIDiff.exe
  • Is MDI: False
  • Supports auto-refresh: False
  • Supports text files: True

Windows settings:

  • Example arguments: "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles%\TortoiseSVN\bin\TortoiseMerge.exe
    • %ProgramW6432%\TortoiseSVN\bin\TortoiseMerge.exe
    • %ProgramFiles(x86)%\TortoiseSVN\bin\TortoiseMerge.exe
  • Is MDI: False
  • Supports auto-refresh: True
  • Supports text files: True

Notes:

Windows settings:

  • Example arguments: -d "tempFile" "targetFile" -c "setl autoread | setl nobackup | set noswapfile"

  • Scanned paths:

    • %ProgramFiles%\Vim\*\vim.exe
    • %ProgramW6432%\Vim\*\vim.exe
    • %ProgramFiles(x86)%\Vim\*\vim.exe

OSX settings:

  • Example arguments: -d "tempFile" "targetFile" -c "setl autoread | setl nobackup | set noswapfile"
  • Scanned path: /Applications/MacVim.app/Contents/bin/mvim
  • Is MDI: True
  • Supports auto-refresh: True
  • Supports text files: True

Windows settings:

  • Example arguments: /diff "tempFile" "targetFile"

  • Scanned paths:

    • %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe
    • %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
    • %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
    • %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
  • Is MDI: True
  • Supports auto-refresh: True
  • Supports text files: True

Notes:

Windows settings:

  • Example arguments: --diff "targetFile" "tempFile"

  • Scanned paths:

    • %LocalAppData%\Programs\Microsoft VS Code\code.exe
    • %ProgramFiles%\Microsoft VS Code\bin\code.exe
    • %ProgramW6432%\Microsoft VS Code\bin\code.exe
    • %ProgramFiles(x86)%\Microsoft VS Code\bin\code.exe
    • %ProgramFiles%\Microsoft VS Code\code.exe
    • %ProgramW6432%\Microsoft VS Code\code.exe
    • %ProgramFiles(x86)%\Microsoft VS Code\code.exe

OSX settings:

  • Example arguments: --diff "targetFile" "tempFile"
  • Scanned path: /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

Linux settings:

  • Example arguments: --diff "targetFile" "tempFile"

  • Scanned paths:

    • /usr/local/bin/code
    • /usr/bin/code
  • Is MDI: False
  • Supports auto-refresh: True
  • Supports text files: True

Notes:

  • Command line reference.
  • /u Prevents WinMerge from adding paths to the Most Recently Used (MRU) list.
  • /wl Opens the left side as read-only.
  • /dl and /dr Specifies file descriptions in the title bar.
  • /e Enables close with a single Esc key press.

Windows settings:

  • Example arguments: /u /wl /e "tempFile" "targetFile" /dl "tempFile" /dr "targetFile"

  • Scanned paths:

    • %ProgramFiles%\WinMerge\WinMergeU.exe
    • %ProgramW6432%\WinMerge\WinMergeU.exe
    • %ProgramFiles(x86)%\WinMerge\WinMergeU.exe