Mercurial > jhg
diff 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 |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/console/Bundle.java Thu Jan 13 23:31:39 2011 +0100 +++ b/src/com/tmate/hgkit/console/Bundle.java Fri Jan 14 00:49:58 2011 +0100 @@ -6,7 +6,9 @@ import java.io.File; import com.tmate.hgkit.fs.DataAccessProvider; +import com.tmate.hgkit.fs.RepositoryLookup; import com.tmate.hgkit.ll.HgBundle; +import com.tmate.hgkit.ll.HgRepository; /** * @@ -15,9 +17,17 @@ public class Bundle { public static void main(String[] args) throws Exception { + RepositoryLookup repoLookup = new RepositoryLookup(); + RepositoryLookup.Options cmdLineOpts = RepositoryLookup.Options.parse(args); + HgRepository hgRepo = repoLookup.detect(cmdLineOpts); + if (hgRepo.isInvalid()) { + System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); + return; + } File bundleFile = new File("/temp/hg/hg-bundle-a78c980749e3.tmp"); DataAccessProvider dap = new DataAccessProvider(); HgBundle hgBundle = new HgBundle(dap, bundleFile); - hgBundle.read(); +// hgBundle.dump(); + hgBundle.changes(hgRepo); } }