Mercurial > jhg
diff src/com/tmate/hgkit/console/Manifest.java @ 13:df8c67f3006a
Basic manifest parsing to analyze what's in there
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sun, 26 Dec 2010 03:21:17 +0100 |
parents | |
children | 40532cdc92fc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/tmate/hgkit/console/Manifest.java Sun Dec 26 03:21:17 2010 +0100 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010 Artem Tikhomirov + */ +package com.tmate.hgkit.console; + +import com.tmate.hgkit.fs.RepositoryLookup; +import com.tmate.hgkit.ll.HgRepository; + +/** + * + * @author artem + */ +public class Manifest { + + 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; + } + System.out.println(hgRepo.getLocation()); + hgRepo.getManifest().dump(); + } +}