comparison cmdline/org/tmatesoft/hg/console/Main.java @ 477:9c9d09111aee

Tests for file flags(exec, link, regular)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 12 Jul 2012 18:07:51 +0200
parents 0e34b8f3946a
children e74580e24feb
comparison
equal deleted inserted replaced
476:c02b5710d9ac 477:9c9d09111aee
105 105
106 public static void main(String[] args) throws Exception { 106 public static void main(String[] args) throws Exception {
107 Main m = new Main(args); 107 Main m = new Main(args);
108 // m.checkWalkFileRevisions(); 108 // m.checkWalkFileRevisions();
109 // m.checkSubProgress(); 109 // m.checkSubProgress();
110 // m.checkFileFlags();
111 // m.buildFileLog(); 110 // m.buildFileLog();
112 // m.testConsoleLog(); 111 // m.testConsoleLog();
113 // m.testTreeTraversal(); 112 // m.testTreeTraversal();
114 // m.testRevisionMap(); 113 // m.testRevisionMap();
115 // m.testSubrepos(); 114 // m.testSubrepos();
169 s2.start(5); 168 s2.start(5);
170 s2.worked(3); 169 s2.worked(3);
171 s2.worked(2); 170 s2.worked(2);
172 s2.done(); 171 s2.done();
173 } 172 }
174
175 private void checkFileFlags() throws Exception {
176 // ~/hg/test-flags repo
177 // TODO transform to a test once I keep test-flags in test-repos.jar
178 // JAR can't keep symlinks. Perhaps, a solution would be to keep repo without WC and
179 // perform an `hg up` before use
180 HgDataFile link = hgRepo.getFileNode("file-link");
181 HgDataFile exec = hgRepo.getFileNode("file-exec");
182 HgDataFile file = hgRepo.getFileNode("regular-file");
183 System.out.println("Link: " + link.getFlags(TIP));
184 System.out.println("Exec: " + exec.getFlags(TIP));
185 System.out.println("File: " + file.getFlags(TIP));
186 }
187
188 173
189 private void buildFileLog() throws Exception { 174 private void buildFileLog() throws Exception {
190 final long start = System.nanoTime(); 175 final long start = System.nanoTime();
191 HgLogCommand cmd = new HgLogCommand(hgRepo); 176 HgLogCommand cmd = new HgLogCommand(hgRepo);
192 cmd.file("file1", false); 177 cmd.file("file1", false);