org.apache.maven.scm.provider.hg
Class HgUtils
java.lang.Object
org.apache.maven.scm.provider.hg.HgUtils
public class HgUtils
- extends java.lang.Object
Common code for executing hg commands.
- Version:
- $Id: HgUtils.java 1057017 2011-01-09 20:11:55Z olamy $
- Author:
- thurner rupert
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HgUtils
public HgUtils()
execute
public static ScmResult execute(HgConsumer consumer,
ScmLogger logger,
java.io.File workingDir,
java.lang.String[] cmdAndArgs)
throws ScmException
- Throws:
ScmException
execute
public static ScmResult execute(java.io.File workingDir,
java.lang.String[] cmdAndArgs)
throws ScmException
- Throws:
ScmException
expandCommandLine
public static java.lang.String[] expandCommandLine(java.lang.String[] cmdAndArgs,
ScmFileSet additionalFiles)
getCurrentRevisionNumber
public static int getCurrentRevisionNumber(ScmLogger logger,
java.io.File workingDir)
throws ScmException
- Throws:
ScmException
getCurrentBranchName
public static java.lang.String getCurrentBranchName(ScmLogger logger,
java.io.File workingDir)
throws ScmException
- Throws:
ScmException
differentOutgoingBranchFound
public static boolean differentOutgoingBranchFound(ScmLogger logger,
java.io.File workingDir,
java.lang.String workingbranchName)
throws ScmException
- Check if there are outgoing changes on a different branch. If so, Mercurial default behaviour
is to block the push and warn using a 'push creates new remote branch !' message.
We also warn, and return true if a different outgoing branch was found
Method users should not stop the push on a negative return, instead, they should hg push -r(branch being released)
- Parameters:
logger
- the loggerworkingDir
- the working dirworkingbranchName
- the working branch name
- Returns:
- true if a different outgoing branch was found
- Throws:
ScmException
- on outgoing command error
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.