Mercurial > jhg
comparison src/com/tmate/hgkit/console/Bundle.java @ 37:e45e75e22523
Parse changesets from bundle's changelog group. Refactor Revlog to provide access to revision's raw content
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Fri, 14 Jan 2011 00:49:58 +0100 |
| parents | 205f9b59b400 |
| children |
comparison
equal
deleted
inserted
replaced
| 36:205f9b59b400 | 37:e45e75e22523 |
|---|---|
| 4 package com.tmate.hgkit.console; | 4 package com.tmate.hgkit.console; |
| 5 | 5 |
| 6 import java.io.File; | 6 import java.io.File; |
| 7 | 7 |
| 8 import com.tmate.hgkit.fs.DataAccessProvider; | 8 import com.tmate.hgkit.fs.DataAccessProvider; |
| 9 import com.tmate.hgkit.fs.RepositoryLookup; | |
| 9 import com.tmate.hgkit.ll.HgBundle; | 10 import com.tmate.hgkit.ll.HgBundle; |
| 11 import com.tmate.hgkit.ll.HgRepository; | |
| 10 | 12 |
| 11 /** | 13 /** |
| 12 * | 14 * |
| 13 * @author artem | 15 * @author artem |
| 14 */ | 16 */ |
| 15 public class Bundle { | 17 public class Bundle { |
| 16 | 18 |
| 17 public static void main(String[] args) throws Exception { | 19 public static void main(String[] args) throws Exception { |
| 20 RepositoryLookup repoLookup = new RepositoryLookup(); | |
| 21 RepositoryLookup.Options cmdLineOpts = RepositoryLookup.Options.parse(args); | |
| 22 HgRepository hgRepo = repoLookup.detect(cmdLineOpts); | |
| 23 if (hgRepo.isInvalid()) { | |
| 24 System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); | |
| 25 return; | |
| 26 } | |
| 18 File bundleFile = new File("/temp/hg/hg-bundle-a78c980749e3.tmp"); | 27 File bundleFile = new File("/temp/hg/hg-bundle-a78c980749e3.tmp"); |
| 19 DataAccessProvider dap = new DataAccessProvider(); | 28 DataAccessProvider dap = new DataAccessProvider(); |
| 20 HgBundle hgBundle = new HgBundle(dap, bundleFile); | 29 HgBundle hgBundle = new HgBundle(dap, bundleFile); |
| 21 hgBundle.read(); | 30 // hgBundle.dump(); |
| 31 hgBundle.changes(hgRepo); | |
| 22 } | 32 } |
| 23 } | 33 } |
