org.zmlx.hg4idea.repo.HgRepository



API Populatity

1 Client projects

Project: org.zmlx

Package: org.zmlx.hg4idea

Project JetBrains/intellij-community in file ...idea.testSrc.hg4idea.test.commit.HgCommitTest.java (2014-12-24)
@@ -23,6 +23,8 @@ import org.zmlx.hg4idea.HgFileRevision;
 import org.zmlx.hg4idea.command.HgCommitCommand;
 import org.zmlx.hg4idea.command.HgLogCommand;
 import org.zmlx.hg4idea.execution.HgCommandException;
+import org.zmlx.hg4idea.repo.HgRepository;
+import org.zmlx.hg4idea.repo.HgRepositoryImpl;
 
 import java.util.List;
 
@@ -51,7 +53,8 @@ public class HgCommitTest extends HgPlatformTest {
     logCommand.setLogFile(false);
     HgFile hgFile = new HgFile(myRepository, VfsUtilCore.virtualToIoFile(myRepository));
     List<HgFileRevision> revisions = logCommand.execute(hgFile, -1, false);
-    HgCommitCommand commit = new HgCommitCommand(myProject, myRepository, changedCommit, true);
+    HgRepository hgRepo = HgRepositoryImpl.getInstance(myRepository, myProject, myProject);
+    HgCommitCommand commit = new HgCommitCommand(myProject, hgRepo, changedCommit, true);
     commit.execute();
     List<HgFileRevision> revisionsAfterAmendCommit = logCommand.execute(hgFile, -1, false);
     assertTrue(revisions.size() == revisionsAfterAmendCommit.size());
Project JetBrains/intellij-community in file ...s.hg4idea.testSrc.hg4idea.test.HgEncodingTest.java (2014-12-24)
@@ -22,6 +22,8 @@ import org.zmlx.hg4idea.HgFileRevision;
 import org.zmlx.hg4idea.command.HgCommitCommand;
 import org.zmlx.hg4idea.command.HgLogCommand;
 import org.zmlx.hg4idea.execution.HgCommandException;
+import org.zmlx.hg4idea.repo.HgRepository;
+import org.zmlx.hg4idea.repo.HgRepositoryImpl;
 
 import java.util.List;
 
@@ -37,7 +39,8 @@ public class HgEncodingTest extends HgPlatformTest {
   public void testCommitUtfMessage() throws HgCommandException, VcsException {
     cd(myRepository);
     echo("file.txt", "lalala");
-    HgCommitCommand commitCommand = new HgCommitCommand(myProject, myRepository, "сообщение");
+    HgRepository hgRepo = HgRepositoryImpl.getInstance(myRepository, myProject, myProject);
+    HgCommitCommand commitCommand = new HgCommitCommand(myProject, hgRepo, "сообщение");
     commitCommand.execute();
   }
 
@@ -47,7 +50,8 @@ public class HgEncodingTest extends HgPlatformTest {
     String fileName = "file.txt";
     echo(fileName, "lalala");
     String comment = "öäüß";
-    HgCommitCommand commitCommand = new HgCommitCommand(myProject, myRepository, comment);
+    HgRepository hgRepo = HgRepositoryImpl.getInstance(myRepository, myProject, myProject);
+    HgCommitCommand commitCommand = new HgCommitCommand(myProject, hgRepo, comment);
     commitCommand.execute();
     HgLogCommand logCommand = new HgLogCommand(myProject);
     myRepository.refresh(false, true);
Project JetBrains/intellij-community in file ....hg4idea.provider.commit.HgCheckinEnvironment.java (2014-02-27)
@@ -40,6 +40,8 @@ import org.zmlx.hg4idea.command.*;
 import org.zmlx.hg4idea.execution.HgCommandException;
 import org.zmlx.hg4idea.execution.HgCommandExecutor;
 import org.zmlx.hg4idea.execution.HgCommandResult;
+import org.zmlx.hg4idea.repo.HgRepository;
+import org.zmlx.hg4idea.repo.HgRepositoryManager;
 import org.zmlx.hg4idea.util.HgUtil;
 
 import java.util.*;
@@ -125,9 +127,12 @@ public class HgCheckinEnvironment implements CheckinEnvironment {
     // push if needed
     if (myNextCommitIsPushed && exceptions.isEmpty()) {
       final VirtualFile preselectedRepo = repositoriesMap.size() == 1 ? repositoriesMap.keySet().iterator().next() : null;
+      HgRepositoryManager repositoryManager = HgUtil.getRepositoryManager(myProject);
+      final HgRepository repo = preselectedRepo != null ? repositoryManager.getRepositoryForFile(preselectedRepo) : null;
+      final Collection<HgRepository> repositories = repositoryManager.getRepositories();
       UIUtil.invokeLaterIfNeeded(new Runnable() {
         public void run() {
-          new HgPusher(myProject).showDialogAndPush(preselectedRepo);
+          new HgPusher(myProject).showDialogAndPush(repositories, repo);
         }
       });
     }