public class MercurialBackend extends Object implements AdvancedSCMManager
| Constructor and Description |
|---|
MercurialBackend(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
hudson.plugins.mercurial.MercurialSCM scm)
Please do not instantiate objects of this class yourself, use SCMManagerFactory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clean()
Cleans workspace from artifact.
|
void |
commit(String message,
String username)
Commit the workspace changes with the given message.
|
String |
getBranch()
Get the current branch name in the workspace.
|
List<Branch> |
getBranches()
Get Mercurial branches from command line output,
and put them in a List with MercurialBranches so it's nice to work with.
|
List<String> |
getBranchNames()
Get Mercurial branches from command line output,
and put them in a List so it's nice to work with.
|
String |
merge()
Merge possible current branch's heads.
|
String |
mergeWorkspaceWith(String revision)
Merge current workspace with given revision.
|
String |
mergeWorkspaceWith(String revision,
String updateTo)
Update workspace to 'updateTo' and then merge that workspace with 'revision'.
|
String |
pull()
Executes 'hg pull'
|
String |
pull(String remote)
Executes 'hg pull
|
String |
pull(String remote,
String branch)
Executes 'hg pull
|
String |
push()
Executes 'hg push'
|
String |
push(String revision)
Deprecated.
|
String |
pushCertainBranch(String branchname) |
String |
pushWithNewBranches() |
void |
stripLocal()
Strip out local commits which are not pushed yet.
|
void |
update(String revision)
Updates workspace to given revision/branch.
|
void |
updateClean(String revision)
Updates workspace to given revision/branch with cleaning.
|
public MercurialBackend(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
hudson.plugins.mercurial.MercurialSCM scm)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic List<Branch> getBranches()
getBranches in interface AdvancedSCMManagerpublic List<String> getBranchNames()
getBranchNames in interface AdvancedSCMManagerpublic String getBranch()
getBranch in interface AdvancedSCMManagerpublic void update(String revision) throws AdvancedSCMException
update in interface AdvancedSCMManagerrevision - : String with revision, hash of branchname to update to.AdvancedSCMExceptionpublic void updateClean(String revision) throws AdvancedSCMException
updateClean in interface AdvancedSCMManagerrevision - : String with revision, hash of branchname to update to.AdvancedSCMExceptionpublic void stripLocal()
throws AdvancedSCMException
stripLocal in interface AdvancedSCMManagerAdvancedSCMExceptionpublic void clean()
throws AdvancedSCMException
clean in interface AdvancedSCMManagerAdvancedSCMExceptionpublic void commit(String message, String username) throws AdvancedSCMException
commit in interface AdvancedSCMManagermessage - : String with message to give this commit.AdvancedSCMExceptionpublic String mergeWorkspaceWith(String revision) throws AdvancedSCMException
mergeWorkspaceWith in interface AdvancedSCMManagerrevision - : String with revision, hash or branchname to merge with.AdvancedSCMExceptionpublic String merge() throws AdvancedSCMException
merge in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String mergeWorkspaceWith(String revision, String updateTo) throws AdvancedSCMException
mergeWorkspaceWith in interface AdvancedSCMManagerrevision - : String with revision, hash or branchname to merge with.updateTo - : String with revision, hash or branchname to update to before merge.AdvancedSCMExceptionpublic String push() throws AdvancedSCMException
push in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String pull() throws AdvancedSCMException
pull in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String pull(String remote) throws AdvancedSCMException
pull in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String pull(String remote, String branch) throws AdvancedSCMException
pull in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String pushWithNewBranches() throws AdvancedSCMException
pushWithNewBranches in interface AdvancedSCMManagerAdvancedSCMExceptionpublic String pushCertainBranch(String branchname) throws AdvancedSCMException
pushCertainBranch in interface AdvancedSCMManagerAdvancedSCMException@Deprecated public String push(String revision) throws AdvancedSCMException
AdvancedSCMExceptionCopyright © 2004-2014. All Rights Reserved.