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 message, String username)
          Close given branch
 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(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.
 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 '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)
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

getBranchNames

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.

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

getBranch

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

Returns:
String with branch name in it.

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

commit

void commit(String message,
            String username)
            throws AdvancedSCMException
Commit the workspace changes with the given message.

Parameters:
message - : String with message to give this commit.
Throws:
AdvancedSCMException

mergeWorkspaceWith

String mergeWorkspaceWith(String revision)
                          throws AdvancedSCMException
Merge current workspace with given revision. Do not forget to commit merge afterwards manually.

Parameters:
revision - : String with revision, hash or branchname to merge with.
Returns:
String : Output of merge command (should be empty if all went well)
Throws:
AdvancedSCMException

merge

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

Returns:
String : Output of merge command (should be empty if all went well)
Throws:
AdvancedSCMException

closeBranch

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

Throws:
AdvancedSCMException

mergeWorkspaceWith

String mergeWorkspaceWith(String revision,
                          String updateTo)
                          throws AdvancedSCMException
Update workspace to 'updateTo' and then merge that workspace with 'revision'. Do not forget to commit merge afterwards manually.

Parameters:
revision - : String with revision, hash or branchname to merge with.
updateTo - : String with revision, hash or branchname to update to before merge.
Returns:
String : output of command run.
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


Copyright © 2004-2014. All Rights Reserved.