|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plugins.hg.HgRepositoryAccessImpl
@NotThreadSafe public class HgRepositoryAccessImpl
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SSH_COMMAND
|
Constructor Summary | |
---|---|
HgRepositoryAccessImpl(com.opensymphony.xwork.TextProvider textProvider,
BuildLogger buildLogger,
HgRepository repository)
|
Method Summary | |
---|---|
void |
archiveSourceCode(java.io.File destinationDirectory,
java.io.File cacheDirectory,
java.lang.String vcsRevision,
java.lang.String[] includePattern)
"Archive" (as in svn export) contents of specified revision, applying specified --include pattern |
void |
close()
Cleans up resources, connections, etc... |
BuildRepositoryChanges |
collectChangesSinceLastBuild(java.io.File cacheDirectory,
java.lang.String lastVcsRevisionKey)
Checks whether remote repository has newer revision(s). |
java.lang.String |
retrieveSourceCode(java.io.File sourceDirectory,
java.io.File cacheDirectory,
java.lang.String vcsRevision)
Updates sources in sourceDirectory from remote repository to targetRevision. |
java.lang.String |
retrieveSourceCode(java.io.File sourceDirectory,
java.lang.String vcsRevision)
Updates sources in sourceDirectory from remote repository to targetRevision. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SSH_COMMAND
Constructor Detail |
---|
public HgRepositoryAccessImpl(com.opensymphony.xwork.TextProvider textProvider, BuildLogger buildLogger, HgRepository repository) throws RepositoryException
RepositoryException
Method Detail |
---|
public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull java.io.File cacheDirectory, @Nullable java.lang.String lastVcsRevisionKey) throws RepositoryException
HgRepositoryAccess
collectChangesSinceLastBuild
in interface HgRepositoryAccess
cacheDirectory
- specifies where to store updated repository. Perfectly it should be the 'cache' directory
holding shared repository for all plans using the same repository URLlastVcsRevisionKey
- specifies since which revision we want to collect changesets
RepositoryException
public java.lang.String retrieveSourceCode(@NotNull java.io.File sourceDirectory, @Nullable java.lang.String vcsRevision) throws RepositoryException
HgRepositoryAccess
retrieveSourceCode
in interface HgRepositoryAccess
sourceDirectory
- specifies where we want to retrieve sourcesvcsRevision
- specifies since which revision we want to collect changesets
RepositoryException
public java.lang.String retrieveSourceCode(@NotNull java.io.File sourceDirectory, @NotNull java.io.File cacheDirectory, @Nullable java.lang.String vcsRevision) throws RepositoryException
HgRepositoryAccess
retrieveSourceCode
in interface HgRepositoryAccess
sourceDirectory
- specifies where we want to retrieve sourcescacheDirectory
- specifies where is kept local cache directory, which will hold presumably a more updated repository than sourceDirectory.vcsRevision
- specifies since which revision we want to collect changesets
RepositoryException
public void archiveSourceCode(@NotNull java.io.File destinationDirectory, @NotNull java.io.File cacheDirectory, @Nullable java.lang.String vcsRevision, @Nullable java.lang.String[] includePattern) throws RepositoryException
HgRepositoryAccess
Differs from {link #retrieveSourceCode} by not cloning the repository first (think "svn checkout" vs. "svn export")
archiveSourceCode
in interface HgRepositoryAccess
destinationDirectory
- directory to extract files tocacheDirectory
- local repository to extract fromvcsRevision
- revision to extract, tip if nullincludePattern
- include patterns to limit extracted files, all files if null or empty
RepositoryException
- on any errorpublic void close()
HgRepositoryAccess
close
in interface HgRepositoryAccess
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |