use of org.jetbrains.idea.svn.integrate.AlienDirtyScope in project intellij-community by JetBrains.
the class SvnDeleteTest method testDeletePackage.
// IDEADEV-16066
@Test
public void testDeletePackage() throws Exception {
enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
VirtualFile dir = createDirInCommand(myWorkingCopyDir, "child");
createFileInCommand(dir, "a.txt", "content");
runAndVerifyStatus("A child", "A child" + File.separatorChar + "a.txt");
checkin();
deleteFileInCommand(dir);
runAndVerifyStatus("D child", "D child" + File.separatorChar + "a.txt");
refreshVfs();
final AlienDirtyScope dirtyScope = new AlienDirtyScope();
dirtyScope.addDir(VcsUtil.getFilePath(myWorkingCopyDir));
final List<Change> changesManually = getChangesInScope(dirtyScope);
Assert.assertEquals(2, changesManually.size());
VcsDirtyScopeManager.getInstance(myProject).markEverythingDirty();
// since ChangeListManager is runnning, it can take dirty scope itself;... it's easier to just take changes from it
final ChangeListManager clManager = ChangeListManager.getInstance(myProject);
clManager.ensureUpToDate(false);
final List<LocalChangeList> lists = clManager.getChangeListsCopy();
Assert.assertEquals(1, lists.size());
final Collection<Change> changes = lists.get(0).getChanges();
Assert.assertEquals(2, changes.size());
}
use of org.jetbrains.idea.svn.integrate.AlienDirtyScope in project intellij-community by JetBrains.
the class SvnDeleteTest method testDeletePackage.
// IDEADEV-16066
@Test
public void testDeletePackage() throws Exception {
enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
VirtualFile dir = createDirInCommand(myWorkingCopyDir, "child");
createFileInCommand(dir, "a.txt", "content");
runAndVerifyStatusSorted("A child", "A child" + File.separatorChar + "a.txt");
checkin();
deleteFileInCommand(dir);
runAndVerifyStatusSorted("D child", "D child" + File.separatorChar + "a.txt");
refreshVfs();
final AlienDirtyScope dirtyScope = new AlienDirtyScope();
dirtyScope.addDir(VcsUtil.getFilePath(myWorkingCopyDir));
final List<Change> changesManually = getChangesInScope(dirtyScope);
Assert.assertEquals(2, changesManually.size());
VcsDirtyScopeManager.getInstance(myProject).markEverythingDirty();
// since ChangeListManager is runnning, it can take dirty scope itself;... it's easier to just take changes from it
final ChangeListManager clManager = ChangeListManager.getInstance(myProject);
clManager.ensureUpToDate(false);
final List<LocalChangeList> lists = clManager.getChangeListsCopy();
Assert.assertEquals(1, lists.size());
final Collection<Change> changes = lists.get(0).getChanges();
Assert.assertEquals(2, changes.size());
}
Aggregations