Mercurial > jhg
comparison src/com/tmate/hgkit/console/Log.java @ 4:aa1912c70b36
Fix offset issue for inline revlogs. Commandline processing.
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 20 Dec 2010 04:20:52 +0100 |
parents | 24bb4f365164 |
children | 5abe5af181bd |
comparison
equal
deleted
inserted
replaced
3:24bb4f365164 | 4:aa1912c70b36 |
---|---|
13 */ | 13 */ |
14 public class Log { | 14 public class Log { |
15 | 15 |
16 public static void main(String[] args) throws Exception { | 16 public static void main(String[] args) throws Exception { |
17 RepositoryLookup repoLookup = new RepositoryLookup(); | 17 RepositoryLookup repoLookup = new RepositoryLookup(); |
18 HgRepository hgRepo = repoLookup.detect(args); | 18 RepositoryLookup.Options cmdLineOpts = RepositoryLookup.Options.parse(args); |
19 HgRepository hgRepo = repoLookup.detect(cmdLineOpts); | |
19 if (hgRepo.isInvalid()) { | 20 if (hgRepo.isInvalid()) { |
20 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); | 21 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); |
21 return; | 22 return; |
22 } | 23 } |
23 System.out.println(hgRepo.getLocation()); | 24 System.out.println(hgRepo.getLocation()); |
26 public void next(Changeset cset) { | 27 public void next(Changeset cset) { |
27 System.out.println("==>"); | 28 System.out.println("==>"); |
28 cset.dump(); | 29 cset.dump(); |
29 } | 30 } |
30 }; | 31 }; |
31 HgDataFile f1 = hgRepo.getFileNode("hello.c"); | 32 for (String fname : cmdLineOpts.files) { |
32 System.out.println("Complete of a file:"); | 33 HgDataFile f1 = hgRepo.getFileNode(fname); |
33 f1.history(callback); | 34 System.out.println("\nComplete of a file: " + fname); |
35 f1.history(callback); | |
34 // | 36 // |
35 // System.out.println("\n\n========================="); | 37 // System.out.println("\n\n========================="); |
36 // System.out.println("Range 1-3:"); | 38 // System.out.println("Range 1-3:"); |
37 // f1.history(1,3, callback); | 39 // f1.history(1,3, callback); |
40 } | |
38 // | 41 // |
39 System.out.println("\n\n========================="); | 42 System.out.println("\n\n========================="); |
40 System.out.println("Complete of a repo:"); | 43 System.out.println("Complete of a repo:"); |
41 hgRepo.getChangelog().all(callback); | 44 hgRepo.getChangelog().all(callback); |
42 //new ChangelogWalker().setFile("hello.c").setRevisionRange(1, 4).accept(new Visitor); | 45 //new ChangelogWalker().setFile("hello.c").setRevisionRange(1, 4).accept(new Visitor); |