You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2014/01/06 19:55:57 UTC
svn commit: r1555974 - in /lucene/dev/branches/branch_4x: ./
extra-targets.xml lucene/ lucene/CHANGES.txt lucene/test-framework/
lucene/test-framework/build.xml lucene/tools/ lucene/tools/build.xml
lucene/tools/ivy.xml
Author: uschindler
Date: Mon Jan 6 18:55:57 2014
New Revision: 1555974
URL: http://svn.apache.org/r1555974
Log:
Merged revision(s) 1555973 from lucene/dev/trunk:
LUCENE-5385: Make precommit work for svn 1.8 or git checkouts
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/extra-targets.xml
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/build.xml
lucene/dev/branches/branch_4x/lucene/tools/ (props changed)
lucene/dev/branches/branch_4x/lucene/tools/build.xml
lucene/dev/branches/branch_4x/lucene/tools/ivy.xml
Modified: lucene/dev/branches/branch_4x/extra-targets.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/extra-targets.xml?rev=1555974&r1=1555973&r2=1555974&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/extra-targets.xml (original)
+++ lucene/dev/branches/branch_4x/extra-targets.xml Mon Jan 6 18:55:57 2014
@@ -105,6 +105,9 @@
<groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[
import org.tmatesoft.svn.core.*;
import org.tmatesoft.svn.core.wc.*;
+ import org.apache.tools.ant.Project;
+
+ def RECOMMENDED_SVNKIT_18 = '1.8.2';
SVNClientManager manager = SVNClientManager.newInstance();
SVNStatusClient statusClient = manager.getStatusClient();
@@ -115,6 +118,24 @@
def convertRelative = {
file -> '.' + file.getAbsolutePath().substring(baseLen).replace(File.separatorChar, (char)'/');
}
+
+ // do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
+ try {
+ statusClient.doStatus(basedir, false);
+ } catch (SVNException ex) {
+ int code = ex.getErrorMessage().getErrorCode().getCode();
+ if (code == SVNErrorCode.WC_UNSUPPORTED_FORMAT.getCode()) {
+ task.log('WARNING: Unsupported SVN working copy version! Disabling checks...', Project.MSG_WARN);
+ task.log('If your working copy is on version 1.8 already, please pass -Dsvnkit.version=' + RECOMMENDED_SVNKIT_18 + ' to successfully run checks.', Project.MSG_INFO);
+ return;
+ } else if (code == SVNErrorCode.WC_NOT_DIRECTORY.getCode() || code == SVNErrorCode.WC_NOT_FILE.getCode()) {
+ task.log('WARNING: Development directory is not an SVN checkout! Disabling checks...', Project.MSG_WARN);
+ return;
+ } else {
+ task.log('WARNING: Development directory is not a valid SVN checkout (' + ex.getErrorMessage() + '). Disabling checks...', Project.MSG_WARN);
+ return;
+ }
+ }
Set missingProps = new TreeSet(), unversioned = new TreeSet(), changed = new TreeSet();
Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1555974&r1=1555973&r2=1555974&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Mon Jan 6 18:55:57 2014
@@ -54,6 +54,11 @@ Build
* SOLR-5590: Upgrade HttpClient/HttpComponents to 4.3.x.
(Karl Wright via Shawn Heisey)
+* LUCENE-5385: "ant precommit" / "ant check-svn-working-copy" now work
+ for SVN 1.8 or GIT checkouts. The ANT target prints a warning instead
+ of failing. It also instructs the user, how to run on SVN 1.8 working
+ copies. (Robert Muir, Uwe Schindler)
+
Bug fixes
* LUCENE-5285: Improved highlighting of multi-valued fields with
Modified: lucene/dev/branches/branch_4x/lucene/test-framework/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/build.xml?rev=1555974&r1=1555973&r2=1555974&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/test-framework/build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/test-framework/build.xml Mon Jan 6 18:55:57 2014
@@ -27,8 +27,7 @@
<path id="classpath">
<pathelement location="${common.dir}/build/core/classes/java"/>
<pathelement location="${common.dir}/build/codecs/classes/java"/>
- <path refid="junit-path"/>
- <path refid="ant-path"/>
+ <fileset dir="lib"/>
</path>
<path id="test.classpath"/>
Modified: lucene/dev/branches/branch_4x/lucene/tools/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/tools/build.xml?rev=1555974&r1=1555973&r2=1555974&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/tools/build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/tools/build.xml Mon Jan 6 18:55:57 2014
@@ -28,7 +28,7 @@
<path id="classpath">
<!-- TODO: we need this for forbidden-apis to be happy, because it does not support "includeantruntime": -->
- <path refid="ant-path"/>
+ <fileset dir="lib"/>
</path>
<path id="test.classpath"/>
Modified: lucene/dev/branches/branch_4x/lucene/tools/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/tools/ivy.xml?rev=1555974&r1=1555973&r2=1555974&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/tools/ivy.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/tools/ivy.xml Mon Jan 6 18:55:57 2014
@@ -18,4 +18,8 @@
-->
<ivy-module version="2.0">
<info organisation="org.apache.lucene" module="core-tools"/>
+ <dependencies>
+ <dependency org="org.apache.ant" name="ant" rev="${/org.apache.ant/ant}" transitive="false" />
+ <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
+ </dependencies>
</ivy-module>