diff cmdline/org/tmatesoft/hg/console/Clone.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 44a34baabea0
children
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Clone.java	Sat Sep 17 12:24:50 2011 +0200
+++ b/cmdline/org/tmatesoft/hg/console/Clone.java	Sat Sep 17 13:26:52 2011 +0200
@@ -17,6 +17,7 @@
 package org.tmatesoft.hg.console;
 
 import java.io.File;
+import java.util.Collections;
 import java.util.List;
 
 import org.tmatesoft.hg.core.HgCloneCommand;
@@ -33,7 +34,7 @@
 
 	// ran with args: svnkit c:\temp\hg\test-clone
 	public static void main(String[] args) throws Exception {
-		Options cmdLineOpts = Options.parse(args);
+		Options cmdLineOpts = Options.parse(args, Collections.<String>emptySet());
 		List<String> noOptsArgs = cmdLineOpts.getList("");
 		if (noOptsArgs.isEmpty()) {
 			System.err.println("Need at least one argument pointing to remote server to pull changes from");