Mercurial > jhg
comparison cmdline/org/tmatesoft/hg/console/Main.java @ 609:e4a71afd3c71
Test TODOs: test for ConfigFile (covering %include and %unset directives)
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 08 May 2013 17:11:45 +0200 |
parents | 3c4db86e8c1f |
children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
608:e1b29756f901 | 609:e4a71afd3c71 |
---|---|
105 m.checkFileSneakerPerformance(); | 105 m.checkFileSneakerPerformance(); |
106 // m.testRevert(); | 106 // m.testRevert(); |
107 // m.testCheckout(); | 107 // m.testCheckout(); |
108 // m.tryExtensions(); | 108 // m.tryExtensions(); |
109 // m.dumpBookmarks(); | 109 // m.dumpBookmarks(); |
110 // m.readConfigFile(); | |
111 // m.dumpCommitLastMessage(); | 110 // m.dumpCommitLastMessage(); |
112 // m.buildFileLog(); | 111 // m.buildFileLog(); |
113 // m.testConsoleLog(); | 112 // m.testConsoleLog(); |
114 // m.testTreeTraversal(); | 113 // m.testTreeTraversal(); |
115 // m.testRevisionMap(); | 114 // m.testRevisionMap(); |
206 } else { | 205 } else { |
207 System.out.print(" "); | 206 System.out.print(" "); |
208 } | 207 } |
209 System.out.printf("%-26s (%s)\n", bmname, bm.getRevision(bmname).shortNotation()); | 208 System.out.printf("%-26s (%s)\n", bmname, bm.getRevision(bmname).shortNotation()); |
210 } | 209 } |
211 } | |
212 | |
213 // TODO as test | |
214 private void readConfigFile() throws Exception { | |
215 ConfigFile configFile = new ConfigFile(hgRepo.getSessionContext()); | |
216 configFile.addLocation(new File(System.getProperty("user.home"), "test-cfg/aaa/config1")); | |
217 for (String s : configFile.getSectionNames()) { | |
218 System.out.printf("[%s]\n", s); | |
219 for (Map.Entry<String, String> e : configFile.getSection(s).entrySet()) { | |
220 System.out.printf("%s = %s\n", e.getKey(), e.getValue()); | |
221 } | |
222 } | |
223 | |
224 } | 210 } |
225 | 211 |
226 private void dumpCommitLastMessage() throws Exception { | 212 private void dumpCommitLastMessage() throws Exception { |
227 System.out.println(hgRepo.getCommitLastMessage()); | 213 System.out.println(hgRepo.getCommitLastMessage()); |
228 } | 214 } |