|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.scm.SCM
org.jenkinsci.plugins.darcs.DarcsScm
public class DarcsScm
Darcs is a patch based distributed version control system. Contains the job configuration options as fields.
http://darcs.net/
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
private DarcsRepositoryBrowser |
browser
Used repository browser. |
private boolean |
clean
Whether to wipe the checked out repository. |
private String |
localDir
Local directory with repository. |
private static Logger |
LOGGER
Logging facility. |
private static long |
serialVersionUID
Serial version UID. |
private String |
source
Source repository URL from which we pull. |
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. |
SCMRevisionState |
calcRevisionsFromBuild(AbstractBuild<?,?> build,
Launcher launcher,
TaskListener listener)
|
boolean |
checkout(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener,
File changelogFile)
|
protected PollingResult |
compareRemoteRevisionWith(AbstractProject<?,?> project,
Launcher launcher,
FilePath workspace,
TaskListener listener,
SCMRevisionState baseline)
|
private int |
countPatches(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener)
Counts the patches in a repository. |
private void |
createChangeLog(Launcher launcher,
int numPatches,
FilePath workspace,
File changeLog,
BuildListener listener)
Writes the change log of the last numPatches to the changeLog file. |
ChangeLogParser |
createChangeLogParser()
|
private FilePath |
createLocalPath(FilePath base)
Creates a local path relative to the given base. |
DarcsRepositoryBrowser |
getBrowser()
|
DarcsScmDescriptor |
getDescriptor()
|
String |
getLocalDir()
Get the local directory in the workspace. |
private boolean |
getRepo(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener,
File changeLog)
Gets a fresh copy of a remote repository. |
(package private) DarcsRevisionState |
getRevisionState(Launcher launcher,
TaskListener listener,
String repo,
FilePath workspace)
Calculates the revision state of a repository (local or remote). |
String |
getSource()
Get the repositories source URL. |
boolean |
isClean()
Whether to clean the workspace or not. |
private boolean |
pullRepo(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener,
File changelogFile)
Pulls all patches from a remote repository in the workspace repository. |
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 |
Field Detail |
---|
private static final long serialVersionUID
private static final Logger LOGGER
private final String source
private final String localDir
private final boolean clean
private final DarcsRepositoryBrowser browser
Constructor Detail |
---|
public DarcsScm(String source) throws SAXException
#DEFAULT_LOCAL_DIR
, clean to false
and browser to null
.
source
- repository URL from which we pull
SAXException
@DataBoundConstructor public DarcsScm(String source, String localDir, boolean clean, DarcsRepositoryBrowser browser)
source
- repository URL from which we pulllocalDir
- Local directory in the workspaceclean
- true
cleans the workspace, false
notbrowser
- the browser used to browse the repositoryMethod Detail |
---|
public String getSource()
public String getLocalDir()
public boolean isClean()
true
if clean is performed, false
elsepublic DarcsRepositoryBrowser getBrowser()
getBrowser
in class SCM
public boolean supportsPolling()
supportsPolling
in class SCM
public boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling
in class SCM
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException
calcRevisionsFromBuild
in class SCM
IOException
InterruptedException
protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException
compareRemoteRevisionWith
in class SCM
IOException
InterruptedException
DarcsRevisionState getRevisionState(Launcher launcher, TaskListener listener, String repo, FilePath workspace) throws InterruptedException
launcher
- listener
- repo
-
InterruptedException
private void createChangeLog(Launcher launcher, int numPatches, FilePath workspace, File changeLog, BuildListener listener) throws InterruptedException
launcher
- numPatches
- workspace
- changeLog
-
InterruptedException
public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException
checkout
in class SCM
IOException
InterruptedException
private int countPatches(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener)
build
- launcher
- workspace
- listener
-
InterruptedException
IOException
private boolean pullRepo(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws InterruptedException, IOException
build
- launcher
- workspace
- listener
- changelogFile
-
InterruptedException
IOException
private boolean getRepo(AbstractBuild<?,?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changeLog) throws InterruptedException
build
- launcher
- workspace
- listener
- changelogFile
-
InterruptedException
public ChangeLogParser createChangeLogParser()
createChangeLogParser
in class SCM
public DarcsScmDescriptor getDescriptor()
getDescriptor
in interface Describable<SCM>
getDescriptor
in class SCM
private FilePath createLocalPath(FilePath base)
localDir
is not null
and not empty a relative path to the given base is created, else the
base pat itself is returned. *
base
- base of the local path
@Initializer(before=PLUGINS_STARTED) public static void addAliases()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |