buildframework/helium/sf/java/scm/src/com/nokia/maven/scm/provider/hg/command/init/HgInitCommand.java
--- a/buildframework/helium/sf/java/scm/src/com/nokia/maven/scm/provider/hg/command/init/HgInitCommand.java Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/sf/java/scm/src/com/nokia/maven/scm/provider/hg/command/init/HgInitCommand.java Fri Aug 13 14:59:05 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
package com.nokia.maven.scm.provider.hg.command.init;
@@ -30,25 +29,24 @@
import org.apache.maven.scm.provider.ScmProviderRepository;
import org.apache.maven.scm.provider.hg.HgUtils;
import org.apache.maven.scm.provider.hg.command.HgCommandConstants;
-import com.nokia.maven.scm.provider.hg.repository.HgScmProviderRepository;
import com.nokia.maven.scm.command.init.InitScmResult;
+import com.nokia.maven.scm.provider.hg.repository.HgScmProviderRepository;
/**
* 'hg init' command implementation.
*/
public class HgInitCommand extends AbstractCommand implements Command {
-
+
private static Logger log = Logger.getLogger(HgInitCommand.class);
@Override
- protected ScmResult executeCommand(ScmProviderRepository repository,
- ScmFileSet basedir, CommandParameters args) throws ScmException {
+ protected ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet basedir,
+ CommandParameters args) throws ScmException {
return executeInitCommand(repository);
}
- public InitScmResult executeInitCommand(ScmProviderRepository repository)
- throws ScmException {
+ public InitScmResult executeInitCommand(ScmProviderRepository repository) throws ScmException {
// Get the directory in which to create a new repository. Only local
// filesystems supported.
log.info("executeInitCommand: " + repository);
@@ -61,17 +59,13 @@
if (!hgRepoRootDir.exists()) {
boolean workingDirReady = hgRepoRootDir.mkdirs();
if (!workingDirReady) {
- throw new ScmException("Could not initiate test branch at: "
- + hgRepoRootDir);
+ throw new ScmException("Could not initiate test branch at: " + hgRepoRootDir);
}
}
// Create and run the command
- String[] initCmd = new String[] { HgCommandConstants.INIT_CMD, hgRepoDir.getName()};
+ String[] initCmd = new String[] { HgCommandConstants.INIT_CMD, hgRepoDir.getName() };
ScmResult result = HgUtils.execute(hgRepoRootDir, initCmd);
- return new InitScmResult(result.getCommandLine(),
- result.getProviderMessage(),
- result.getCommandOutput(),
- result.isSuccess());
+ return new InitScmResult(result.getCommandLine(), result.getProviderMessage(), result.getCommandOutput(), result.isSuccess());
}
}