Mercurial > hg4j
diff src/com/tmate/hgkit/console/Status.java @ 10:382cfe9463db
Dirstate parsing. DataAccess refactored to allow reuse and control over constants
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 25 Dec 2010 21:50:12 +0100 |
parents | |
children | 02ee376bee79 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/tmate/hgkit/console/Status.java Sat Dec 25 21:50:12 2010 +0100 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010 Artem Tikhomirov + */ +package com.tmate.hgkit.console; + +import com.tmate.hgkit.fs.RepositoryLookup; +import com.tmate.hgkit.ll.HgRepository; +import com.tmate.hgkit.ll.LocalHgRepo; + +/** + * + * @author artem + */ +public class Status { + + 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()); + ((LocalHgRepo) hgRepo).loadDirstate().dump(); + } +}