nl.toolforge.karma.core.vc.svnimpl
Class SubversionRunner

java.lang.Object
  extended bynl.toolforge.karma.core.vc.svnimpl.SubversionRunner
All Implemented Interfaces:
Runner

public final class SubversionRunner
extends java.lang.Object
implements Runner

// TODO Lots of todo's, subversion implementation

Version:
$Id:
Author:
D.A. Smedes

Constructor Summary
SubversionRunner(Location location)
           
 
Method Summary
 void add(Module module, java.io.File[] files, java.io.File[] dirs)
          Adds a set of files and/or a set of directories (recursively) to the version control system.
 void add(Module module, java.lang.String[] files, java.lang.String[] dirs)
          See add(Module, File[], File[]).
 void addModule(Module module, java.lang.String comment)
           
 void checkout(Module module)
          Checks out a module from a version control system.
 void checkout(Module module, DevelopmentLine developmentLine, Version version)
          Checks out a module from a version control system with the specified version and from a development line.
 void checkout(Module module, Version version)
          Checks out a module from a version control system with the specified version.
 void commit(java.io.File file)
          Commits file in the version control system.
 void createPatchLine(Module module)
          Creates a PatchLine for the module.
 boolean existsInRepository(Module module)
          Checks if a module exists in the repository.
 boolean hasPatchLine(Module module)
          Checks if the module has a PatchLine in the version control system.
 void promote(Module module, java.lang.String comment, Version version)
           
 void setCommandResponse(CommandResponse response)
           
 void update(Module module)
          Updates an already checked out module.
 void update(Module module, DevelopmentLine developmentLine, Version version)
           
 void update(Module module, Version version)
          Updates an already checked out module to a specified version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubversionRunner

public SubversionRunner(Location location)
                 throws CVSException
Method Detail

update

public void update(Module module,
                   DevelopmentLine developmentLine,
                   Version version)
            throws CVSException
Specified by:
update in interface Runner
Throws:
CVSException

commit

public void commit(java.io.File file)
            throws VersionControlException
Description copied from interface: Runner
Commits file in the version control system. If file is not yet under version control it will be added.

Specified by:
commit in interface Runner
Throws:
VersionControlException - Exceptions related to version control operations.

addModule

public void addModule(Module module,
                      java.lang.String comment)
               throws CVSException
Specified by:
addModule in interface Runner
Throws:
CVSException

setCommandResponse

public void setCommandResponse(CommandResponse response)
Specified by:
setCommandResponse in interface Runner

add

public void add(Module module,
                java.io.File[] files,
                java.io.File[] dirs)
         throws VersionControlException
Description copied from interface: Runner
Adds a set of files and/or a set of directories (recursively) to the version control system. Files and directories will be created when they don't exist.

Specified by:
add in interface Runner
Parameters:
module - The module to which the files apply.
files - The filenames that should be added to the version control system repository.
dirs - The directory-paths that should be added to the version control system repository.
Throws:
VersionControlException - Exceptions related to version control operations.

add

public void add(Module module,
                java.lang.String[] files,
                java.lang.String[] dirs)
         throws VersionControlException
Description copied from interface: Runner
See Runner.add(Module, File[], File[]). This method converts the String items to File items.

Specified by:
add in interface Runner
Parameters:
module - The context module to which the files should be added.
files - Files to be added (each String will be added relative to the module base directory).
dirs - Directories to be added (each String will be added relative to the module base directory).
Throws:
VersionControlException - Exceptions related to version control operations.

checkout

public void checkout(Module module)
              throws VersionControlException
Description copied from interface: Runner
Checks out a module from a version control system.

Specified by:
checkout in interface Runner
Parameters:
module - The module that should be checked out of the version control repository.
Throws:
VersionControlException - Exceptions related to version control operations.

checkout

public void checkout(Module module,
                     Version version)
              throws VersionControlException
Description copied from interface: Runner
Checks out a module from a version control system with the specified version. The module is checked out relative to Manifest.getModuleBaseDirectory().

Specified by:
checkout in interface Runner
Parameters:
module - The module that should be checked out from the version control system.
version - The version of the module that should be checked out.
Throws:
VersionControlException - Exceptions related to version control operations.

checkout

public void checkout(Module module,
                     DevelopmentLine developmentLine,
                     Version version)
              throws VersionControlException
Description copied from interface: Runner
Checks out a module from a version control system with the specified version and from a development line. The module is checked out relative to Manifest.getModuleBaseDirectory().

Specified by:
checkout in interface Runner
Parameters:
module - The module that should be checked out from the version control system.
developmentLine - The development line for the module.
version - The version of the module that should be checked out.
Throws:
VersionControlException - Exceptions related to version control operations.

update

public void update(Module module)
            throws VersionControlException
Description copied from interface: Runner
Updates an already checked out module.

Specified by:
update in interface Runner
Parameters:
module - The module that should be updated.
Throws:
VersionControlException - Exceptions related to version control operations.

update

public void update(Module module,
                   Version version)
            throws VersionControlException
Description copied from interface: Runner
Updates an already checked out module to a specified version.

Specified by:
update in interface Runner
Parameters:
module - The module that should be updated.
version - The version to which the the module should be updated,
Throws:
VersionControlException - Exceptions related to version control operations.

promote

public void promote(Module module,
                    java.lang.String comment,
                    Version version)
             throws VersionControlException
Specified by:
promote in interface Runner
Parameters:
module -
comment - Comment of the developer
version -
Throws:
VersionControlException

existsInRepository

public boolean existsInRepository(Module module)
Description copied from interface: Runner
Checks if a module exists in the repository. The module should contain the module.info file.

Specified by:
existsInRepository in interface Runner
Parameters:
module -
Returns:
true if the module exists, false otherwise.

hasPatchLine

public boolean hasPatchLine(Module module)
Description copied from interface: Runner
Checks if the module has a PatchLine in the version control system.

Specified by:
hasPatchLine in interface Runner
Parameters:
module -
Returns:

createPatchLine

public void createPatchLine(Module module)
                     throws VersionControlException
Description copied from interface: Runner
Creates a PatchLine for the module.

Specified by:
createPatchLine in interface Runner
Throws:
VersionControlException


Copyright © 2002-2004 Toolforge. All Rights Reserved.