From a63b7bc86c690ae663cb13d0da8dd83dd2980f5a Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 6 Aug 2018 18:28:52 +0300 Subject: [PATCH] Add debug logging to track issue with disappearing "non-picked commits" highlighting in IDEA-196838 --- plugins/git4idea/src/git4idea/branch/DeepComparator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/branch/DeepComparator.java b/plugins/git4idea/src/git4idea/branch/DeepComparator.java index 5d9a171c2bd1..4ecf9325b28c 100644 --- a/plugins/git4idea/src/git4idea/branch/DeepComparator.java +++ b/plugins/git4idea/src/git4idea/branch/DeepComparator.java @@ -79,6 +79,7 @@ public class DeepComparator implements VcsLogHighlighter, Disposable { } Map repositories = getRepositories(myUi.getDataPack().getLogProviders(), branchToCompare); + LOG.debug("Highlighting requested: " + repositories); if (repositories.isEmpty()) { removeHighlighting(); return; @@ -149,7 +150,10 @@ public class DeepComparator implements VcsLogHighlighter, Disposable { } String comparedBranch = myTask.myComparedBranch; - if (!myTask.myComparedBranch.equals(VcsLogUtil.getSingleFilteredBranch(dataPack.getFilters(), dataPack.getRefs()))) { + String singleFilteredBranch = VcsLogUtil.getSingleFilteredBranch(dataPack.getFilters(), dataPack.getRefs()); + if (!myTask.myComparedBranch.equals(singleFilteredBranch)) { + LOG.debug(String.format("Branch filter changed. Compared branch: %s, filtered branch: %s", + myTask.myComparedBranch, singleFilteredBranch)); stopAndUnhighlight(); notifyHighlightingCancelled(); return; @@ -168,6 +172,8 @@ public class DeepComparator implements VcsLogHighlighter, Disposable { highlightInBackground(comparedBranch, provider); } else { + LOG.debug(String.format("Repositories with current branches changed. Actual:\n%s\nExpected:\n%s", + repositories, repositoriesWithCurrentBranches)); removeHighlighting(); } }