org.jvnet.hudson.test
Class SingleFileSCM

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

public class SingleFileSCM
extends 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
NullSCM.DescriptorImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
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
 boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changeLogFile)
           
 
Methods inherited from class hudson.scm.NullSCM
calcRevisionsFromBuild, compareRemoteRevisionWith, createChangeLogParser
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, buildEnvVars, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, 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
 

Constructor Detail

SingleFileSCM

public SingleFileSCM(String path,
                     byte[] contents)

SingleFileSCM

public SingleFileSCM(String path,
                     String contents)
              throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

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 Detail

checkout

public boolean checkout(AbstractBuild build,
                        Launcher launcher,
                        FilePath workspace,
                        BuildListener listener,
                        File changeLogFile)
                 throws IOException,
                        InterruptedException
Overrides:
checkout in class NullSCM
Throws:
IOException
InterruptedException


Copyright © 2010. All Rights Reserved.