Package jetbrains.buildServer.vcs
Interface CommitPatchBuilder
-
public interface CommitPatchBuilder
Interface for creating commits in VCS. TeamCity calls its methods to add changes to the commit, when all changes are addedcommit(CommitSettings)
method is invoked.- Since:
- 9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommitResult
commit(CommitSettings commitSettings)
Creates new commit with specified user name and description messagevoid
createDirectory(String path)
Creates an empty directory at the given relative path from a repository rootvoid
createFile(String path, InputStream content)
Adds the specified content at the given relative path from a repository rootvoid
deleteDirectory(String path)
Recursively deletes a directory at the given relative path from a repository rootvoid
deleteFile(String path)
Deletes a file at the given relative path from a repository rootvoid
dispose()
Always called by TeamCity after was performed, or any of the methods above throw an exceptionvoid
renameFile(String oldPath, String newPath, InputStream content)
Moves a file at theoldPath
relative path from a repository root to a newPath and writes a new file content
-
-
-
Method Detail
-
createFile
void createFile(@NotNull String path, @NotNull InputStream content) throws VcsException
Adds the specified content at the given relative path from a repository root- Parameters:
path
- file pathcontent
- file content- Throws:
VcsException
- in case of any problems
-
createDirectory
void createDirectory(@NotNull String path) throws VcsException
Creates an empty directory at the given relative path from a repository root- Parameters:
path
- directory path- Throws:
VcsException
- in case of any problems
-
deleteFile
void deleteFile(@NotNull String path) throws VcsException
Deletes a file at the given relative path from a repository root- Parameters:
path
- file path- Throws:
VcsException
- in case of any problems
-
deleteDirectory
void deleteDirectory(@NotNull String path) throws VcsException
Recursively deletes a directory at the given relative path from a repository root- Parameters:
path
- directory path- Throws:
VcsException
- in case of any problems
-
renameFile
void renameFile(@NotNull String oldPath, @NotNull String newPath, @NotNull InputStream content) throws VcsException
Moves a file at theoldPath
relative path from a repository root to a newPath and writes a new file content- Parameters:
oldPath
- old file pathnewPath
- new file pathcontent
- file content- Throws:
VcsException
- in case of any problems
-
commit
@NotNull CommitResult commit(@NotNull CommitSettings commitSettings) throws VcsException
Creates new commit with specified user name and description message- Parameters:
commitSettings
- settings of the commit to make- Returns:
- result of commit operation
- Throws:
VcsException
- if commit failed
-
dispose
void dispose()
Always called by TeamCity after was performed, or any of the methods above throw an exception
-
-