diff cmdline/org/tmatesoft/hg/console/Manifest.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 4c3b9f679412
children ee8264d80747
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Manifest.java	Sat Sep 17 12:24:50 2011 +0200
+++ b/cmdline/org/tmatesoft/hg/console/Manifest.java	Sat Sep 17 13:26:52 2011 +0200
@@ -16,6 +16,7 @@
  */
 package org.tmatesoft.hg.console;
 
+import static org.tmatesoft.hg.console.Options.asSet;
 import static org.tmatesoft.hg.repo.HgRepository.TIP;
 
 import org.tmatesoft.hg.core.HgFileRevision;
@@ -33,7 +34,7 @@
 public class Manifest {
 
 	public static void main(String[] args) throws Exception {
-		Options cmdLineOpts = Options.parse(args);
+		Options cmdLineOpts = Options.parse(args, asSet("--debug", "-v", "--verbose"));
 		HgRepository hgRepo = cmdLineOpts.findRepository();
 		if (hgRepo.isInvalid()) {
 			System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation());