antoine 2004/01/15 12:48:17
Modified: . Tag: ANT_16_BRANCH WHATSNEW
src/main/org/apache/tools/ant/taskdefs/optional/perforce
Tag: ANT_16_BRANCH P4Submit.java
docs/manual/OptionalTasks Tag: ANT_16_BRANCH perforce.html
Added: src/etc/testcases/taskdefs/optional/perforce Tag:
ANT_16_BRANCH changerenumbered.xml needsresolve.xml
Removed: src/testcases/org/apache/tools/ant/taskdefs/optional/perforce
Tag: ANT_16_BRANCH build1.xml build2.xml
Log:
Merge from HEAD
addition of 2 new attributes to p4submit : needsresolveproperty and
changeproperty.
PR: 25711
Revision Changes Path
No revision
No revision
1.1.2.1 +0 -0
ant/src/etc/testcases/taskdefs/optional/perforce/changerenumbered.xml
Index: changerenumbered.xml
===================================================================
RCS file:
/home/cvs/ant/src/etc/testcases/taskdefs/optional/perforce/changerenumbered.xml,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
1.1.2.1 +0 -0
ant/src/etc/testcases/taskdefs/optional/perforce/needsresolve.xml
Index: needsresolve.xml
===================================================================
RCS file:
/home/cvs/ant/src/etc/testcases/taskdefs/optional/perforce/needsresolve.xml,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
No revision
No revision
1.503.2.26 +3 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.503.2.25
retrieving revision 1.503.2.26
diff -u -r1.503.2.25 -r1.503.2.26
--- WHATSNEW 13 Jan 2004 10:49:11 -0000 1.503.2.25
+++ WHATSNEW 15 Jan 2004 20:48:17 -0000 1.503.2.26
@@ -25,6 +25,9 @@
* <fixcrlf> has a new attribute - fixlast. Bugzilla Report 23262.
+* <p4submit> has 2 new attributes, needsresolveproperty and changeproperty.
+ Bugzilla Report 25711.
+
Changes from Ant 1.6.B3 to Ant 1.6.0
====================================
No revision
No revision
1.16.2.2 +32 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
Index: P4Submit.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -u -r1.16.2.1 -r1.16.2.2
--- P4Submit.java 25 Sep 2003 20:48:22 -0000 1.16.2.1
+++ P4Submit.java 15 Jan 2004 20:48:17 -0000 1.16.2.2
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,14 @@
* change list number
*/
public String change;
-
+ /**
+ * change property
+ */
+ private String changeProperty;
+ /**
+ * needsresolveproperty
+ */
+ private String needsResolveProperty;
/**
* set the change list number to submit
* @param change The changelist number to submit; required.
@@ -91,6 +98,23 @@
public void setChange(String change) {
this.change = change;
}
+ /**
+ * property defining the change number if the change number gets
renumbered
+ * @param changeProperty name of a new property to which the change
number
+ * will be assigned if it changes
+ * @since ant 1.6.1
+ */
+ public void setChangeProperty(String changeProperty) {
+ this.changeProperty = changeProperty;
+ }
+ /**
+ * property defining the need to resolve the change list
+ * @param needsResolveProperty a property which will be set if the
change needs resolve
+ * @since ant 1.6.1
+ */
+ public void setNeedsResolveProperty(String needsResolveProperty) {
+ this.needsResolveProperty = needsResolveProperty;
+ }
/**
* do the work
@@ -133,6 +157,9 @@
int changenumber = Integer.parseInt(chnum);
log("Perforce change renamed " + changenumber,
Project.MSG_INFO);
getProject().setProperty("p4.change", "" +
changenumber);
+ if (changeProperty != null) {
+ getProject().setNewProperty(changeProperty,
chnum);
+ }
found = false;
}
if
(((myarray.elementAt(counter))).equals("renamed")) {
@@ -148,6 +175,9 @@
}
if (util.match("/p4 submit -c/", line)) {
getProject().setProperty("p4.needsresolve", "1");
+ if (needsResolveProperty != null) {
+ getProject().setNewProperty(needsResolveProperty,
"true");
+ }
}
}
No revision
No revision
1.21.2.4 +22 -3 ant/docs/manual/OptionalTasks/perforce.html
Index: perforce.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/perforce.html,v
retrieving revision 1.21.2.3
retrieving revision 1.21.2.4
diff -u -r1.21.2.3 -r1.21.2.4
--- perforce.html 9 Oct 2003 21:01:11 -0000 1.21.2.3
+++ perforce.html 15 Jan 2004 20:48:17 -0000 1.21.2.4
@@ -10,9 +10,8 @@
<li>Les Hughes (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
<li>Kirk Wylie (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
<li>Matt Bishop (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
- <li>Antoine Levy-Lambert (<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>)</li>
+ <li>Antoine Levy-Lambert</li>
</ul>
-<p>Version $Revision$ - $Date$</p>
<hr>
<h2>Contents</h2>
<ul>
@@ -331,6 +330,20 @@
<td valign="top">The changelist number to submit</td>
<td valign="top" align="center">Yes</td>
</tr>
+ <tr>
+ <td valign="top">changeproperty</td>
+ <td valign="top">Name of a property to which the new change number
+ will be assigned if the Perforce server renumbers the change<br>
+ Since ant 1.6.1</td>
+ <td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">needsresolveproperty</td>
+ <td valign="top">Name of property which will be set to <code>true</code>
+ if the submit requires a resolve<br>
+ Since ant 1.6.1</td>
+ <td valign="top" align="center">No</td>
+ </tr>
</table>
<h3>Examples</h3>
@@ -960,9 +973,15 @@
Changed p4submit (detection of changes of change
numbers,
and of failed submits due to resolution needed)</td>
</tr>
+<tr>
+ <td valign="top">Jan 2004</td>
+ <td valign="top">ant 1.6.1</td>
+ <td valign="top">
+Changed p4submit, needsresolveproperty and changeproperty added</td>
+</tr>
</table>
<hr>
-<p align="center">Copyright © 2001-2003 Apache Software Foundation. All
rights
+<p align="center">Copyright © 2001-2004 Apache Software Foundation. All
rights
Reserved.</p>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]