Package org.eclipse.jgit.api

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


public class SubmoduleSyncTest extends RepositoryTestCase {

  @Test
  public void repositoryWithNoSubmodules() throws GitAPIException {
    SubmoduleSyncCommand command = new SubmoduleSyncCommand(db);
    Map<String, String> modules = command.call();
    assertNotNull(modules);
    assertTrue(modules.isEmpty());
  }

  @Test
View Full Code Here


    assertTrue(generator.next());
    assertNull(generator.getConfigUrl());
    assertEquals(url, generator.getModulesUrl());

    SubmoduleSyncCommand command = new SubmoduleSyncCommand(db);
    Map<String, String> synced = command.call();
    assertNotNull(synced);
    assertEquals(1, synced.size());
    Entry<String, String> module = synced.entrySet().iterator().next();
    assertEquals(path, module.getKey());
    assertEquals(url, module.getValue());
View Full Code Here

    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_URL, "../sub.git");
    modulesConfig.save();

    SubmoduleSyncCommand command = new SubmoduleSyncCommand(db);
    Map<String, String> synced = command.call();
    assertNotNull(synced);
    assertEquals(1, synced.size());
    Entry<String, String> module = synced.entrySet().iterator().next();
    assertEquals(path, module.getKey());
    assertEquals("git://server/sub.git", module.getValue());
View Full Code Here

        try {
          SubmoduleSyncCommand sync = Git.wrap(repository)
              .submoduleSync();
          for (String path : paths)
            sync.addPath(path);
          updates = sync.call();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
        } finally {
          if (updates != null && !updates.isEmpty())
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.