From c4c0770ba6b5e702e871fefd309c9741f9e49dd4 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 10 Apr 2014 14:51:11 +0200 Subject: [PATCH] debugging OfflineModeTest --- .../vcs/changes/LastUnchangedContentTracker.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LastUnchangedContentTracker.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LastUnchangedContentTracker.java index ea17ae3c2246..c28d3e479ab3 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LastUnchangedContentTracker.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LastUnchangedContentTracker.java @@ -51,6 +51,9 @@ public class LastUnchangedContentTracker { Integer oldContentId = getSavedContentId(file); if (oldContentId != null && oldContentId > 0) { + if (LOG.isDebugEnabled()) { + LOG.debug("releasing content for " + file + ", id = " + oldContentId); + } getFS().releaseContent(oldContentId); } @@ -88,13 +91,16 @@ public class LastUnchangedContentTracker { private static void saveContentReference(VirtualFile file, int contentId) { if (contentId == 0) { + if (LOG.isDebugEnabled()) { + LOG.debug("saveContentReference without content for file = " + file); + } return; // content not loaded yet, nothing to save } LOG.assertTrue(contentId > 0, contentId); if (LOG.isDebugEnabled()) { - LOG.debug("saveContentReference file = " + file); + LOG.debug("saveContentReference file = " + file + ", id = " + contentId); } long stamp = file.getTimeStamp(); @@ -139,6 +145,9 @@ public class LastUnchangedContentTracker { Integer oldContentId = null; try { final DataInputStream stream = ACQUIRED_CONTENT_ATTR.readAttribute(file); + if (LOG.isDebugEnabled()) { + LOG.debug("getSavedContentId for " + file + "; stream=" + stream); + } if (stream != null) { try { oldContentId = stream.readInt(); @@ -146,6 +155,9 @@ public class LastUnchangedContentTracker { finally { stream.close(); } + if (LOG.isDebugEnabled()) { + LOG.debug("oldContentId=" + oldContentId); + } LOG.assertTrue(oldContentId > 0, oldContentId); } }