]> source.dussan.org Git - jgit.git/commit
Adapt diff- and merge tool code for PGM and EGit usage 75/140275/45
authorAndre Bossert <andre.bossert@siemens.com>
Sun, 19 Jan 2020 19:57:23 +0000 (20:57 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Thu, 2 Jun 2022 08:36:31 +0000 (10:36 +0200)
commitff77d412a9f1a956b8d76b139489038ee3b0870c
tree2e636007062bba558a674208d4a508f79fed2271
parent973e955ead1a9bf41efb3168baf5b68527e78023
Adapt diff- and merge tool code for PGM and EGit usage

see: https://git-scm.com/docs/git-mergetool

* DiffTools and MergeTools
  * store FS, gitDir and workTree for usage without
git repository (for EGit preferences)
  * add getUserDefinedToolNames() and getPredefinedToolNames()
  * replace getToolNames() with getAllToolNames() that combines the two
lists and put default tool name (diff.tool or merge.tool) as first
element (for EGit preferences)
* FileElement: refactoring of getFile() and friends to have midName
(LOCAL, REMOTE etc.) always added to the temp file name (also for EGit)
* FileElement: added directory attribute that is used in getFile() to
return path with workDir as parent
* DiffTool and MergeTool
  * added errw.flush(), because sometimes stderr is not printed in case
of die()
  * print e.getMessage() always to stderr
* Moved toolname and prompt logic into managers
* Exported internal packages required for egit.ui

Bug: 356832
Change-Id: I71e7f4dc362169a7612ca4f6546a021bc4b2b5f4
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
Signed-off-by: Tim Neumann <Tim.Neumann@advantest.com>
16 files changed:
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/MergeToolTest.java
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeTool.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalDiffToolTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalMergeToolTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/diffmergetool/ExternalToolTestCase.java
org.eclipse.jgit/META-INF/MANIFEST.MF
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalToolUtils.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/FileElement.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/InformNoToolHandler.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeToolConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeTools.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/PromptContinueHandler.java [new file with mode: 0644]