comparison cmdline/org/tmatesoft/hg/console/Main.java @ 285:6dbbc53fc46d

Use Path instead of plain String for manifest file names
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 03 Sep 2011 21:46:13 +0200
parents 81e9a3c9bafe
children 8faad08c709b
comparison
equal deleted inserted replaced
284:7232b94f2ae3 285:6dbbc53fc46d
23 import java.util.Collections; 23 import java.util.Collections;
24 import java.util.List; 24 import java.util.List;
25 import java.util.Map; 25 import java.util.Map;
26 26
27 import org.junit.Assert; 27 import org.junit.Assert;
28 import org.tmatesoft.hg.core.HgBadStateException;
28 import org.tmatesoft.hg.core.HgDataStreamException; 29 import org.tmatesoft.hg.core.HgDataStreamException;
29 import org.tmatesoft.hg.core.HgLogCommand; 30 import org.tmatesoft.hg.core.HgLogCommand;
30 import org.tmatesoft.hg.core.HgCatCommand; 31 import org.tmatesoft.hg.core.HgCatCommand;
31 import org.tmatesoft.hg.core.HgFileInformer; 32 import org.tmatesoft.hg.core.HgFileInformer;
32 import org.tmatesoft.hg.core.HgFileRevision; 33 import org.tmatesoft.hg.core.HgFileRevision;
44 import org.tmatesoft.hg.repo.HgMergeState; 45 import org.tmatesoft.hg.repo.HgMergeState;
45 import org.tmatesoft.hg.repo.HgRepository; 46 import org.tmatesoft.hg.repo.HgRepository;
46 import org.tmatesoft.hg.repo.HgStatusCollector; 47 import org.tmatesoft.hg.repo.HgStatusCollector;
47 import org.tmatesoft.hg.repo.HgStatusInspector; 48 import org.tmatesoft.hg.repo.HgStatusInspector;
48 import org.tmatesoft.hg.repo.HgSubrepoLocation; 49 import org.tmatesoft.hg.repo.HgSubrepoLocation;
50 import org.tmatesoft.hg.repo.HgManifest.Flags;
49 import org.tmatesoft.hg.repo.HgSubrepoLocation.Kind; 51 import org.tmatesoft.hg.repo.HgSubrepoLocation.Kind;
50 import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector; 52 import org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector;
51 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset; 53 import org.tmatesoft.hg.repo.HgChangelog.RawChangeset;
52 import org.tmatesoft.hg.util.FileWalker; 54 import org.tmatesoft.hg.util.FileWalker;
53 import org.tmatesoft.hg.util.Pair; 55 import org.tmatesoft.hg.util.Pair;
354 356
355 private void dumpCompleteManifestLow() { 357 private void dumpCompleteManifestLow() {
356 hgRepo.getManifest().walk(0, TIP, new ManifestDump()); 358 hgRepo.getManifest().walk(0, TIP, new ManifestDump());
357 } 359 }
358 360
359 public static final class ManifestDump implements HgManifest.Inspector { 361 public static final class ManifestDump implements HgManifest.Inspector2 {
360 public boolean begin(int manifestRevision, Nodeid nid, int changelogRevision) { 362 public boolean begin(int manifestRevision, Nodeid nid, int changelogRevision) {
361 System.out.printf("%d : %s\n", manifestRevision, nid); 363 System.out.printf("%d : %s\n", manifestRevision, nid);
362 return true; 364 return true;
363 } 365 }
364 366
365 public boolean next(Nodeid nid, String fname, String flags) { 367 public boolean next(Nodeid nid, String fname, String flags) {
368 throw new HgBadStateException(HgManifest.Inspector2.class.getName());
369 }
370 public boolean next(Nodeid nid, Path fname, Flags flags) {
366 System.out.println(nid + "\t" + fname + "\t\t" + flags); 371 System.out.println(nid + "\t" + fname + "\t\t" + flags);
367 return true; 372 return true;
368 } 373 }
369 374
370 public boolean end(int revision) { 375 public boolean end(int revision) {