Class SingleFileSCM

java.lang.Object
hudson.scm.SCM
hudson.scm.NullSCM
org.jvnet.hudson.test.SingleFileSCM
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>

public class SingleFileSCM extends hudson.scm.NullSCM
SCM useful for testing that puts just one file in the workspace.
Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested classes/interfaces inherited from class hudson.scm.NullSCM

    hudson.scm.NullSCM.DescriptorImpl

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Field Summary

    Fields inherited from class hudson.scm.SCM

    PERMISSIONS, TAG
  • Constructor Summary

    Constructors
    Constructor
    Description
    SingleFileSCM(String path, byte[] contents)
     
    SingleFileSCM(String path, String contents)
     
    SingleFileSCM(String path, URL resource)
    When a check out is requested, serve the contents of the URL and place it with the given path name.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkout(hudson.model.Run<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, File changelogFile, hudson.scm.SCMRevisionState baseline)
     
    protected Object
    Don't write 'this', so that subtypes can be implemented as anonymous class.

    Methods inherited from class hudson.scm.NullSCM

    calcRevisionsFromBuild, compareRemoteRevisionWith, createChangeLogParser

    Methods inherited from class hudson.scm.SCM

    _calcRevisionsFromBuild, _for, _for, all, buildEnvironment, buildEnvVars, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SingleFileSCM

      public SingleFileSCM(String path, byte[] contents)
    • SingleFileSCM

      public SingleFileSCM(String path, String contents)
    • SingleFileSCM

      public SingleFileSCM(String path, URL resource) throws IOException
      When a check out is requested, serve the contents of the URL and place it with the given path name.
      Throws:
      IOException
  • Method Details

    • checkout

      public void checkout(hudson.model.Run<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, File changelogFile, hudson.scm.SCMRevisionState baseline) throws IOException, InterruptedException
      Overrides:
      checkout in class hudson.scm.NullSCM
      Throws:
      IOException
      InterruptedException
    • writeReplace

      protected Object writeReplace()
      Don't write 'this', so that subtypes can be implemented as anonymous class.