Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgLookup


  }

  public void manifestWalk() throws Exception {
    System.out.println(System.getProperty("java.version"));
    final long start = System.currentTimeMillis();
    final HgRepository repository = new HgLookup().detect(new File("/temp/hg/cpython"));
    repository.getManifest().walk(0, 10000, new DoNothingManifestInspector());
    // cpython: 1,1 sec for 0..1000, 43 sec for 0..10000, 115 sec for 0..20000 (Pool with HashMap)
    // 2,4 sec for 1000..2000
    // cpython -r 1000: 484 files, -r 2000: 1015 files. Iteration 1000..2000; fnamePool.size:1019 nodeidPool.size:2989
    // nodeidPool for two subsequent revisions only: 840. 37 sec for 0..10000. 99 sec for 0..20k
View Full Code Here


    return tagLocalRevs;
  }

  public void collectTagsPerFile() throws HgException, CancelledException, HgRuntimeException {
    final long start = System.currentTimeMillis();
    final HgRepository repository = new HgLookup().detect(new File("/home/artem/hg/cpython"));
    final HgTags tags = repository.getTags();
    //
    // build cache
    //
    final TagInfo[] allTags = new TagInfo[tags.getAllTags().size()];
View Full Code Here

      return true;
    }
  }
 
  public static void main2(String[] args) throws HgCallbackTargetException, HgException, CancelledException, HgRuntimeException {
    final HgRepository repository = new HgLookup().detect(new File("/temp/hg/cpython"));
    final Path targetPath = Path.create("README");
    final HgTags tags = repository.getTags();
    final Map<String, HgTags.TagInfo> tagToInfo = tags.getAllTags();
    final HgManifest manifest = repository.getManifest();
    final Map<Nodeid, List<String>> changeSetRevisionToTags = new HashMap<Nodeid, List<String>>();
View Full Code Here

    ArrayList<Nodeid> l = new ArrayList<Nodeid>();
    l.add(Nodeid.fromAscii("9ef1fab9f5e3d51d70941121dc27410e28069c2d")); // 640
    l.add(Nodeid.fromAscii("2f33f102a8fa59274a27ebbe1c2903cecac6c5d5")); // 639
    l.add(Nodeid.fromAscii("d074971287478f69ab0a64176ce2284d8c1e91c3")); // 638
    File bundleFile = bg.create(l);
    HgBundle b = new HgLookup().loadBundle(bundleFile);
    //
    DumbInspector insp = new DumbInspector();
    b.inspectChangelog(insp);
    errorCollector.assertTrue(insp.clogEnter && insp.clogExit);
    errorCollector.assertFalse(insp.csets.isEmpty());
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.repo.HgLookup

Copyright © 2018 www.massapicom. 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.