nl.toolforge.karma.core.vc
Interface Runner

All Known Implementing Classes:
CVSRunner, SubversionRunner

public interface Runner

Runner classes are adapters to native commands on a version control system.

Version:
$Id: Runner.java,v 1.41 2004/11/10 23:53:09 asmedes Exp $
Author:
D.A. Smedes

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.
 

Method Detail

setCommandResponse

public void setCommandResponse(CommandResponse response)

commit

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

Throws:
VersionControlException - Exceptions related to version control operations.

add

public void add(Module module,
                java.io.File[] files,
                java.io.File[] dirs)
         throws VersionControlException
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.

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
See add(Module, File[], File[]). This method converts the String items to File items.

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
Checks out a module from a version control system.

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
Checks out a module from a version control system with the specified version. The module is checked out relative to Manifest.getModuleBaseDirectory().

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
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().

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
Updates an already checked out module.

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
Updates an already checked out module to a specified version.

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
Parameters:
module -
comment - Comment of the developer
version -
Throws:
VersionControlException

existsInRepository

public boolean existsInRepository(Module module)
Checks if a module exists in the repository. The module should contain the module.info file.

Parameters:
module -
Returns:
true if the module exists, false otherwise.

hasPatchLine

public boolean hasPatchLine(Module module)
Checks if the module has a PatchLine in the version control system.

Parameters:
module -
Returns:

createPatchLine

public void createPatchLine(Module module)
                     throws VersionControlException
Creates a PatchLine for the module.

Throws:
VersionControlException

addModule

public void addModule(Module module,
                      java.lang.String comment)
               throws VersionControlException
Throws:
VersionControlException

update

public void update(Module module,
                   DevelopmentLine developmentLine,
                   Version version)
            throws CVSException
Throws:
CVSException


Copyright © 2002-2004 Toolforge. All Rights Reserved.