Mercurial > jhg
comparison cmdline/org/tmatesoft/hg/console/Main.java @ 253:1874d11054e5
HgLogCommand.changeset(Nodeid) to ease command configuration
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 15 Aug 2011 18:59:05 +0200 |
| parents | a6d19adc2636 |
| children | a620f0663a37 |
comparison
equal
deleted
inserted
replaced
| 252:a6d19adc2636 | 253:1874d11054e5 |
|---|---|
| 161 | 161 |
| 162 private void testParents() throws Exception { | 162 private void testParents() throws Exception { |
| 163 // hg parents cmd | 163 // hg parents cmd |
| 164 final Pair<Nodeid, Nodeid> wcParents = hgRepo.getWorkingCopyParents(); | 164 final Pair<Nodeid, Nodeid> wcParents = hgRepo.getWorkingCopyParents(); |
| 165 ChangesetDumpHandler dump = new ChangesetDumpHandler(hgRepo); | 165 ChangesetDumpHandler dump = new ChangesetDumpHandler(hgRepo); |
| 166 final HgChangelog clog = hgRepo.getChangelog(); | |
| 167 HgLogCommand cmd = new HgLogCommand(hgRepo); | 166 HgLogCommand cmd = new HgLogCommand(hgRepo); |
| 168 if (wcParents.hasFirst()) { | 167 if (wcParents.hasFirst()) { |
| 169 int x = clog.getLocalRevision(wcParents.first()); | 168 cmd.changeset(wcParents.first()).execute(dump); |
| 170 cmd.range(x, x).execute(dump); // FIXME HgLogCommand shall support Nodeid as revisions | |
| 171 } | 169 } |
| 172 if (wcParents.hasSecond()) { | 170 if (wcParents.hasSecond()) { |
| 173 int x = clog.getLocalRevision(wcParents.second()); | 171 cmd.changeset(wcParents.second()).execute(dump); |
| 174 cmd.range(x, x).execute(dump); | |
| 175 } | 172 } |
| 176 System.out.println("Branch:" + hgRepo.getWorkingCopyBranchName()); | 173 System.out.println("Branch:" + hgRepo.getWorkingCopyBranchName()); |
| 177 } | 174 } |
| 178 | 175 |
| 179 /* | 176 /* |
