diff --git a/docs/manual/OptionalTasks/starteam.html b/docs/manual/OptionalTasks/starteam.html index 46244b73b..0e17deaf7 100644 --- a/docs/manual/OptionalTasks/starteam.html +++ b/docs/manual/OptionalTasks/starteam.html @@ -145,7 +145,7 @@ See also the required common StarTeam parameters. label - Check out files as of this label. The label must exist in starteam or an exception will be thrown. If not specified, the most recent version of each file will be checked out. + Check out files as of this label. The label must exist in starteam or an exception will be thrown. If either locked or unlocked is true, an exception will be thrown. If not specified, the most recent version of each file will be checked out. no @@ -163,7 +163,7 @@ that StarTeam is maintaining for the file. If false, status will be used to de locked If true, file will be locked against changes by other users. If false (default) has no effect. - Either or neither, but not both, may be true. + Either or neither, but not both, may be true. Neither may be true if a label is specified. unlocked diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java index e07f29a15..ea38ea0ad 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java @@ -261,6 +261,11 @@ public class StarTeamCheckout extends TreeBasedTask { Project.MSG_WARN); this.createDirs = false; } + if (lockStatus != Item.LockType.UNCHANGED && null != getLabel()) { + log("Neither locked nor unlocked may be true when checking out a labeled version.", + Project.MSG_ERR); + throw new BuildException("Lock status may not be changed when checking out a non-current version."); + } } /**