comparison src/org/tmatesoft/hg/core/HgChangeset.java @ 432:1fc0da631200

Revlog.ParentWalker helper class got promoted as TLC, renamed to HgParentChildMap
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 30 Mar 2012 16:22:51 +0200
parents 31a89587eb04
children 7bcfbc255f48
comparison
equal deleted inserted replaced
431:12f668401613 432:1fc0da631200
25 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; 25 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset;
26 import org.tmatesoft.hg.repo.HgInvalidStateException; 26 import org.tmatesoft.hg.repo.HgInvalidStateException;
27 import org.tmatesoft.hg.repo.HgRepository; 27 import org.tmatesoft.hg.repo.HgRepository;
28 import org.tmatesoft.hg.repo.HgRuntimeException; 28 import org.tmatesoft.hg.repo.HgRuntimeException;
29 import org.tmatesoft.hg.repo.HgStatusCollector; 29 import org.tmatesoft.hg.repo.HgStatusCollector;
30 import org.tmatesoft.hg.repo.HgParentChildMap;
30 import org.tmatesoft.hg.util.CancelledException; 31 import org.tmatesoft.hg.util.CancelledException;
31 import org.tmatesoft.hg.util.Path; 32 import org.tmatesoft.hg.util.Path;
32 33
33 34
34 /** 35 /**
41 */ 42 */
42 public class HgChangeset implements Cloneable { 43 public class HgChangeset implements Cloneable {
43 private final HgStatusCollector statusHelper; 44 private final HgStatusCollector statusHelper;
44 private final Path.Source pathHelper; 45 private final Path.Source pathHelper;
45 46
46 private HgChangelog.ParentWalker parentHelper; 47 private HgParentChildMap<HgChangelog> parentHelper;
47 48
48 // 49 //
49 private RawChangeset changeset; 50 private RawChangeset changeset;
50 private Nodeid nodeid; 51 private Nodeid nodeid;
51 52
70 deletedFiles = null; 71 deletedFiles = null;
71 parent1 = parent2 = null; 72 parent1 = parent2 = null;
72 // keep references to parentHelper, statusHelper and pathHelper 73 // keep references to parentHelper, statusHelper and pathHelper
73 } 74 }
74 75
75 /*package-local*/ void setParentHelper(HgChangelog.ParentWalker pw) { 76 /*package-local*/ void setParentHelper(HgParentChildMap<HgChangelog> pw) {
76 parentHelper = pw; 77 parentHelper = pw;
77 if (parentHelper != null) { 78 if (parentHelper != null) {
78 if (parentHelper.getRepo() != statusHelper.getRepo()) { 79 if (parentHelper.getRepo() != statusHelper.getRepo()) {
79 throw new IllegalArgumentException(); 80 throw new IllegalArgumentException();
80 } 81 }