org.jenkinsci.plugins.darcs
Class DarcsScm

java.lang.Object
  extended by hudson.scm.SCM
      extended by org.jenkinsci.plugins.darcs.DarcsScm
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>, Serializable

public class DarcsScm
extends hudson.scm.SCM
implements Serializable

Darcs is a patch based distributed version control system. Contains the job configuration options as fields.

Author:
Sven Strittmatter , Ralph Lange
See Also:
http://darcs.net/, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
DarcsScm(String source)
          Convenience constructor.
DarcsScm(String source, String localDir, boolean clean, DarcsRepositoryBrowser browser)
          Dedicated constructor.
 
Method Summary
static void addAliases()
          Add class name aliases for backward compatibility.
 hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener)
           
 boolean checkout(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.BuildListener listener, File changelogFile)
           
protected  hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, hudson.scm.SCMRevisionState baseline)
           
 hudson.scm.ChangeLogParser createChangeLogParser()
           
 DarcsRepositoryBrowser getBrowser()
           
 DarcsScmDescriptor getDescriptor()
           
 String getLocalDir()
          Get the local directory in the workspace.
 String getSource()
          Get the repositories source URL.
 boolean isClean()
          Whether to clean the workspace or not.
 boolean requiresWorkspaceForPolling()
           
 boolean supportsPolling()
           
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, buildEnvVars, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DarcsScm

public DarcsScm(String source)
         throws SAXException
Convenience constructor. Sets local directory to #DEFAULT_LOCAL_DIR, clean to false and browser to null.

Parameters:
source - repository URL from which we pull
Throws:
SAXException

DarcsScm

@DataBoundConstructor
public DarcsScm(String source,
                                     String localDir,
                                     boolean clean,
                                     DarcsRepositoryBrowser browser)
Dedicated constructor.

Parameters:
source - repository URL from which we pull
localDir - Local directory in the workspace
clean - true cleans the workspace, false not
browser - the browser used to browse the repository
Method Detail

getSource

public String getSource()
Get the repositories source URL.

Returns:
URL as string

getLocalDir

public String getLocalDir()
Get the local directory in the workspace.

Returns:
relative path as string

isClean

public boolean isClean()
Whether to clean the workspace or not.

Returns:
true if clean is performed, false else

getBrowser

public DarcsRepositoryBrowser getBrowser()
Overrides:
getBrowser in class hudson.scm.SCM

supportsPolling

public boolean supportsPolling()
Overrides:
supportsPolling in class hudson.scm.SCM

requiresWorkspaceForPolling

public boolean requiresWorkspaceForPolling()
Overrides:
requiresWorkspaceForPolling in class hudson.scm.SCM

calcRevisionsFromBuild

public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
                                                          hudson.Launcher launcher,
                                                          hudson.model.TaskListener listener)
                                                   throws IOException,
                                                          InterruptedException
Specified by:
calcRevisionsFromBuild in class hudson.scm.SCM
Throws:
IOException
InterruptedException

compareRemoteRevisionWith

protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
                                                             hudson.Launcher launcher,
                                                             hudson.FilePath workspace,
                                                             hudson.model.TaskListener listener,
                                                             hudson.scm.SCMRevisionState baseline)
                                                      throws IOException,
                                                             InterruptedException
Specified by:
compareRemoteRevisionWith in class hudson.scm.SCM
Throws:
IOException
InterruptedException

checkout

public boolean checkout(hudson.model.AbstractBuild<?,?> build,
                        hudson.Launcher launcher,
                        hudson.FilePath workspace,
                        hudson.model.BuildListener listener,
                        File changelogFile)
                 throws IOException,
                        InterruptedException
Specified by:
checkout in class hudson.scm.SCM
Throws:
IOException
InterruptedException

createChangeLogParser

public hudson.scm.ChangeLogParser createChangeLogParser()
Specified by:
createChangeLogParser in class hudson.scm.SCM

getDescriptor

public DarcsScmDescriptor getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.scm.SCM>
Overrides:
getDescriptor in class hudson.scm.SCM

addAliases

@Initializer(before=PLUGINS_STARTED)
public static void addAliases()
Add class name aliases for backward compatibility.



Copyright © 2004-2013 weltraumschaf.de. All Rights Reserved.