Examples of PathsSection


Examples of org.tmatesoft.hg.repo.HgRepoConfig.PathsSection

      toReport = ex;
    }
    if (uri == null) {
      String server = null;
      if (hgRepo != null && !hgRepo.isInvalid()) {
        PathsSection ps = hgRepo.getConfiguration().getPaths();
        server = key == null || key.trim().length() == 0 ? ps.getDefault() : ps.getString(key, null); // XXX Java 1.5 isEmpty()
      } else if (key == null || key.trim().length() == 0) {
        throw new HgBadArgumentException("Can't look up empty key in a global configuration", null);
      }
      if (server == null) {
        server = getGlobalConfig().getSection("paths").get(key);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRepoConfig.PathsSection

    assertNotNull(cfg.getExtensions());
    final Section dne = cfg.getSection("does-not-exist");
    assertNotNull(dne);
    assertFalse(dne.exists());
    assertEquals(username, cfg.getSection("ui").getString("username", null));
    final PathsSection p = cfg.getPaths();
    assertTrue(p.getPathSymbolicNames().contains(path1_key));
    assertEquals(path1_value, p.getString(path1_key, null));
    assertTrue(p.hasDefault());
    assertEquals(path1_value, p.getDefault());
    assertFalse(p.hasDefault() ^ p.getDefault() != null);
    assertFalse(p.hasDefaultPush() ^ p.getDefaultPush() != null);
    final ExtensionsSection e = cfg.getExtensions();
    assertTrue(e.isEnabled(ext1_key));
    assertTrue(e.getString(ext2_key, null).length() > 0);
    assertFalse(e.isEnabled(ext2_key));
    assertNotNull(e.getString(ext3_key, null));
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.