Skip to content

Commit b759ad8

Browse files
committed
This revision cleans up build.xml by removing references to svn. We
may want to write equivalent git targets in some cases, but svn usage is dead except for releases. It also cleans up the patch to history recording that I recently made. InteractionsModelTest still fails but I think the test code is now wrong (after the patch). The following files were modified: modified: LICENSE modified: build.xml modified: src/edu/rice/cs/drjava/DrJavaTestCase.java modified: src/edu/rice/cs/drjava/model/GlobalModelIOTest.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsModel.java
1 parent 69ecb5d commit b759ad8

File tree

5 files changed

+25
-221
lines changed

5 files changed

+25
-221
lines changed

drjava/LICENSE

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2001-2008, JavaPLT group at Rice University (drjava@rice.edu)
1+
Copyright (c) 2001-2015, JavaPLT group at Rice University (drjava@rice.edu)
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
@@ -27,5 +27,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
This software is Open Source Initiative approved Open Source Software.
2828
Open Source Initative Approved is a trademark of the Open Source Initiative.
2929

30-
This file is part of DrJava. Download the current version of this project
31-
from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
30+
This file is part of DrJava. Download recent versions of this project in
31+
binary or source form from http://www.drjava.org/, http://sourceforge.net/projects/drjava/,
32+
or https://github.com/orgs/DrJavaAtRice.

drjava/build.xml

Lines changed: 7 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<property name="md5-temp-name" value="classes/md5.properties" />
1313
<property name="md5-properties-path" value="edu/rice/cs/drjava/md5.properties" />
1414
<property name="main-class" value="edu.rice.cs.drjava.DrJava" />
15-
<property name="svn-repository" value="https://svn.code.sf.net/p/drjava/code" />
1615

1716
<!-- Properties loaded from a file -->
1817
<property name="props" value="../ant.properties" />
@@ -50,7 +49,6 @@
5049

5150
<property name="is-development" value="yes" /> <!-- Development or stable release -->
5251
<property name="tag-append" value="" /> <!-- "stable", "beta", or none -->
53-
<property name="svn-working-dir" value="${basedir}" /> <!-- svn tree base -->
5452

5553
<!-- Don't use or inherit the CLASSPATH environment variable for anything -->
5654
<property name="build.sysclasspath" value="ignore" />
@@ -100,8 +98,6 @@
10098
<echo message="variables may need to be defined (depending on the target invoked):" />
10199
<echo message="PATH: The 'javac' command is used for compilation;" />
102100
<echo message=" the 'java' command is used by default in testing/running; " />
103-
<echo message=" the 'svn' command is used to generate version numbers and " />
104-
<echo message=" in Subversion targets" />
105101
<echo message="JAVA5_HOME: Home folder of the Java 5 JRE or JDK (required for" />
106102
<echo message=" compiling and '-5' targets)" />
107103
<echo message="JAVA6_HOME: Home folder of the Java 6 JRE or JDK (required for" />
@@ -195,7 +191,6 @@
195191
<filter token="DEVELOPMENT" value="${development-value}" />
196192
<filter token="DATE" value="${DSTAMP}" />
197193
<filter token="TIME" value="${TSTAMP}" />
198-
<filter token="REVISION" value="${svn-revision}" />
199194
<echo message="Processing ${code-status-source}" />
200195
<copy file="${code-status-source}" tofile="${code-status-target}" filtering="yes" />
201196
<echo message="Processing ${version-source}" />
@@ -831,11 +826,11 @@
831826
</target>
832827

833828

834-
<target name="benchmark" depends="benchmark-current, benchmark-previous, benchmark-report"
829+
<target name="benchmark" depends="benchmark-current, benchmark-report"
835830
description="Generate a test performance report">
836831
</target>
837832

838-
<target name="benchmark-current" depends="resolve-is-modified" if="is-modified">
833+
<target name="benchmark-current">
839834
<echo message="*****************************************" />
840835
<echo message="Running benchmark tests on the local copy" />
841836
<echo message="*****************************************" />
@@ -853,80 +848,7 @@
853848
<move todir="benchmarkResults/local" file="testResults" failonerror="no" />
854849
</target>
855850

