org.criticalsection.maven.scm.provider.monotone
Class MonotoneCommandlineUtils

java.lang.Object
  extended by org.criticalsection.maven.scm.provider.monotone.MonotoneCommandlineUtils

public class MonotoneCommandlineUtils
extends java.lang.Object


Constructor Summary
MonotoneCommandlineUtils()
           
 
Method Summary
static java.io.File createPassphraseHookInterceptor()
          Create a temorary file with a lua 'get_passphrase' hook definition.
static java.util.List getWorkingCopyFiles(java.io.File directory)
           
static java.lang.String searchWorkspaceRoot(java.lang.String startPath)
          Searches upwards in the filesystem for a dir containing _MTN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonotoneCommandlineUtils

public MonotoneCommandlineUtils()
Method Detail

getWorkingCopyFiles

public static java.util.List getWorkingCopyFiles(java.io.File directory)
                                          throws org.apache.maven.scm.ScmException
Throws:
org.apache.maven.scm.ScmException

createPassphraseHookInterceptor

public static java.io.File createPassphraseHookInterceptor()
                                                    throws org.apache.maven.scm.ScmException
Create a temorary file with a lua 'get_passphrase' hook definition. This is a ugly hack!! monotone doesn't has a --non-interactive option so that the process blocks forever asking the user for a password if non is specified in the 'get_passphrase' hook. If one is present this hook return the result of the original 'get_passphrase' hook else it returns an empty string, causing monotone to exit with an error.

Throws:
org.apache.maven.scm.ScmException

searchWorkspaceRoot

public static java.lang.String searchWorkspaceRoot(java.lang.String startPath)
Searches upwards in the filesystem for a dir containing _MTN

Parameters:
startPath -
Returns:


Copyright © 2008 CriticalSection.Org. All Rights Reserved.