Search in sources :

Example 36 with SvnChangeList

use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.

the class SvnMergeInfoTest method testWhenInfoInRepo.

@Test
public void testWhenInfoInRepo() throws Exception {
    final File fullBranch = newFolder(myTempDirFixture.getTempDirPath(), "fullBranch");
    createTwoFolderStructure(fullBranch);
    // folder1 will be taken as branch wc root
    checkOutFile(myBranchUrl + "/folder/folder1", myBranchVcsRoot);
    // rev 3 : f2 changed
    editAndCommit(trunk, f2);
    // rev 4: record as merged into branch using full branch WC
    recordMerge(fullBranch, myTrunkUrl, "-c", "3");
    commitFile(fullBranch);
    updateFile(myBranchVcsRoot);
    final List<SvnChangeList> changeListList = getTrunkChangeLists();
    assertRevisions(changeListList, 3);
    assertMergeResult(changeListList.get(0), SvnMergeInfoCache.MergeCheckResult.MERGED);
}
Also used : SvnChangeList(org.jetbrains.idea.svn.history.SvnChangeList) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) Test(org.junit.Test)

Example 37 with SvnChangeList

use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.

the class SvnMergeInfoTest method testMixedWorkingRevisions.

@Test
public void testMixedWorkingRevisions() throws Exception {
    createOneFolderStructure();
    // rev 3
    editAndCommit(trunk, f1);
    // rev 4: record non inheritable merge
    setMergeInfo(myBranchVcsRoot, "/trunk:3");
    commitFile(myBranchVcsRoot);
    // ! no update!
    assertMergeInfo(myBranchVcsRoot, "/trunk:3");
    final Info f1info = myVcs.getInfo(new File(myBranchVcsRoot, "folder/f1.txt"));
    assert f1info.getRevision().getNumber() == 2;
    final List<SvnChangeList> changeListList = getTrunkChangeLists();
    final SvnChangeList changeList = changeListList.get(0);
    assertMergeResult(changeList, SvnMergeInfoCache.MergeCheckResult.NOT_MERGED);
    // and after update
    updateFile(myBranchVcsRoot);
    myMergeChecker.clear();
    assertMergeResult(changeList, SvnMergeInfoCache.MergeCheckResult.MERGED);
}
Also used : SvnChangeList(org.jetbrains.idea.svn.history.SvnChangeList) WCInfo(org.jetbrains.idea.svn.dialogs.WCInfo) RootUrlInfo(org.jetbrains.idea.svn.RootUrlInfo) Info(org.jetbrains.idea.svn.info.Info) BranchInfo(org.jetbrains.idea.svn.mergeinfo.BranchInfo) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) Test(org.junit.Test)

Aggregations

SvnChangeList (org.jetbrains.idea.svn.history.SvnChangeList)37 VirtualFile (com.intellij.openapi.vfs.VirtualFile)23 Test (org.junit.Test)22 ChangeBrowserSettings (com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings)16 SvnRepositoryLocation (org.jetbrains.idea.svn.history.SvnRepositoryLocation)16 File (java.io.File)13 SvnVcs (org.jetbrains.idea.svn.SvnVcs)7 VfsUtilCore.virtualToIoFile (com.intellij.openapi.vfs.VfsUtilCore.virtualToIoFile)4 NotNull (org.jetbrains.annotations.NotNull)4 Change (com.intellij.openapi.vcs.changes.Change)3 ChangeList (com.intellij.openapi.vcs.changes.ChangeList)3 CommittedChangeList (com.intellij.openapi.vcs.versionBrowser.CommittedChangeList)3 Project (com.intellij.openapi.project.Project)2 VcsException (com.intellij.openapi.vcs.VcsException)2 ContainerUtilRt.emptyList (com.intellij.util.containers.ContainerUtilRt.emptyList)2 KeyAdapter (java.awt.event.KeyAdapter)2 KeyEvent (java.awt.event.KeyEvent)2 MouseEvent (java.awt.event.MouseEvent)2 ArrayList (java.util.ArrayList)2 Collections.singletonList (java.util.Collections.singletonList)2