org.paylogic.jenkins.advancedscm
Interface AdvancedSCMManager

All Known Implementing Classes:
GitBackend, MercurialBackend

public interface AdvancedSCMManager


Method Summary
 void clean()
          Cleans workspace from artifacts.
 void closeBranch(String branch, String message, String username)
          Close given branch
 String getBranch()
          Get the current branch name in the workspace.
 List<Branch> getBranches(boolean all)
          Get Mercurial branches from command line output, and put them in a List with Branches so it's nice to work with.
 List<String> getBranchNames(boolean all)
          Get open Mercurial branches from command line output, and put them in a List so it's nice to work with.
 ReleaseBranch getReleaseBranch(String branch)
          Get release branch from given branch name.
 String merge(String message, String username)
          Merge possible current branch's heads.
 String mergeWorkspaceWith(String revision, String updateTo, String message, String username)
          Merge current workspace with given revision.
 String pull()
          Executes 'pull' command
 String pull(String remote)
          Pulls changes from remotes.
 String pull(String remote, String branch)
          Pulls from given repository url.
 String push(String... branchNames)
          Executes 'push' command with -b
 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.
 

Method Detail

getBranches

List<Branch> getBranches(boolean all)
                         throws AdvancedSCMException
Get Mercurial branches from command line output, and put them in a List with Branches so it's nice to work with.

Parameters:
all - : get all or only open branches
Returns:
List of Branches
Throws:
AdvancedSCMException

getBranchNames

List<String> getBranchNames(boolean all)
                            throws AdvancedSCMException
Get open Mercurial branches from command line output, and put them in a List so it's nice to work with.

Parameters:
all - : get all or only open branches
Returns:
List of String
Throws:
AdvancedSCMException

getBranch

String getBranch()
                 throws AdvancedSCMException
Get the current branch name in the workspace.

Returns:
String with branch name in it.
Throws:
AdvancedSCMException

update

void update(String revision)
            throws AdvancedSCMException
Updates workspace to given revision/branch.

Parameters:
revision - : String with revision, hash of branchname to update to.
Throws:
AdvancedSCMException

updateClean

void updateClean(String revision)
                 throws AdvancedSCMException
Updates workspace to given revision/branch with cleaning.

Parameters:
revision - : String with revision, hash of branchname to update to.
Throws:
AdvancedSCMException

stripLocal

void stripLocal()
                throws AdvancedSCMException
Strip out local commits which are not pushed yet.

Throws:
AdvancedSCMException

clean

void clean()
           throws AdvancedSCMException
Cleans workspace from artifacts.

Throws:
AdvancedSCMException

mergeWorkspaceWith

String mergeWorkspaceWith(String revision,
                          String updateTo,
                          String message,
                          String username)
                          throws AdvancedSCMException
Merge current workspace with given revision.

Parameters:
revision - : String with revision, hash or branchname to merge with.
revision - : String with revision, hash or branchname to merge with.
updateTo - : String with revision, hash or branchname to update working copy to before actual merge.
message - : String commit message
username - : String commit user name (with email)
Returns:
String : Output of merge command (should be empty if all went well)
Throws:
AdvancedSCMException

merge

String merge(String message,
             String username)
             throws AdvancedSCMException
Merge possible current branch's heads.

Parameters:
message - : String commit message
username - : String commit user name (with email)
Returns:
String : Output of merge command (should be empty if all went well)
Throws:
AdvancedSCMException

closeBranch

void closeBranch(String branch,
                 String message,
                 String username)
                 throws AdvancedSCMException
Close given branch

Parameters:
branch: - String branch name.
message - : String with message to give this commit.
username - : String commit user name (with email)
Throws:
AdvancedSCMException

push

String push(String... branchNames)
            throws AdvancedSCMException
Executes 'push' command with -b

Throws:
AdvancedSCMException

pull

String pull()
            throws AdvancedSCMException
Executes 'pull' command

Throws:
AdvancedSCMException

pull

String pull(String remote)
            throws AdvancedSCMException
Pulls changes from remotes. Give it a remote to pull changes from there.

Throws:
AdvancedSCMException

pull

String pull(String remote,
            String branch)
            throws AdvancedSCMException
Pulls from given repository url. Give it a remote to pull changes from there.

Throws:
AdvancedSCMException

getReleaseBranch

ReleaseBranch getReleaseBranch(String branch)
                               throws ReleaseBranchInvalidException
Get release branch from given branch name.

Parameters:
branch - : String branch name
Returns:
ReleaseBranch : release branch object
Throws:
ReleaseBranchInvalidException


Copyright © 2004-2014. All Rights Reserved.