Class GitStatusConsumer
- java.lang.Object
-
- org.apache.maven.scm.util.AbstractConsumer
-
- org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer
-
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
public class GitStatusConsumer extends AbstractConsumer
- Author:
- Mark Struberg
-
-
Field Summary
-
Fields inherited from class org.apache.maven.scm.util.AbstractConsumer
logger
-
-
Constructor Summary
Constructors Constructor Description GitStatusConsumer(File workingDirectory)
Consumer when workingDirectory and repositoryRootDirectory are the sameGitStatusConsumer(File workingDirectory, URI relativeRepositoryPath)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
GitStatusConsumer(File workingDirectory, URI relativeRepositoryPath, ScmFileSet scmFileSet)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
GitStatusConsumer(File workingDirectory, ScmFileSet scmFileSet)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeLine(String line)
List<ScmFile>
getChangedFiles()
static String
resolvePath(String fileEntry, URI path)
static URI
resolveURI(String fileEntry, URI path)
static URI
uriFromPath(String path)
Create an URI whose getPath() returns the given path and getScheme() returns null.-
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
parseDate, parseDate
-
-
-
-
Constructor Detail
-
GitStatusConsumer
public GitStatusConsumer(File workingDirectory)
Consumer when workingDirectory and repositoryRootDirectory are the same- Parameters:
workingDirectory
- the working directory
-
GitStatusConsumer
public GitStatusConsumer(File workingDirectory, URI relativeRepositoryPath)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
- Parameters:
workingDirectory
- the working directoryrelativeRepositoryPath
- the working directory relative to the repository root- Since:
- 1.9
- See Also:
GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
-
GitStatusConsumer
public GitStatusConsumer(File workingDirectory, ScmFileSet scmFileSet)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
- Parameters:
workingDirectory
- the working directoryscmFileSet
- fileset with includes and excludes- Since:
- 1.11.0
- See Also:
GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
-
GitStatusConsumer
public GitStatusConsumer(File workingDirectory, URI relativeRepositoryPath, ScmFileSet scmFileSet)
Assuming that you have to discover the repositoryRoot, this is how you can get therelativeRepositoryPath
URI.create( repositoryRoot ).relativize( fileSet.getBasedir().toURI() )
- Parameters:
workingDirectory
- the working directoryrelativeRepositoryPath
- the working directory relative to the repository rootscmFileSet
- fileset with includes and excludes- Since:
- 1.11.0
- See Also:
GitStatusCommand.createRevparseShowPrefix(ScmFileSet)
-
-
Method Detail
-
consumeLine
public void consumeLine(String line)
-
resolvePath
public static String resolvePath(String fileEntry, URI path)
-
resolveURI
public static URI resolveURI(String fileEntry, URI path)
- Parameters:
fileEntry
- the fileEntry, must not benull
path
- the path, must not benull
- Returns:
- TODO
-
uriFromPath
public static URI uriFromPath(String path)
Create an URI whose getPath() returns the given path and getScheme() returns null. The path may contain spaces, colons, and other special characters.- Parameters:
path
- the path.- Returns:
- the new URI
-
getChangedFiles
public List<ScmFile> getChangedFiles()
-
-