Package jetbrains.buildServer.vcs
Interface CommitPatchBuilder
-
public interface CommitPatchBuilderInterface 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 CommitResultcommit(CommitSettings commitSettings)Creates new commit with specified user name and description messagevoidcreateDirectory(String path)Creates an empty directory at the given relative path from a repository rootvoidcreateFile(String path, InputStream content)Adds the specified content at the given relative path from a repository rootvoiddeleteDirectory(String path)Recursively deletes a directory at the given relative path from a repository rootvoiddeleteFile(String path)Deletes a file at the given relative path from a repository rootvoiddispose()Always called by TeamCity after was performed, or any of the methods above throw an exceptionvoidrenameFile(String oldPath, String newPath, InputStream content)Moves a file at theoldPathrelative 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 VcsExceptionAdds 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 VcsExceptionCreates 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 VcsExceptionDeletes 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 VcsExceptionRecursively 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 VcsExceptionMoves a file at theoldPathrelative 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
-
-