Mercurial > jhg
comparison cmdline/org/tmatesoft/hg/console/Main.java @ 220:8de327242aa0
Basic information about branches
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 19 May 2011 04:14:45 +0200 |
parents | 3a7696fb457c |
children | 373e07cd3991 |
comparison
equal
deleted
inserted
replaced
219:d63583b47bfa | 220:8de327242aa0 |
---|---|
26 import org.tmatesoft.hg.core.HgLogCommand.FileRevision; | 26 import org.tmatesoft.hg.core.HgLogCommand.FileRevision; |
27 import org.tmatesoft.hg.core.HgManifestCommand; | 27 import org.tmatesoft.hg.core.HgManifestCommand; |
28 import org.tmatesoft.hg.core.Nodeid; | 28 import org.tmatesoft.hg.core.Nodeid; |
29 import org.tmatesoft.hg.internal.ByteArrayChannel; | 29 import org.tmatesoft.hg.internal.ByteArrayChannel; |
30 import org.tmatesoft.hg.internal.DigestHelper; | 30 import org.tmatesoft.hg.internal.DigestHelper; |
31 import org.tmatesoft.hg.repo.HgBranches; | |
31 import org.tmatesoft.hg.repo.HgDataFile; | 32 import org.tmatesoft.hg.repo.HgDataFile; |
32 import org.tmatesoft.hg.repo.HgInternals; | 33 import org.tmatesoft.hg.repo.HgInternals; |
33 import org.tmatesoft.hg.repo.HgManifest; | 34 import org.tmatesoft.hg.repo.HgManifest; |
34 import org.tmatesoft.hg.repo.HgRepository; | 35 import org.tmatesoft.hg.repo.HgRepository; |
35 import org.tmatesoft.hg.repo.HgStatusCollector; | 36 import org.tmatesoft.hg.repo.HgStatusCollector; |
58 System.out.println("REPO:" + hgRepo.getLocation()); | 59 System.out.println("REPO:" + hgRepo.getLocation()); |
59 } | 60 } |
60 | 61 |
61 public static void main(String[] args) throws Exception { | 62 public static void main(String[] args) throws Exception { |
62 Main m = new Main(args); | 63 Main m = new Main(args); |
63 m.inflaterLengthException(); | 64 m.dumpBranches(); |
65 // m.inflaterLengthException(); | |
64 // m.dumpIgnored(); | 66 // m.dumpIgnored(); |
65 // m.dumpDirstate(); | 67 // m.dumpDirstate(); |
66 // m.testStatusInternals(); | 68 // m.testStatusInternals(); |
67 // m.catCompleteHistory(); | 69 // m.catCompleteHistory(); |
68 // m.dumpCompleteManifestLow(); | 70 // m.dumpCompleteManifestLow(); |
69 // m.dumpCompleteManifestHigh(); | 71 // m.dumpCompleteManifestHigh(); |
70 // m.bunchOfTests(); | 72 // m.bunchOfTests(); |
73 } | |
74 | |
75 private void dumpBranches() { | |
76 HgBranches b = hgRepo.getBranches(); | |
77 for (HgBranches.BranchInfo bi : b.getAllBranches()) { | |
78 System.out.print(bi.getName()); | |
79 if (bi.isClosed()) { | |
80 System.out.print("!"); | |
81 } | |
82 System.out.print(" "); | |
83 System.out.print(bi.getStart()); | |
84 System.out.print(" "); | |
85 System.out.println(bi.getHeads()); | |
86 } | |
71 } | 87 } |
72 | 88 |
73 private void inflaterLengthException() throws Exception { | 89 private void inflaterLengthException() throws Exception { |
74 HgDataFile f1 = hgRepo.getFileNode("src/com/tmate/hgkit/console/Bundle.java"); | 90 HgDataFile f1 = hgRepo.getFileNode("src/com/tmate/hgkit/console/Bundle.java"); |
75 HgDataFile f2 = hgRepo.getFileNode("test-repos.jar"); | 91 HgDataFile f2 = hgRepo.getFileNode("test-repos.jar"); |