lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: svn commit: r1388449 - in /lucene/dev/trunk: ./ dev-tools/scripts/checkJavadocLinks.py lucene/ lucene/common-build.xml solr/common-build.xml
Date Fri, 21 Sep 2012 12:23:47 GMT
Thanks Uwe: this one drove me mad last night

On Fri, Sep 21, 2012 at 8:12 AM,  <uschindler@apache.org> wrote:
> Author: uschindler
> Date: Fri Sep 21 12:12:09 2012
> New Revision: 1388449
>
> URL: http://svn.apache.org/viewvc?rev=1388449&view=rev
> Log:
> Fix the llinter issue with absolute file names intermixed with url, failing to parse
them as URLs (C:/path is treated as URL with schema C). Fix other properties to be absolute
in common-build.xml.
>
> Modified:
>     lucene/dev/trunk/   (props changed)
>     lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
>     lucene/dev/trunk/lucene/   (props changed)
>     lucene/dev/trunk/lucene/common-build.xml   (contents, props changed)
>     lucene/dev/trunk/solr/common-build.xml
>
> Modified: lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py?rev=1388449&r1=1388448&r2=1388449&view=diff
> ==============================================================================
> --- lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py (original)
> +++ lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py Fri Sep 21 12:12:09 2012
> @@ -136,6 +136,9 @@ def checkAll(dirName):
>          # Somehow even w/ java 7 generaged javadocs,
>          # deprecated-list.html can fail to escape generics types
>          fullPath = os.path.join(root, f).replace(os.path.sep,'/')
> +        fullPath = 'file:%s' % urlparse.quote(fullPath)
> +        # parse and unparse the URL to "normalize" it
> +        fullPath = urlparse.urlunparse(urlparse.urlparse(fullPath))
>          #print '  %s' % fullPath
>          allFiles[fullPath] = parse(fullPath, open('%s/%s' % (root, f), encoding='UTF-8').read())
>
> @@ -209,30 +212,26 @@ def checkAll(dirName):
>          # on annotations it seems?
>          pass
>        elif link.startswith('file:'):
> -        filepath = urlparse.unquote(urlparse.urlparse(link).path)
> -        if not (os.path.exists(filepath) or os.path.exists(filepath[1:])):
> -          if not printed:
> -            printed = True
> -            print()
> -            print(fullPath)
> -          print('  BROKEN LINK: %s' % link)
> -      elif link not in allFiles:
> -        # We only load HTML... so if the link is another resource (eg
> -        # SweetSpotSimilarity refs
> -        # lucene/build/docs/misc/org/apache/lucene/misc/doc-files/ss.gnuplot) then it's
OK:
> -        if not os.path.exists(link):
> -          if not printed:
> -            printed = True
> -            print()
> -            print(fullPath)
> -          print('  BROKEN LINK: %s' % link)
> +        if link not in allFiles:
> +          filepath = urlparse.unquote(urlparse.urlparse(link).path)
> +          if not (os.path.exists(filepath) or os.path.exists(filepath[1:])):
> +            if not printed:
> +              printed = True
> +              print()
> +              print(fullPath)
> +            print('  BROKEN LINK: %s' % link)
>        elif anchor is not None and anchor not in allFiles[link][1]:
>          if not printed:
>            printed = True
>            print()
>            print(fullPath)
>          print('  BROKEN ANCHOR: %s' % origLink)
> -
> +      else:
> +        if not printed:
> +          printed = True
> +          print()
> +          print(fullPath)
> +        print('  BROKEN URL SCHEME: %s' % origLink)
>      failures = failures or printed
>
>    return failures
>
> Modified: lucene/dev/trunk/lucene/common-build.xml
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1388449&r1=1388448&r2=1388449&view=diff
> ==============================================================================
> --- lucene/dev/trunk/lucene/common-build.xml (original)
> +++ lucene/dev/trunk/lucene/common-build.xml Fri Sep 21 12:12:09 2012
> @@ -27,10 +27,10 @@
>    </description>
>
>    <dirname file="${ant.file.common}" property="common.dir"/>
> -  <property name="dev-tools.dir" value="${common.dir}/../dev-tools"/>
> -  <property name="prettify.dir" value="${common.dir}/tools/prettify"/>
> -  <property name="maven.build.dir" value="${build.dir}/maven"/>
> -  <property name="license.dir" value="${common.dir}/licenses"/>
> +  <property name="dev-tools.dir" location="${common.dir}/../dev-tools"/>
> +  <property name="prettify.dir" location="${common.dir}/tools/prettify"/>
> +  <property name="maven.build.dir" location="${build.dir}/maven"/>
> +  <property name="license.dir" location="${common.dir}/licenses"/>
>
>    <!-- Give user a chance to override without editing this file
>        (and without typing -D each time it compiles it -->
> @@ -65,7 +65,7 @@
>    <property name="ivy.sync" value="true"/>
>
>    <property name="junit.jar" value="junit-4.10.jar"/>
> -  <property name="junit-location.jar" value="${common.dir}/test-framework/lib/${junit.jar}"/>
> +  <property name="junit-location.jar" location="${common.dir}/test-framework/lib/${junit.jar}"/>
>
>    <path id="junit-path">
>      <fileset dir="${common.dir}/test-framework/lib">
> @@ -90,7 +90,7 @@
>    <property name="tests.timezone" value="random" />
>    <property name="tests.directory" value="random" />
>    <property name="tests.linedocsfile" value="europarl.lines.txt.gz" />
> -  <property name="tests.loggingfile" value="${common.dir}/tools/junit4/logging.properties"/>
> +  <property name="tests.loggingfile" location="${common.dir}/tools/junit4/logging.properties"/>
>    <property name="tests.nightly" value="false" />
>    <property name="tests.weekly" value="false" />
>    <property name="tests.slow" value="true" />
> @@ -109,7 +109,7 @@
>    </condition>
>    <property name="tests.clover.args" value=""/>
>
> -  <property name="tests.tempDir" value="${build.dir}/test"/>
> +  <property name="tests.tempDir" location="${build.dir}/test"/>
>
>    <property name="tests.cachefile" location="${common.dir}/tools/junit4/cached-timehints.txt"
/>
>    <property name="tests.cachefilehistory" value="20" />
> @@ -144,11 +144,11 @@
>    <property name="bootclasspath" value=""/>
>    <property name="javadoc.link" value="http://download.oracle.com/javase/6/docs/api/"/>
>    <property name="javadoc.link.junit" value="http://junit.sourceforge.net/javadoc/"/>
> -  <property name="javadoc.packagelist.dir" value="${common.dir}/tools/javadoc"/>
> +  <property name="javadoc.packagelist.dir" location="${common.dir}/tools/javadoc"/>
>    <available file="${javadoc.packagelist.dir}/java6/package-list" property="javadoc.java6.packagelist.exists"/>
>    <property name="javadoc.access" value="protected"/>
>    <property name="javadoc.charset" value="utf-8"/>
> -  <property name="javadoc.dir" value="${common.dir}/build/docs"/>
> +  <property name="javadoc.dir" location="${common.dir}/build/docs"/>
>    <property name="javadoc.maxmemory" value="512m" />
>    <property name="javadoc.noindex" value="true"/>
>    <!-- Javadoc classpath -->
> @@ -161,8 +161,8 @@
>      </fileset>
>    </path>
>
> -  <property name="changes.src.dir" value="${common.dir}/site/changes"/>
> -  <property name="changes.target.dir" value="${common.dir}/build/docs/changes"/>
> +  <property name="changes.src.dir" location="${common.dir}/site/changes"/>
> +  <property name="changes.target.dir" location="${common.dir}/build/docs/changes"/>
>
>    <property name="project.name" value="site"/> <!-- todo: is this used by anakia
or something else? -->
>    <property name="build.encoding" value="utf-8"/>
> @@ -1805,11 +1805,10 @@ ${tests-output}/junit4-*.suites     - pe
>
>    <macrodef name="check-broken-links">
>         <attribute name="dir"/>
> -   <!-- TODO: somehow, the behavior of this script has CWD-funkiness but only on
windows -->
>       <sequential>
> -       <exec dir="@{dir}" executable="${python32.exe}" failonerror="true">
> +       <exec dir="." executable="${python32.exe}" failonerror="true">
>           <arg value="${dev-tools.dir}/scripts/checkJavadocLinks.py"/>
> -         <arg value="."/>
> +         <arg value="@{dir}"/>
>         </exec>
>       </sequential>
>    </macrodef>
>
> Modified: lucene/dev/trunk/solr/common-build.xml
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1388449&r1=1388448&r2=1388449&view=diff
> ==============================================================================
> --- lucene/dev/trunk/solr/common-build.xml (original)
> +++ lucene/dev/trunk/solr/common-build.xml Fri Sep 21 12:12:09 2012
> @@ -46,8 +46,8 @@
>    <property name="tests.loggingfile" location="${common-solr.dir}/testlogging.properties"/>
>    <property name="tests.cleanthreads.sysprop" value="perClass"/>
>
> -  <property name="changes.target.dir" value="${dest}/docs/changes"/>
> -  <property name="license.dir" value="${common-solr.dir}/licenses"/>
> +  <property name="changes.target.dir" location="${dest}/docs/changes"/>
> +  <property name="license.dir" location="${common-solr.dir}/licenses"/>
>
>    <import file="${common-solr.dir}/../lucene/module-build.xml"/>
>
>
>



-- 
lucidworks.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message