use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.
the class SvnMergeInfoTest method testOnlyImmediateInheritableMergeinfo.
@Test
public void testOnlyImmediateInheritableMergeinfo() throws Exception {
createOneFolderStructure();
// rev 3
editAndCommit(trunk, f1, CONTENT1);
// rev4
editAndCommit(trunk, f1, CONTENT2);
updateFile(myBranchVcsRoot);
// rev 4: record non inheritable merge
setMergeInfo(myBranchVcsRoot, "/trunk:3,4");
setMergeInfo(new File(myBranchVcsRoot, "folder"), "/trunk:3");
commitFile(myBranchVcsRoot);
updateFile(myBranchVcsRoot);
assertMergeInfo(myBranchVcsRoot, "/trunk:3-4", "/trunk:3,4");
assertMergeInfo(new File(myBranchVcsRoot, "folder"), "/trunk:3");
final List<SvnChangeList> changeListList = getTrunkChangeLists();
assertRevisions(changeListList, 4, 3);
assertMergeResult(changeListList, SvnMergeInfoCache.MergeCheckResult.NOT_MERGED, SvnMergeInfoCache.MergeCheckResult.MERGED);
}
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);
}
use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.
the class SvnMergeInfoTest method assertMergeResult.
private void assertMergeResult(@NotNull List<SvnChangeList> changeLists, @NotNull SvnMergeInfoCache.MergeCheckResult... mergeResults) throws VcsException {
myOneShotMergeInfoHelper.prepare();
for (int i = 0; i < mergeResults.length; i++) {
SvnChangeList changeList = changeLists.get(i);
assertMergeResult(changeList, mergeResults[i]);
assertMergeResultOneShot(changeList, mergeResults[i]);
}
}
use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.
the class SvnCommittedViewTest method testAdd.
@Test
public void testAdd() throws Exception {
enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
final VirtualFile d1 = createDirInCommand(myWorkingCopyDir, "d1");
final VirtualFile f11 = createFileInCommand(d1, "f11.txt", "123\n456");
final VirtualFile f12 = createFileInCommand(d1, "f12.txt", "----");
// r1, addition without history
checkin();
final SvnVcs vcs = SvnVcs.getInstance(myProject);
vcs.invokeRefreshSvnRoots();
final CommittedChangesProvider<SvnChangeList, ChangeBrowserSettings> committedChangesProvider = vcs.getCommittedChangesProvider();
final List<SvnChangeList> changeListList = committedChangesProvider.getCommittedChanges(committedChangesProvider.createDefaultSettings(), new SvnRepositoryLocation(myRepoUrl), 0);
checkList(changeListList, 1, new Data[] { new Data(absPath(f11), FileStatus.ADDED, null), new Data(absPath(f12), FileStatus.ADDED, null), new Data(absPath(d1), FileStatus.ADDED, null) });
}
use of org.jetbrains.idea.svn.history.SvnChangeList in project intellij-community by JetBrains.
the class SvnCommittedViewTest method testReplaced.
@Test
public void testReplaced() throws Exception {
enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
VirtualFile d1 = createDirInCommand(myWorkingCopyDir, "d1");
VirtualFile f11 = createFileInCommand(d1, "f11.txt", "123\n456");
VirtualFile f12 = createFileInCommand(d1, "f12.txt", "----");
// r1, addition without history
checkin();
final String d1Path = virtualToIoFile(d1).getAbsolutePath();
runInAndVerifyIgnoreOutput("delete", d1Path);
runInAndVerifyIgnoreOutput("add", d1Path);
checkin();
final SvnVcs vcs = SvnVcs.getInstance(myProject);
vcs.invokeRefreshSvnRoots();
final CommittedChangesProvider<SvnChangeList, ChangeBrowserSettings> committedChangesProvider = vcs.getCommittedChangesProvider();
final List<SvnChangeList> changeListList = committedChangesProvider.getCommittedChanges(committedChangesProvider.createDefaultSettings(), new SvnRepositoryLocation(myRepoUrl), 0);
checkList(changeListList, 2, new Data[] { new Data(absPath(d1), FileStatus.MODIFIED, "- replaced") });
}
Aggregations