comparison src/org/tmatesoft/hg/core/ChangesetTransformer.java @ 431:12f668401613

FIXMEs: awkward API refactored, what need to be internal got hidden; public aspects got captured in slim interfaces
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 29 Mar 2012 20:54:04 +0200
parents 31a89587eb04
children 1fc0da631200
comparison
equal deleted inserted replaced
430:d280759c2a3f 431:12f668401613
16 */ 16 */
17 package org.tmatesoft.hg.core; 17 package org.tmatesoft.hg.core;
18 18
19 import java.util.Set; 19 import java.util.Set;
20 20
21 import org.tmatesoft.hg.internal.PathPool;
21 import org.tmatesoft.hg.repo.HgChangelog; 22 import org.tmatesoft.hg.repo.HgChangelog;
22 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; 23 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset;
23 import org.tmatesoft.hg.repo.HgRepository; 24 import org.tmatesoft.hg.repo.HgRepository;
24 import org.tmatesoft.hg.repo.HgStatusCollector; 25 import org.tmatesoft.hg.repo.HgStatusCollector;
25 import org.tmatesoft.hg.util.Adaptable; 26 import org.tmatesoft.hg.util.Adaptable;
26 import org.tmatesoft.hg.util.CancelSupport; 27 import org.tmatesoft.hg.util.CancelSupport;
27 import org.tmatesoft.hg.util.CancelledException; 28 import org.tmatesoft.hg.util.CancelledException;
28 import org.tmatesoft.hg.util.PathPool;
29 import org.tmatesoft.hg.util.PathRewrite; 29 import org.tmatesoft.hg.util.PathRewrite;
30 import org.tmatesoft.hg.util.ProgressSupport; 30 import org.tmatesoft.hg.util.ProgressSupport;
31 31
32 /** 32 /**
33 * Bridges {@link HgChangelog.RawChangeset} with high-level {@link HgChangeset} API 33 * Bridges {@link HgChangelog.RawChangeset} with high-level {@link HgChangeset} API
101 static class Transformation { 101 static class Transformation {
102 private final HgChangeset changeset; 102 private final HgChangeset changeset;
103 103
104 public Transformation(HgStatusCollector statusCollector, HgChangelog.ParentWalker pw) { 104 public Transformation(HgStatusCollector statusCollector, HgChangelog.ParentWalker pw) {
105 // files listed in a changeset don't need their names to be rewritten (they are normalized already) 105 // files listed in a changeset don't need their names to be rewritten (they are normalized already)
106 // pp serves as a cache for all filenames encountered and as a source for Path listed in the changeset
106 PathPool pp = new PathPool(new PathRewrite.Empty()); 107 PathPool pp = new PathPool(new PathRewrite.Empty());
107 statusCollector.setPathPool(pp); 108 statusCollector.setPathPool(pp);
108 changeset = new HgChangeset(statusCollector, pp); 109 changeset = new HgChangeset(statusCollector, pp);
109 changeset.setParentHelper(pw); 110 changeset.setParentHelper(pw);
110 } 111 }