856-
<target name="benchmark-previous">
857-
<mkdir dir="benchmarkSources" />
858-
859-
<echo message="Checking out the Subversion head revision" />
860-
<exec executable="svn" failonerror="yes">
861-
<arg value="checkout" />
862-
<arg value="--quiet" />
863-
<arg value="--revision" />
864-
<arg value="HEAD" />
865-
<arg value="${svn-repository}/trunk/${ant.project.name}" />
866-
<arg value="benchmarkSources" />
867-
</exec>
868-
<antcall target="benchmark-single-previous">
869-
<param name="svn-working-dir" location="benchmarkSources" />
870-
</antcall>
871-
872-
<math result="remaining-benchmark-count" datatype="int"
873-
operand1="${benchmark-count}" operation="-" operand2="1" />
874-
<fornum count="${remaining-benchmark-count}" param="iteration">
875-
<sequential>
876-
<antcall target="benchmark-revert" />
877-
<antcall target="benchmark-single-previous">
878-
<param name="svn-working-dir" location="benchmarkSources" />
879-
</antcall>
880-
</sequential>
881-
</fornum>
882-
883-
<delete dir="benchmarkSources" />
884-
</target>
885851

886-
<target name="benchmark-single-previous" depends="resolve-svn-revision">
887-
<echo message="*****************************************" />
888-
<echo message="Running benchmark tests on revision ${svn-revision}" />
889-
<echo message="*****************************************" />
890-
891-
<!-- Change the build script text for builds that don't support test-output-to-file -->
892-
<replaceregexp file="benchmarkSources/build.xml" flags="g"
893-
match="&lt;formatter[^&gt;]*/&gt;"
894-
replace="&lt;formatter type=&quot;xml&quot; usefile=&quot;true&quot;/&gt;" />
895-
<!-- Eliminate taskdefs, which are apparently inherited (Ant complains otherwise) -->
896-
<replaceregexp file="benchmarkSources/build.xml" flags="gs"
897-
match="&lt;taskdef[^&gt;]*/&gt;" replace="" />
898-
<mkdir dir="benchmarkResults/${svn-revision}" />
899-
900-
<trycatch property="benchmark-error">
901-
<try>
902-
<!-- Must iterate tests *here* to support scripts that don't do test-repeat -->
903-
<antcall target="iterate-tests">
904-
<param name="do-test-target" value="do-test-previous" />
905-
<param name="test-formatter" value="xml" />
906-
<!-- test-output-to-file is not inferred in some build scripts -->
907-
<param name="test-output-to-file" value="yes" />
908-
</antcall>
909-
</try>
910-
<catch>
911-
<echo message="Error occured during benchmark testing:${line.separator}${benchmark-error}" />
912-
</catch>
913-
</trycatch>
914-
915-
<!-- Restore sources to their original state -->
916-
<trycatch>
917-
<try>
918-
<ant dir="benchmarkSources" target="clean" />
919-
</try>
920-
<catch />
921-
</trycatch>
922-
<exec executable="svn" dir="benchmarkSources" failonerror="yes">
923-
<arg value="revert" />
924-
<arg value="--quiet" />
925-
<arg value="build.xml" />
926-
</exec>
927-
928-
<move todir="benchmarkResults/${svn-revision}" file="testResults" failonerror="no" />
929-
</target>
930852

931853
<target name="do-test-previous">
932854
<trycatch>
@@ -951,19 +873,6 @@
951873
</trycatch>
952874
</target>
953875

