Mercurial > jhg
comparison cmdline/org/tmatesoft/hg/console/Outgoing.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 |
---|---|
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.console; | 17 package org.tmatesoft.hg.console; |
18 | 18 |
19 import java.util.Collection; | 19 import java.util.Collection; |
20 import java.util.Collections; | |
20 import java.util.List; | 21 import java.util.List; |
21 | 22 |
22 import org.tmatesoft.hg.core.HgOutgoingCommand; | 23 import org.tmatesoft.hg.core.HgOutgoingCommand; |
23 import org.tmatesoft.hg.core.HgRepoFacade; | 24 import org.tmatesoft.hg.core.HgRepoFacade; |
24 import org.tmatesoft.hg.core.Nodeid; | 25 import org.tmatesoft.hg.core.Nodeid; |
33 * @author TMate Software Ltd. | 34 * @author TMate Software Ltd. |
34 */ | 35 */ |
35 public class Outgoing { | 36 public class Outgoing { |
36 | 37 |
37 public static void main(String[] args) throws Exception { | 38 public static void main(String[] args) throws Exception { |
38 Options cmdLineOpts = Options.parse(args); | 39 Options cmdLineOpts = Options.parse(args, Collections.<String>emptySet()); |
39 HgRepoFacade hgRepo = new HgRepoFacade(); | 40 HgRepoFacade hgRepo = new HgRepoFacade(); |
40 if (!hgRepo.init(cmdLineOpts.findRepository())) { | 41 if (!hgRepo.init(cmdLineOpts.findRepository())) { |
41 System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation()); | 42 System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation()); |
42 return; | 43 return; |
43 } | 44 } |