Search in sources :

Example 1 with VcsLogUserFilterTest

use of com.intellij.vcs.log.VcsLogUserFilterTest in project intellij-community by JetBrains.

the class GitUserFilterTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myVcsLogUserFilterTest = new VcsLogUserFilterTest(GitTestUtil.findGitLogProvider(myProject), myProject) {

        @NotNull
        protected String commit(@NotNull VcsUser user) throws IOException {
            GitTestUtil.setupUsername(user.getName(), user.getEmail());
            String commit = modify("file.txt");
            GitTestUtil.setupDefaultUsername();
            return commit;
        }
    };
}
Also used : VcsUser(com.intellij.vcs.log.VcsUser) IOException(java.io.IOException) NotNull(org.jetbrains.annotations.NotNull) VcsLogUserFilterTest(com.intellij.vcs.log.VcsLogUserFilterTest)

Example 2 with VcsLogUserFilterTest

use of com.intellij.vcs.log.VcsLogUserFilterTest in project intellij-community by JetBrains.

the class HgUserFilterTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    cd(myProject.getBaseDir());
    myVcsLogUserFilterTest = new VcsLogUserFilterTest(findLogProvider(myProject), myProject) {

        @NotNull
        protected String commit(@NotNull VcsUser user) throws IOException {
            String file = "file.txt";
            overwrite(file, "content" + Math.random());
            myProject.getBaseDir().refresh(false, true);
            hg("add " + file);
            hg("commit -m ' Commit by " + user.getName() + "' --user '" + VcsUserUtil.toExactString(user) + "'");
            return new HgWorkingCopyRevisionsCommand(myProject).tip(myProject.getBaseDir()).getChangeset();
        }
    };
}
Also used : VcsUser(com.intellij.vcs.log.VcsUser) IOException(java.io.IOException) HgWorkingCopyRevisionsCommand(org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand) NotNull(org.jetbrains.annotations.NotNull) VcsLogUserFilterTest(com.intellij.vcs.log.VcsLogUserFilterTest)

Aggregations

VcsLogUserFilterTest (com.intellij.vcs.log.VcsLogUserFilterTest)2 VcsUser (com.intellij.vcs.log.VcsUser)2 IOException (java.io.IOException)2 NotNull (org.jetbrains.annotations.NotNull)2 HgWorkingCopyRevisionsCommand (org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand)1