|
|
@@ -76,6 +76,7 @@ import org.apache.tools.ant.BuildException; |
|
|
|
* |
|
|
|
* @author Christopher Charlier, ThoughtWorks, Inc. 2001 |
|
|
|
* @author <a href="mailto:jcyip@thoughtworks.com">Jason Yip</a> |
|
|
|
* @author <a href="mailto:scohen@apache.org">Steve Cohen</a> |
|
|
|
* @see <A HREF="http://www.starbase.com/">StarBase Web Site</A> |
|
|
|
* |
|
|
|
* @ant.task name="stlabel" category="scm" |
|
|
@@ -179,25 +180,32 @@ public class StarTeamLabel extends StarTeamTask { |
|
|
|
+ "both specified. A revision label cannot be a build label."); |
|
|
|
} |
|
|
|
|
|
|
|
View snapshot = openView(); |
|
|
|
|
|
|
|
// Create the new label and update the repository |
|
|
|
|
|
|
|
if (this.revisionlabel) { |
|
|
|
new Label(snapshot, this.labelName, this.description).update(); |
|
|
|
log("Created Revision Label " + this.labelName); |
|
|
|
} else if (null != lastBuild) { |
|
|
|
new Label(snapshot, this.labelName, this.description, this.lastBuild, |
|
|
|
this.buildlabel).update(); |
|
|
|
log("Created View Label (" |
|
|
|
+ (this.buildlabel ? "" : "non-") + "build) " + this.labelName |
|
|
|
+ " as of " + this.lastBuild.toString()); |
|
|
|
} else { |
|
|
|
new Label(snapshot, this.labelName, this.description, |
|
|
|
this.buildlabel).update(); |
|
|
|
log("Created View Label (" |
|
|
|
+ (this.buildlabel ? "" : "non-") + "build) " + this.labelName); |
|
|
|
try { |
|
|
|
View snapshot = openView(); |
|
|
|
|
|
|
|
// Create the new label and update the repository |
|
|
|
|
|
|
|
if (this.revisionlabel) { |
|
|
|
new Label(snapshot, this.labelName, this.description).update(); |
|
|
|
log("Created Revision Label " + this.labelName); |
|
|
|
} else if (null != lastBuild) { |
|
|
|
new Label(snapshot, this.labelName, this.description, this.lastBuild, |
|
|
|
this.buildlabel).update(); |
|
|
|
log("Created View Label (" |
|
|
|
+ (this.buildlabel ? "" : "non-") + "build) " + this.labelName |
|
|
|
+ " as of " + this.lastBuild.toString()); |
|
|
|
} else { |
|
|
|
new Label(snapshot, this.labelName, this.description, |
|
|
|
this.buildlabel).update(); |
|
|
|
log("Created View Label (" |
|
|
|
+ (this.buildlabel ? "" : "non-") + "build) " + this.labelName); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
throw new BuildException(e); |
|
|
|
} finally { |
|
|
|
disconnectFromServer(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|