mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
get config method renamed
This commit is contained in:
@@ -115,7 +115,7 @@ public class HgHistoryProvider implements VcsHistoryProvider {
|
||||
//workaround: --follow options doesn't work with largefiles extension;
|
||||
//see http://selenic.com/pipermail/mercurial-devel/2013-May/051209.html
|
||||
logCommand
|
||||
.setFollowCopies(!filePath.isDirectory() && HgUtil.getRepositoryNamedConfig(project, vcsRoot, "extensions", "largefiles") == null);
|
||||
.setFollowCopies(!filePath.isDirectory() && HgUtil.getConfig(project, vcsRoot, "extensions", "largefiles") == null);
|
||||
logCommand.setIncludeRemoved(true);
|
||||
try {
|
||||
return logCommand.execute(new HgFile(vcsRoot, filePath), limit, false);
|
||||
|
||||
@@ -569,10 +569,10 @@ public abstract class HgUtil {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getRepositoryNamedConfig(@NotNull Project project,
|
||||
@NotNull VirtualFile root,
|
||||
@NotNull String section,
|
||||
@Nullable String configName) {
|
||||
public static String getConfig(@NotNull Project project,
|
||||
@NotNull VirtualFile root,
|
||||
@NotNull String section,
|
||||
@Nullable String configName) {
|
||||
HgRepository hgRepository = getRepositoryManager(project).getRepositoryForRoot(root);
|
||||
return hgRepository != null ? hgRepository.getRepositoryConfig().getNamedConfig(section, configName) : null;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,6 @@ public class HgConfigTest extends HgPlatformTest {
|
||||
FileUtil.appendToFile(hgrc, "\n[extensions]\n" +
|
||||
"largefiles =");
|
||||
updateRepoConfig(myProject, myChildRepo);
|
||||
assertNotNull(HgUtil.getRepositoryNamedConfig(myProject, myChildRepo, "extensions", "largefiles"));
|
||||
assertNotNull(HgUtil.getConfig(myProject, myChildRepo, "extensions", "largefiles"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user