From d3d6889e25e79fc530310cbd5ab93ebff0d5b699 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 21 Jun 2024 10:28:35 +0800 Subject: [PATCH] feature: supports P4Merge as external merge/diff tool (#181) --- src/Models/ExternalMerger.cs | 3 +++ src/Resources/ExternalToolIcons/p4merge.png | Bin 0 -> 5014 bytes 2 files changed, 3 insertions(+) create mode 100644 src/Resources/ExternalToolIcons/p4merge.png diff --git a/src/Models/ExternalMerger.cs b/src/Models/ExternalMerger.cs index 3130408e..9a27db0b 100644 --- a/src/Models/ExternalMerger.cs +++ b/src/Models/ExternalMerger.cs @@ -41,6 +41,7 @@ namespace SourceGit.Models new ExternalMerger(6, "beyond_compare", "Beyond Compare", "BComp.exe", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""), new ExternalMerger(7, "win_merge", "WinMerge", "WinMergeU.exe", "-u -e \"$REMOTE\" \"$LOCAL\" \"$MERGED\"", "-u -e \"$LOCAL\" \"$REMOTE\""), new ExternalMerger(8, "codium", "VSCodium", "VSCodium.exe", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""), + new ExternalMerger(9, "p4merge", "P4Merge", "p4merge.exe", "-tw 4 \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"", "-tw 4 \"$LOCAL\" \"$REMOTE\""), }; } else if (OperatingSystem.IsMacOS()) @@ -53,6 +54,7 @@ namespace SourceGit.Models new ExternalMerger(4, "kdiff3", "KDiff3", "/Applications/kdiff3.app/Contents/MacOS/kdiff3", "\"$REMOTE\" -b \"$BASE\" \"$LOCAL\" -o \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""), new ExternalMerger(5, "beyond_compare", "Beyond Compare", "/Applications/Beyond Compare.app/Contents/MacOS/bcomp", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""), new ExternalMerger(6, "codium", "VSCodium", "/Applications/VSCodium.app/Contents/Resources/app/bin/codium", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""), + new ExternalMerger(7, "p4merge", "P4Merge", "/Applications/p4merge.app/Contents/Resources/launchp4merge", "-tw 4 \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"", "-tw 4 \"$LOCAL\" \"$REMOTE\""), }; } else if (OperatingSystem.IsLinux()) @@ -65,6 +67,7 @@ namespace SourceGit.Models new ExternalMerger(4, "beyond_compare", "Beyond Compare", "/usr/bin/bcomp", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""), new ExternalMerger(5, "meld", "Meld", "/usr/bin/meld", "\"$LOCAL\" \"$BASE\" \"$REMOTE\" -output \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""), new ExternalMerger(6, "codium", "VSCodium", "/usr/share/codium/bin/codium", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""), + new ExternalMerger(7, "p4merge", "P4Merge", "/usr/local/bin/p4merge", "-tw 4 \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"", "-tw 4 \"$LOCAL\" \"$REMOTE\""), }; } else diff --git a/src/Resources/ExternalToolIcons/p4merge.png b/src/Resources/ExternalToolIcons/p4merge.png new file mode 100644 index 0000000000000000000000000000000000000000..010d8f6f0b2c699901145ea3d31282d8d43ffa2d GIT binary patch literal 5014 zcmV;H6KU*;P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf6DvtXK~#8N#ajuG z9MyULyXV@Sy?2q86+%K{xmJ<^34v{n6yY*PsUoDXV;8m)>^Kl(FqSbgL6< zcOT#X{{Mfkds%17-|tajP6-^h89 zAChgI;9+Pc@7WQK_0-USpa5Kx@SI#FWD0O#_>e9)_@e+VlbLY=5Ez~!y zv}}8x%e#$TS3B>=JWVv=b}TsG9`^K<7|7#41(pJ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