mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[file-history, hg] return repository current revision for directories
Asking for a directory specifically returns null, which breaks actions such as "Compare with Local".
Change was made in a37c643781 in order to reuse calcCurrentRevisionNumber in VcsCachingHistory instead of calling a diff provider. But that was not actually necessary, since mercurial file history does not use cache at all.
IDEA-196914
This commit is contained in:
@@ -111,6 +111,7 @@ public class HgHistoryProvider implements VcsHistoryProvider {
|
||||
@Override
|
||||
@Nullable
|
||||
protected VcsRevisionNumber calcCurrentRevisionNumber() {
|
||||
if (filePath.isDirectory()) return new HgWorkingCopyRevisionsCommand(myProject).firstParent(vcsRoot);
|
||||
return new HgWorkingCopyRevisionsCommand(myProject).parents(vcsRoot, filePath).first;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user