next up previous contents index
Next: STLabel Up: Starteam Tasks Previous: STCheckout   Contents   Index

STCheckin

Description

Checks files into a StarTeam project. Optionally adds files and in the local tree that are not managed by the repository to its control.

The includes and excludes attributes function differently from other tasks in Ant. Inclusion/exclusion by folder is NOT supported.

Parameters

See also the required common StarTeam parameters.

Attribute Description Required
rootstarteamfolder The root of the subtree in the StarTeam repository into which to files will be checked. Defaults to the root folder of the view ('/'). no
rootlocalfolder The local folder which will be the root of the tree to which files are checked out. If this is not supplied, then the StarTeam "default folder" associated with rootstarteamfolder is used. no
comment Checkin comment to be saved with the file. no
adduncontrolled if true, any files or folders NOT in StarTeam will be added to the repository. Defaults to "false". no
includes Only check in files that match at least one of the patterns in this list. Patterns must be separated by commas. Patterns in excludes take precedence over patterns in includes. no
excludes Do not check in files that match at least one of the patterns in this list. Patterns must be separated by commas. Patterns in excludes take precedence over patterns in includes. no
recursive Indicates if subfolders should be searched for files to check in. Defaults to "false". no
forced If true, checkins will occur regardless of the status that StarTeam is maintaining for the file. If rootlocalfolder is set then this should be set "true" as otherwise the checkin will be based on statuses which do not relate to the target folder. Defaults to "false". no
unlocked If true, file will be unlocked so that other users may change it. If false (default) lock status will not change. no

Examples

  <stcheckin servername="STARTEAM" 
             serverport="49201"
             projectname="AProject" 
             viewname="AView"
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             forced="true"
  />
The minimum necessary to check files into a StarTeam server. This will check all files on the local tree rooted at C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$co into the AView view of the AProject project in the repository. For files and folders in the local tree but not in starteam, nothing will be done. Since the forced attribute is set, the files which are checked in will be checked in without regard to what the StarTeam repository considers their status to be. This is a reasonable choice of attributes since StarTeam's status for a file is calculated based on the local file in the StarTeam default directory, not on the directory we are actually working with.
  <stcheckin URL="STARTEAM:49201/Aproject/AView" 
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             forced="true"
  />
And this is a simpler way of giving the same commands as the command above using the URL shortcut.
  <stcheckin URL="STARTEAM:49201/Aproject/AView" 
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             rootstarteamfolder="\Dev"
             excludes="*.bak *.old"
             forced="true"
  />
This will check all files in to the Dev folder and below that do not end in .bak or .old from the tree rooted at"C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$co" .
  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             includes="*.htm,*.html"
             excludes="index.*"
             forced="true"
  />
This is an example of overlapping includes and excludes attributes. Because excludes takes precedence over includes, files named index.html will not be checked in by this command.
  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             rootstarteamfolder="src/java"
             includes="*.htm,*.html"
             excludes="index.*"
             forced="true"
             recursive="false"
  />
This example is like the previous one, but will only check in files from C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$, because of the turning off of the recursive attribute.
  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             rootstarteamfolder="src/java"
             includes="version.txt"
             forced="true"
             recursive="false"
  />
This example is like the previous one, but will only check only in one file, C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$
version.txt to the StarTeam folder src/java.
  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootlocalfolder="C:\dev\buildtest\co"
             rootstarteamfolder="src/java"
             includes="version.java"
             forced="true"
             recursive="false"
             addUncontrolled="true"
             comment="Fix Bug #667"
  />
This example is like the previous one, but will only check only in one file, C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$
version.java to the StarTeam folder src/java. Because the addUncontrolled attribute has been set, if StarTeam does not already control this file in this location, it will be added to the repository. Also, it will write a comment to the repository for this version of the file.
  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootstarteamfolder="src/java"
             rootlocalfolder="C:\dev\buildtest\co"
             forced="true"
  />



  <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootstarteamfolder="src/java"
  />



 <stcheckin URL="STARTEAM:49201/Aproject/AView"
             username="auser"
             password="secret"
             rootstarteamfolder="src/java"
             rootlocalfolder="C:\dev\buildtest\co\src\java"
             forced="true"
  />
In the preceding three examples, assuming that the AProject project has a default folder of C: ${\backslash}{\backslash}$work ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$
AProject, the first example will check in files from a tree rooted at C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$, the second from a tree rooted at C: ${\backslash}{\backslash}$work ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$
AProject
src
java, and the third from a tree rooted at C: ${\backslash}{\backslash}$dev ${\backslash}{\backslash}$buildtest ${\backslash}{\backslash}$
src
java all to a tree rooted at src/java


next up previous contents index
Next: STLabel Up: Starteam Tasks Previous: STCheckout   Contents   Index
Andrew Marlow 2003-07-08