Mercurial > hg4j
comparison cmdline/org/tmatesoft/hg/console/Incoming.java @ 299:45dc79e545f5
Recognize flag options (options with no arguments) in command line sample apps
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 17 Sep 2011 13:26:52 +0200 |
parents | 41a778e3fd31 |
children |
comparison
equal
deleted
inserted
replaced
298:aac0c3fab6ce | 299:45dc79e545f5 |
---|---|
44 public static void main(String[] args) throws Exception { | 44 public static void main(String[] args) throws Exception { |
45 if (Boolean.FALSE.booleanValue()) { | 45 if (Boolean.FALSE.booleanValue()) { |
46 new SequenceConstructor().test(); | 46 new SequenceConstructor().test(); |
47 return; | 47 return; |
48 } | 48 } |
49 Options cmdLineOpts = Options.parse(args); | 49 Options cmdLineOpts = Options.parse(args, Collections.<String>emptySet()); |
50 HgRepoFacade hgRepo = new HgRepoFacade(); | 50 HgRepoFacade hgRepo = new HgRepoFacade(); |
51 if (!hgRepo.init(cmdLineOpts.findRepository())) { | 51 if (!hgRepo.init(cmdLineOpts.findRepository())) { |
52 System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation()); | 52 System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation()); |
53 return; | 53 return; |
54 } | 54 } |