comparison cmdline/org/tmatesoft/hg/console/Log.java @ 124:cea84c5995e6

Changeset to access parent nodeids
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 15 Feb 2011 06:30:05 +0100
parents a3a2e5deb320
children 645829962785
comparison
equal deleted inserted replaced
123:4f509f5bc8cb 124:cea84c5995e6
174 sb.append("tip"); 174 sb.append("tip");
175 } 175 }
176 sb.append('\n'); 176 sb.append('\n');
177 } 177 }
178 if (complete) { 178 if (complete) {
179 if (changelogWalker == null) { 179 // if (changelogWalker == null) {
180 changelogWalker = repo.getChangelog().new ParentWalker(); 180 // changelogWalker = repo.getChangelog().new ParentWalker();
181 changelogWalker.init(); 181 // changelogWalker.init();
182 } 182 // }
183 Nodeid p1 = changelogWalker.safeFirstParent(csetNodeid); 183 // Nodeid p1 = changelogWalker.safeFirstParent(csetNodeid);
184 Nodeid p2 = changelogWalker.safeSecondParent(csetNodeid); 184 // Nodeid p2 = changelogWalker.safeSecondParent(csetNodeid);
185 Nodeid p1 = cset.getFirstParentRevision();
186 Nodeid p2 = cset.getSecondParentRevision();
185 int p1x = p1 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p1); 187 int p1x = p1 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p1);
186 int p2x = p2 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p2); 188 int p2x = p2 == Nodeid.NULL ? -1 : repo.getChangelog().getLocalRevision(p2);
187 int mx = repo.getManifest().getLocalRevision(cset.getManifestRevision()); 189 int mx = repo.getManifest().getLocalRevision(cset.getManifestRevision());
188 f.format("parent: %d:%s\nparent: %d:%s\nmanifest: %d:%s\n", p1x, p1, p2x, p2, mx, cset.getManifestRevision()); 190 f.format("parent: %d:%s\nparent: %d:%s\nmanifest: %d:%s\n", p1x, p1, p2x, p2, mx, cset.getManifestRevision());
189 } 191 }