comparison cmdline/org/tmatesoft/hg/console/Main.java @ 226:26ad7827a62d

Support status query for a single file or a subdirectory of a repository
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 25 May 2011 12:16:24 +0200
parents 373e07cd3991
children 1ec6b327a6ac
comparison
equal deleted inserted replaced
225:fad70a9e6c7f 226:26ad7827a62d
59 System.out.println("REPO:" + hgRepo.getLocation()); 59 System.out.println("REPO:" + hgRepo.getLocation());
60 } 60 }
61 61
62 public static void main(String[] args) throws Exception { 62 public static void main(String[] args) throws Exception {
63 Main m = new Main(args); 63 Main m = new Main(args);
64 m.dumpBranches(); 64 m.testFileStatus();
65 // m.dumpBranches();
65 // m.inflaterLengthException(); 66 // m.inflaterLengthException();
66 // m.dumpIgnored(); 67 // m.dumpIgnored();
67 // m.dumpDirstate(); 68 // m.dumpDirstate();
68 // m.testStatusInternals(); 69 // m.testStatusInternals();
69 // m.catCompleteHistory(); 70 // m.catCompleteHistory();
70 // m.dumpCompleteManifestLow(); 71 // m.dumpCompleteManifestLow();
71 // m.dumpCompleteManifestHigh(); 72 // m.dumpCompleteManifestHigh();
72 // m.bunchOfTests(); 73 // m.bunchOfTests();
74 }
75
76 private void testFileStatus() {
77 // final Path path = Path.create("src/org/tmatesoft/hg/util/");
78 final Path path = Path.create("src/org/tmatesoft/hg/internal/Experimental.java");
79 HgWorkingCopyStatusCollector wcsc = HgWorkingCopyStatusCollector.create(hgRepo, path);
80 wcsc.walk(TIP, new StatusDump());
73 } 81 }
74 82
75 private void dumpBranches() { 83 private void dumpBranches() {
76 HgBranches b = hgRepo.getBranches(); 84 HgBranches b = hgRepo.getBranches();
77 for (HgBranches.BranchInfo bi : b.getAllBranches()) { 85 for (HgBranches.BranchInfo bi : b.getAllBranches()) {