From 93d246cdbbbcfaffce1e289deb16b0a8fe8cb573 Mon Sep 17 00:00:00 2001 From: irengrig Date: Tue, 28 Feb 2012 12:50:59 +0400 Subject: [PATCH] SVN: correct current revision ("committed") for history session --- .../idea/svn/history/SvnHistoryProvider.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java index 3529b93e07a4..85e799818441 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java @@ -163,7 +163,23 @@ public class SvnHistoryProvider implements VcsHistoryProvider, VcsCacheableHisto if (myCommittedPath == null) { return null; } - return getCurrentRevision(myCommittedPath); + if (myCommittedPath.isNonLocal()) { + // technically, it does not make sense, since there's no "current" revision for non-local history (if look how it's used) + // but ok, lets keep it for now + return new SvnRevisionNumber(SVNRevision.HEAD); + } + try { + SVNWCClient wcClient = myVcs.createWCClient(); + SVNInfo info = wcClient.doInfo(new File(myCommittedPath.getPath()), SVNRevision.UNDEFINED); + if (info != null) { + return new SvnRevisionNumber(info.getCommittedRevision()); + } else { + return null; + } + } + catch (SVNException e) { + return null; + } } public FilePath getCommittedPath() {