Mercurial > jhg
comparison src/com/tmate/hgkit/console/Manifest.java @ 22:603806cd2dc6
Status of local working dir against non-tip base revision
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 06 Jan 2011 03:30:20 +0100 |
parents | 40532cdc92fc |
children | 19e9e220bf68 |
comparison
equal
deleted
inserted
replaced
21:e929cecae4e1 | 22:603806cd2dc6 |
---|---|
23 if (hgRepo.isInvalid()) { | 23 if (hgRepo.isInvalid()) { |
24 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); | 24 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); |
25 return; | 25 return; |
26 } | 26 } |
27 System.out.println(hgRepo.getLocation()); | 27 System.out.println(hgRepo.getLocation()); |
28 HgManifest.Inspector insp = new HgManifest.Inspector() { | 28 HgManifest.Inspector insp = new Dump(); |
29 public boolean begin(int revision, Nodeid nid) { | |
30 System.out.printf("%d : %s\n", revision, nid); | |
31 return true; | |
32 } | |
33 | |
34 public boolean next(Nodeid nid, String fname, String flags) { | |
35 System.out.println(nid + "\t" + fname + "\t\t" + flags); | |
36 return true; | |
37 } | |
38 | |
39 public boolean end(int revision) { | |
40 System.out.println(); | |
41 return true; | |
42 } | |
43 }; | |
44 hgRepo.getManifest().walk(0, TIP, insp); | 29 hgRepo.getManifest().walk(0, TIP, insp); |
45 } | 30 } |
31 | |
32 public static final class Dump implements HgManifest.Inspector { | |
33 public boolean begin(int revision, Nodeid nid) { | |
34 System.out.printf("%d : %s\n", revision, nid); | |
35 return true; | |
36 } | |
37 | |
38 public boolean next(Nodeid nid, String fname, String flags) { | |
39 System.out.println(nid + "\t" + fname + "\t\t" + flags); | |
40 return true; | |
41 } | |
42 | |
43 public boolean end(int revision) { | |
44 System.out.println(); | |
45 return true; | |
46 } | |
47 } | |
46 } | 48 } |