|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.scm.SCM
hudson.plugins.mercurial.MercurialSCM
public class MercurialSCM
Mercurial SCM.
| Nested Class Summary | |
|---|---|
static class |
MercurialSCM.DescriptorImpl
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
private Set<String> |
_modules
Prefixes of files within the repository which we're dependent on. |
private String |
branch
In-repository branch to follow. |
private HgBrowser |
browser
|
(package private) static boolean |
CACHE_LOCAL_REPOS
|
private boolean |
clean
|
private static Pattern |
FILES_LINE
|
private static String |
FILES_STYLE
|
private boolean |
forest
|
private String |
installation
Name of selected installation, if any. |
private static Logger |
LOGGER
|
private String |
modules
|
private static long |
serialVersionUID
|
private String |
source
Source repository URL from which we pull. |
private String |
subdir
Slash-separated subdirectory of the workspace in which the repository will be kept; null for top level. |
| Fields inherited from class hudson.scm.SCM |
|---|
PERMISSIONS, TAG |
| Constructor Summary | |
|---|---|
MercurialSCM(String installation,
String source,
String branch,
String modules,
String subdir,
HgBrowser browser,
boolean clean,
boolean forest)
|
|
| Method Summary | |
|---|---|
void |
buildEnvVars(AbstractBuild<?,?> build,
Map<String,String> env)
|
private String |
cachedSource(Node node,
Launcher launcher,
TaskListener listener,
boolean fromPolling)
|
SCMRevisionState |
calcRevisionsFromBuild(AbstractBuild<?,?> build,
Launcher launcher,
TaskListener listener)
|
boolean |
checkout(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener,
File changelogFile)
|
private boolean |
clone(AbstractBuild<?,?> build,
Launcher launcher,
FilePath repository,
BuildListener listener,
File changelogFile)
Start from scratch and clone the whole repository. |
protected PollingResult |
compareRemoteRevisionWith(AbstractProject<?,?> project,
Launcher launcher,
FilePath workspace,
TaskListener listener,
SCMRevisionState _baseline)
|
private PollingResult.Change |
computeDegreeOfChanges(Set<String> changedFileNames,
PrintStream output)
|
ChangeLogParser |
createChangeLogParser()
|
private Set<String> |
dependentChanges(Set<String> changedFileNames)
Filter out the given file name list by picking up changes that are in the modules we care about. |
private ArgumentListBuilder |
findHgExe(AbstractBuild<?,?> build,
TaskListener listener,
boolean allowDebug)
|
(package private) ArgumentListBuilder |
findHgExe(Node node,
TaskListener listener,
boolean allowDebug)
|
String |
getBranch()
In-repository branch to follow. |
private String |
getBranch(EnvVars env)
|
HgBrowser |
getBrowser()
|
MercurialSCM.DescriptorImpl |
getDescriptor()
|
String |
getInstallation()
|
String |
getModules()
|
String |
getSource()
Gets the source repository path. |
String |
getSubdir()
|
boolean |
isClean()
True if we want clean check out each time. |
boolean |
isForest()
True if we want consider repository a forest |
(package private) static int |
joinWithPossibleTimeout(Launcher.ProcStarter proc,
boolean useTimeout,
TaskListener listener)
|
(package private) static Launcher.ProcStarter |
launch(Launcher launcher)
|
private MercurialTagAction |
parseIncomingOutput(ByteArrayOutputStream output,
MercurialTagAction baseline,
Set<String> result)
|
private void |
parseModules()
|
private Object |
readResolve()
|
private boolean |
update(AbstractBuild<?,?> build,
Launcher launcher,
FilePath repository,
BuildListener listener,
File changelogFile)
Updates the current repository. |
private FilePath |
workspace2Repo(FilePath workspace)
|
| Methods inherited from class hudson.scm.SCM |
|---|
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoots, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final String installation
private final String source
private transient Set<String> _modules
private final String modules
private final String branch
private final String subdir
private final boolean clean
private final boolean forest
private HgBrowser browser
private static final String FILES_STYLE
private static Pattern FILES_LINE
static boolean CACHE_LOCAL_REPOS
private static final long serialVersionUID
private static final Logger LOGGER
| Constructor Detail |
|---|
@DataBoundConstructor
public MercurialSCM(String installation,
String source,
String branch,
String modules,
String subdir,
HgBrowser browser,
boolean clean,
boolean forest)
| Method Detail |
|---|
private void parseModules()
private Object readResolve()
public String getInstallation()
public String getSource()
public String getBranch()
private String getBranch(EnvVars env)
public String getSubdir()
private FilePath workspace2Repo(FilePath workspace)
public HgBrowser getBrowser()
getBrowser in class SCMpublic boolean isClean()
public boolean isForest()
private ArgumentListBuilder findHgExe(AbstractBuild<?,?> build,
TaskListener listener,
boolean allowDebug)
throws IOException,
InterruptedException
IOException
InterruptedException
ArgumentListBuilder findHgExe(Node node,
TaskListener listener,
boolean allowDebug)
throws IOException,
InterruptedException
allowDebug - If the caller intends to parse the stdout from Mercurial, pass in false to indicate
that the optional --debug option shall never be activated.
IOException
InterruptedExceptionstatic Launcher.ProcStarter launch(Launcher launcher)
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build,
Launcher launcher,
TaskListener listener)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class SCMIOException
InterruptedException
protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project,
Launcher launcher,
FilePath workspace,
TaskListener listener,
SCMRevisionState _baseline)
throws IOException,
InterruptedException
compareRemoteRevisionWith in class SCMIOException
InterruptedException
static int joinWithPossibleTimeout(Launcher.ProcStarter proc,
boolean useTimeout,
TaskListener listener)
throws IOException,
InterruptedException
IOException
InterruptedException
private PollingResult.Change computeDegreeOfChanges(Set<String> changedFileNames,
PrintStream output)
private Set<String> dependentChanges(Set<String> changedFileNames)
private MercurialTagAction parseIncomingOutput(ByteArrayOutputStream output,
MercurialTagAction baseline,
Set<String> result)
throws IOException
IOException
public boolean checkout(AbstractBuild<?,?> build,
Launcher launcher,
FilePath workspace,
BuildListener listener,
File changelogFile)
throws IOException,
InterruptedException
checkout in class SCMIOException
InterruptedException
private boolean update(AbstractBuild<?,?> build,
Launcher launcher,
FilePath repository,
BuildListener listener,
File changelogFile)
throws InterruptedException,
IOException
InterruptedException
IOException
private boolean clone(AbstractBuild<?,?> build,
Launcher launcher,
FilePath repository,
BuildListener listener,
File changelogFile)
throws InterruptedException,
IOException
InterruptedException
IOException
public void buildEnvVars(AbstractBuild<?,?> build,
Map<String,String> env)
buildEnvVars in class SCMpublic ChangeLogParser createChangeLogParser()
createChangeLogParser in class SCMpublic MercurialSCM.DescriptorImpl getDescriptor()
getDescriptor in interface Describable<SCM>getDescriptor in class SCMpublic String getModules()
@CheckForNull
private String cachedSource(Node node,
Launcher launcher,
TaskListener listener,
boolean fromPolling)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||