Browse Source

label and lock/unlock cannot be used at the same time in <stcheckout>.

PR: 22829
Submitted by:	Steve Cohen <scohen at apache dot org>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275157 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
26eb04c78c
2 changed files with 7 additions and 2 deletions
  1. +2
    -2
      docs/manual/OptionalTasks/starteam.html
  2. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java

+ 2
- 2
docs/manual/OptionalTasks/starteam.html View File

@@ -145,7 +145,7 @@ See also <A href="#common-params">the required common StarTeam parameters</A>.<b
</tr>
<tr>
<td valign="top">label</td>
<td valign="top">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.</td>
<td valign="top">Check out files as of this label. The label must exist in starteam or an exception will be thrown. If either <code>locked</code> or <code>unlocked</code> is true, an exception will be thrown. If not specified, the most recent version of each file will be checked out.</td>
<td align="center" valign="top">no</td>
</tr>
<tr>
@@ -163,7 +163,7 @@ that StarTeam is maintaining for the file. If false, status will be used to de
<td valign="top">locked</td>
<td valign="top">If true, file will be locked against changes by other
users. If false (default) has no effect.
<td align="center" valign="center" rowspan="2">Either or neither, but not both, may be true.</td>
<td align="center" valign="center" rowspan="2">Either or neither, but not both, may be true. Neither may be true if a <code>label</code> is specified.</td>
</tr>
<tr>
<td valign="top">unlocked</td>


+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java View File

@@ -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.");
}
}

/**


Loading…
Cancel
Save