当前位置: 首页>>代码示例>>Java>>正文


Java SvnVcs.invokeRefreshSvnRoots方法代码示例

本文整理汇总了Java中org.jetbrains.idea.svn.SvnVcs.invokeRefreshSvnRoots方法的典型用法代码示例。如果您正苦于以下问题:Java SvnVcs.invokeRefreshSvnRoots方法的具体用法?Java SvnVcs.invokeRefreshSvnRoots怎么用?Java SvnVcs.invokeRefreshSvnRoots使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jetbrains.idea.svn.SvnVcs的用法示例。


在下文中一共展示了SvnVcs.invokeRefreshSvnRoots方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testAdd

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@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)});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:SvnCommittedViewTest.java

示例2: testCopyDir

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Test
public void testCopyDir() throws Exception {
  final File trunk = new File(myTempDirFixture.getTempDirPath(), "trunk");
  trunk.mkdir();
  Thread.sleep(100);
  final File folder = new File(trunk, "folder");
  folder.mkdir();
  Thread.sleep(100);
  new File(folder, "f1.txt").createNewFile();
  new File(folder, "f2.txt").createNewFile();
  Thread.sleep(100);

  runInAndVerifyIgnoreOutput("import", "-m", "test", trunk.getAbsolutePath(), myRepoUrl + "/trunk");
  runInAndVerifyIgnoreOutput("copy", "-m", "test", myRepoUrl + "/trunk", myRepoUrl + "/branch");

  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 + "/branch"), 0);
  checkList(changeListList, 2, new Data[] {new Data(new File(myWorkingCopyDir.getPath(), "branch").getAbsolutePath(), FileStatus.ADDED, "- copied from /trunk")});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:SvnCommittedViewTest.java

示例3: testDelete

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Test
public void testDelete() 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();

  deleteFileInCommand(f11);
  
  checkin();
  update();

  deleteFileInCommand(d1);

  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(f11), FileStatus.DELETED, null)});
  checkList(changeListList, 3, new Data[] {new Data(absPath(d1), FileStatus.DELETED, null)});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:SvnCommittedViewTest.java

示例4: testReplaced

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@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 = new File(d1.getPath()).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")});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:SvnCommittedViewTest.java

示例5: testMoveDir

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Test
public void testMoveDir() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);

  VirtualFile d1 = createDirInCommand(myWorkingCopyDir, "d1");
  VirtualFile d2 = createDirInCommand(myWorkingCopyDir, "d2");

  VirtualFile f11 = createFileInCommand(d1, "f11.txt", "123\n456");
  VirtualFile f12 = createFileInCommand(d1, "f12.txt", "----");

  // r1, addition without history
  checkin();

  final String oldPath = absPath(d1);
  moveFileInCommand(d1, d2);
  Thread.sleep(100);

  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, "- moved from .." + File.separatorChar + "d1")});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:SvnCommittedViewTest.java

示例6: testMoveDirChangeFile

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Test
public void testMoveDirChangeFile() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);

  VirtualFile d1 = createDirInCommand(myWorkingCopyDir, "d1");
  VirtualFile d2 = createDirInCommand(myWorkingCopyDir, "d2");

  VirtualFile f11 = createFileInCommand(d1, "f11.txt", "123\n456");
  VirtualFile f12 = createFileInCommand(d1, "f12.txt", "----");

  // r1, addition without history
  checkin();

  final String oldPath = absPath(d1);
  final String oldF11Path = new File(f11.getPath()).getAbsolutePath();
  moveFileInCommand(d1, d2);
  VcsTestUtil.editFileInCommand(myProject, f11, "new");

  Thread.sleep(100);

  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, "- moved from .." + File.separatorChar + "d1"),
    new Data(absPath(f11), FileStatus.MODIFIED, "- moved from " + oldF11Path)});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:SvnCommittedViewTest.java

示例7: testCopyAndModify

import org.jetbrains.idea.svn.SvnVcs; //导入方法依赖的package包/类
@Test
public void testCopyAndModify() throws Exception {
  final File trunk = new File(myTempDirFixture.getTempDirPath(), "trunk");
  trunk.mkdir();
  Thread.sleep(100);
  final File folder = new File(trunk, "folder");
  folder.mkdir();
  Thread.sleep(100);
  new File(folder, "f1.txt").createNewFile();
  new File(folder, "f2.txt").createNewFile();
  Thread.sleep(100);

  runInAndVerifyIgnoreOutput("import", "-m", "test", trunk.getAbsolutePath(), myRepoUrl + "/trunk");

  update();

  runInAndVerifyIgnoreOutput("copy", myWorkingCopyDir.getPath() + "/trunk", myWorkingCopyDir.getPath() + "/branch");
  runInAndVerifyIgnoreOutput("propset", "testprop", "testval", myWorkingCopyDir.getPath() + "/branch/folder");

  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 + "/branch"), 0);
  checkList(changeListList, 2, new Data[] {new Data(new File(myWorkingCopyDir.getPath(), "branch").getAbsolutePath(), FileStatus.ADDED, "- copied from /trunk"),
    new Data(new File(myWorkingCopyDir.getPath(), "branch/folder").getAbsolutePath(), FileStatus.MODIFIED, "- copied from /trunk/folder")});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:SvnCommittedViewTest.java


注:本文中的org.jetbrains.idea.svn.SvnVcs.invokeRefreshSvnRoots方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。