Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.SubmoduleAddCommand.call()


        .setURI(url);
      if (monitor != null)
        add.setProgressMonitor(monitor);

      try {
        Repository subRepo = add.call();
        if (revision != null) {
          Git sub = new Git(subRepo);
          sub.checkout().setName(findRef(revision, subRepo)).call();
          git.add().addFilepattern(name).call();
        }
View Full Code Here


    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    String path = "sub";
    command.setPath(path);
    String uri = db.getDirectory().toURI().toString();
    command.setURI(uri);
    Repository repo = command.call();
    assertNotNull(repo);
    addRepoToClose(repo);

    SubmoduleWalk generator = SubmoduleWalk.forIndex(db);
    assertTrue(generator.next());
View Full Code Here

    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    command.setPath(path);
    command.setURI("git://server/repo.git");
    try {
      command.call().close();
      fail("Exception not thrown");
    } catch (JGitInternalException e) {
      assertEquals(
          MessageFormat.format(JGitText.get().submoduleExists, path),
          e.getMessage());
View Full Code Here

    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    String path = "sub";
    String uri = "./.git";
    command.setPath(path);
    command.setURI(uri);
    Repository repo = command.call();
    assertNotNull(repo);
    addRepoToClose(repo);

    SubmoduleWalk generator = SubmoduleWalk.forIndex(db);
    assertTrue(generator.next());
View Full Code Here

    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    command.setPath(path2);
    String url2 = db.getDirectory().toURI().toString();
    command.setURI(url2);
    Repository r = command.call();
    assertNotNull(r);
    addRepoToClose(r);

    modulesConfig.load();
    assertEquals(path1, modulesConfig.getString(
View Full Code Here

    SubmoduleAddCommand command = new SubmoduleAddCommand(db);
    String path = "sub";
    command.setPath(path);
    String uri = db.getDirectory().toURI().toString();
    command.setURI(uri);
    Repository subRepo = command.call();
    assertNotNull(subRepo);
    subRepo.close();

    refreshAndWait();
View Full Code Here

        final SubmoduleAddCommand add = Git.wrap(repo).submoduleAdd();
        add.setProgressMonitor(new EclipseGitProgressTransformer(pm));
        add.setPath(path);
        add.setURI(uri);
        try {
          Repository subRepo = add.call();
          if (subRepo != null) {
            subRepo.close();
            repo.notifyIndexChanged();
          }
        } catch (GitAPIException e) {
View Full Code Here

    String path = "sub";
    command.setPath(path);
    String uri = new URIish(repo.getDirectory().toURI().toString())
        .toString();
    command.setURI(uri);
    Repository subRepo = command.call();
    assertNotNull(subRepo);
    subRepo.close();

    Ref head = subRepo.getRef(Constants.HEAD);
    assertNotNull(head);
View Full Code Here

    String path = "sub";
    command.setPath(path);
    String uri = new URIish(repo.getDirectory().toURI().toString())
        .toString();
    command.setURI(uri);
    Repository subRepo = command.call();
    assertNotNull(subRepo);
    subRepo.close();

    String newUri = "git://server/repo.git";
    File modulesFile = new File(repo.getWorkTree(),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.