954-
<target name="benchmark-revert">
955-
<echo message="Updating benchmarkSources to a previous revision" />
956-
<fornum count="${benchmark-skip}" param="iteration">
957-
<sequential>
958-
<exec executable="svn" dir="benchmarkSources" failonerror="yes">
959-
<arg value="update" />
960-
<arg value="--revision" />
961-
<arg value="PREV" />
962-
</exec>
963-
</sequential>
964-
</fornum>
965-
</target>
966-
967876
<target name="benchmark-report">
968877
<mkdir dir="docs/benchmark" />
969878
<!-- TODO - implement this. Report should be generated in docs/benchmark. -->
@@ -999,10 +908,7 @@
999908
<fileset dir="${basedir}" defaultexcludes="no">
1000909
<include name="TEST*" />
1001910
<include name="src/**/*.class" />
1002-
<include name="svn-info.txt" />
1003911
<include name="findbugs-excludes.xml" />
1004-
<!-- We could get rid of backups, but "update" ignores them, so they're okay.
1005-
(doesn't work if defaultexcludes is "yes") -->
1006912
<!-- <include name="**/*~" /> -->
1007913
<!-- Get rid of pesky OS helper files (doesn't work if defaultexcludes is "yes") -->
1008914
<include name="**/.DS_Store" />
@@ -1037,69 +943,6 @@
1037943
<delete file="rt.concjunit.jar" failonerror="${clean-can-fail}" />
1038944
</target>
1039945

1040-
1041-
<!-- ******************
1042-
Subversion Targets
1043-
****************** -->
1044-
1045-
<target name="update" depends="clean" description="Reconcile source with the Subversion archive">
1046-
<echo message="Running Subversion update" />
1047-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes">
1048-
<arg value="update" />
1049-
</exec>
1050-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes">
1051-
<arg value="status" />
1052-
</exec>
1053-
</target>
1054-
1055-
<target name="commit" depends="update, build"
1056-
description="Commit source to the Subversion archive (after building)">
1057-
<antcall target="clean-intermediate"> <!-- Clean up after the latest build -->
1058-
<param name="clean-can-fail" value="no" />
1059-
</antcall>
1060-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes">
1061-
<arg value="status" />
1062-
</exec>
1063-
<input message="Please enter a log message for the commit: "
1064-
addproperty="svn-commit-message" />
1065-
<echo message="Running Subversion commit" />
1066-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes">
1067-
<arg value="commit" />
1068-
<arg value="-m" />
1069-
<arg value="${svn-commit-message}" />
1070-
</exec>
1071-
</target>
1072-
1073-
<target name="tag" depends="update, resolve-version-tag" unless="skip-tag"
1074-
description="Copy the working copy to a new Subversion tag (after updating)">
1075-
<echo message="Creating a new Subversion tag with name ${version-tag}"/>
1076-
<exec executable="svn" failonerror="yes">
1077-
<arg value="copy" />
1078-
<arg value="${basedir}" />
1079-
<arg value="${svn-repository}/tags/${version-tag}" />
1080-
<arg value="-m" />
1081-
<arg value="Created tag ${version-tag}" />
1082-
</exec>
1083-
</target>
1084-
1085-
<target name="branch" depends="update"
1086-
description="Copy the working copy to a new Subversion branch (after updating)">
1087-
<echo message="This will create a new branch from your working copy. If there are changes " />
1088-
<echo message="in your copy that have not been committed, you may want to do so first, " />
1089-
<echo message="so that there's a clear branch point for merging later." />
1090-
<input message="Enter a name for the new branch: "
1091-
addproperty="svn-branch-name" />
1092-
<echo message="Creating a new Subversion branch ${svn-branch-name}" />
1093-
<exec executable="svn" failonerror="yes">
1094-
<arg value="copy" />
1095-
<arg value="${basedir}" />
1096-
<arg value="${svn-repository}/branches/${svn-branch-name}" />
1097-
<arg value="-m" />
1098-
<arg value="Created branch ${svn-branch-name}" />
1099-
</exec>
1100-
</target>
1101-
1102-
1103946
<!-- ***************
1104947
Release Targets
1105948
*************** -->
@@ -1141,23 +984,11 @@
1141984
</target>
1142985

1143986
<target name="release"
1144-
depends="update, build, tag, src-zip, jar-app, mac-app, windows-app, javadoc-zip"
987+
depends="build, jar-app, mac-app, windows-app, javadoc-zip"
1145988
description="Make a development release">
1146989
<delete dir="${version-tag}" />
1147990
</target>
1148991

1149-
<target name="src-zip" depends="resolve-version-tag" unless="skip-tag">
1150-
<echo message="Creating ${version-tag}-src.zip" />
1151-
<exec executable="svn" failonerror="yes">
1152-
<arg value="export" />
1153-
<arg value="${svn-repository}/tags/${version-tag}" />
1154-
<arg value="${version-tag}/src" />
1155-
</exec>
1156-
<zip destfile="${version-tag}-src.zip">
1157-
<zipfileset dir="${version-tag}/src" prefix="${version-tag}/src" />
1158-
</zip>
1159-
</target>
1160-
1161992
<target name="jar-app" depends="jar, assert-jar-exists, resolve-version-tag">
1162993
<echo message="Creating ${version-tag}.jar" />
1163994
<copy file="${ant.project.name}.jar" tofile="${version-tag}.jar" />
@@ -1262,8 +1093,7 @@
12621093
</target>
12631094

12641095
<!-- Standardize all newline character sequences. Subversion takes care of this
1265-
automatically, but sometimes files crop up with the wrong sequence.
1266-
Use "svn status" after running this to see which files were fixed. -->
1096+
automatically, but sometimes files crop up with the wrong sequence.-->
12671097
<target name="fix-newlines" description="Standardize newline character sequences in all text files">
12681098
<!-- If we're in Windows, use \r\n -->
12691099
<condition property="newline-code" value="crlf">
@@ -1654,46 +1484,17 @@
16541484
value="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" />
16551485
</target>
16561486

1657-
<target name="resolve-version-tag" depends="resolve-svn-revision">
1487+
<target name="resolve-version-tag">
16581488
<!-- Get a timestamp based on GMT, rather than local time -->
16591489
<tstamp>
16601490
<format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" />
1661-
<format property="TSTAMP" pattern="HHmm" timezone="GMT" />
1491+
<format property="TSTAMP" pattern="HHmmss" timezone="GMT" />
16621492
<format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" />
16631493
</tstamp>
16641494
<property name="version-tag"
1665-
value="${ant.project.name}${tag-append}-${DSTAMP}-r${svn-revision}" />
1495+
value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}"/>
16661496
</target>
16671497

1668-
<!-- Sets is-modified if "svn status" has non-empty output. -->
1669-
<target name="resolve-is-modified" depends="clean">
1670-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes" outputproperty="svn-status">
1671-
<arg value="status" />
1672-
</exec>
1673-
<condition property="is-modified">
1674-
<not>
1675-
<equals arg1="${svn-status}" arg2="" />
1676-
</not>
1677-
</condition>
1678-
</target>
1679-
1680-
<!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". -->
1681-
<target name="resolve-svn-revision">
1682-
<exec executable="svn" dir="${svn-working-dir}" failonerror="no" output="svn-info.txt">
1683-
<arg value="info" />
1684-
</exec>
1685-
<loadfile property="svn-revision" srcfile="svn-info.txt">
1686-
<filterchain>
1687-
<linecontains>
1688-
<contains value="Last Changed Rev: " />
1689-
</linecontains>
1690-
<replacestring from="Last Changed Rev: " to="" />
1691-
<striplinebreaks/>
1692-
</filterchain>
1693-
</loadfile>
1694-
<delete file="svn-info.txt" />
1695-
</target>
1696-
16971498

16981499
<!-- Sets "already-generated" if "generate-file" is more recent than "generate-sourcefile";
16991500
otherwise, the out-of-date target file is deleted (if it exists). Note that, since

drjava/src/edu/rice/cs/drjava/DrJavaTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected void setUp() throws Exception {
7070
final String newName = System.getProperty("drjava.test.config");
7171
assert newName != null;
7272

73-
Utilities.show("newName = '" + newName + "'");
73+
// Utilities.show("newName = '" + newName + "'");
7474

7575
if (newName != null) { // in deployed code, assertion checking may be turned off
7676
Utilities.invokeAndWait(new Runnable() {

drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ public void testSaveClearAndLoadHistory() throws EditDocumentException, IOExcept
10641064
interpretIgnoreResult(s3);
10651065
listener.waitInteractionDone();
10661066

1067+
System.err.println("history is '" + _model.getHistoryAsString() + "'");
10671068
// check that the history contains the correct value
10681069
assertEquals("History and getHistoryAsString should be the same.",
10691070
s1 + newLine + s2 + newLine + s3 + newLine,

0 commit comments

Comments
 (0)