diff src/org/tmatesoft/hg/core/HgRepoFacade.java @ 637:4a0bab2c6da1

HgInitCommand: expose repo init functionality
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 07 Jun 2013 12:32:15 +0200
parents 72c979555cb8
children 12a4f60ea972
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgRepoFacade.java	Thu Jun 06 19:39:06 2013 +0200
+++ b/src/org/tmatesoft/hg/core/HgRepoFacade.java	Fri Jun 07 12:32:15 2013 +0200
@@ -101,6 +101,14 @@
 	public SessionContext getSessionContext() {
 		return context;
 	}
+	
+	/**
+	 * This factory method doesn't need this facade to be initialized with a repository.
+	 * @return command instance, never <code>null</code>
+	 */
+	public HgInitCommand createInitCommand() {
+		return new HgInitCommand(new HgLookup(context));
+	}
 
 	public HgLogCommand createLogCommand() {
 		return new HgLogCommand(repo/*, getCommandContext()*/);