Mercurial > jhg
diff src/org/tmatesoft/hg/core/ChangesetTransformer.java @ 195:c9b305df0b89
Optimization: use ParentWalker to get changeset's parents, if possible. Do not keep duplicating nodeids and strings in manifest revisions
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 15 Apr 2011 05:17:44 +0200 |
parents | 37f3d4a596e4 |
children | ffc5f6d59f7e |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/ChangesetTransformer.java Fri Apr 15 03:35:08 2011 +0200 +++ b/src/org/tmatesoft/hg/core/ChangesetTransformer.java Fri Apr 15 05:17:44 2011 +0200 @@ -36,7 +36,8 @@ private final HgChangeset changeset; private Set<String> branches; - public ChangesetTransformer(HgRepository hgRepo, HgLogCommand.Handler delegate) { + // repo and delegate can't be null, parent walker can + public ChangesetTransformer(HgRepository hgRepo, HgLogCommand.Handler delegate, HgChangelog.ParentWalker pw) { if (hgRepo == null || delegate == null) { throw new IllegalArgumentException(); } @@ -45,6 +46,7 @@ PathPool pp = new PathPool(new PathRewrite.Empty()); statusCollector.setPathPool(pp); changeset = new HgChangeset(statusCollector, pp); + changeset.setParentHelper(pw); handler = delegate; }