History log of /libcore/tools/upstream/src/main/java/libcore/CompareUpstreams.java
Revision Date Author Comments
573c7b0e25305bf9ace680450cbc6a18f415d44d 19-Dec-2017 Tobias Thierer <tobiast@google.com> Add new tools/upstream/upstream-diff script.

This is a more flexible version of the 'meld' command that
was previously in the .tsv produced by libcore-compare-upstreams
The code that produces that .tsv has been changed to call the
new script.

The new script ads the following features:

1.) Compare multiple files against upstream in a single command
(this will launch multiple 'meld' processes in sequence):
./upstream-diff java/util/ArrayList.java java/util/LinkedList
2.) Specify files to compare via their fully qualified name
rather than the relative path of the .java file:
./upstream-diff java.util.ArrayList
3.) Use a diff/merge tool other than meld:
./upstream-diff -d kdiff3 java.util.ArrayList
./upstream-diff -d diff java.util.ArrayList
4.) Customize repositories to diff against, eg. three-way merge
for integrating upstream changes:
./upstream-diff -r 7u40,ojluni,8u121-b13 java.util.ArrayList

Test: libcore/tools/upstream/upstream-diff java.nio.ByteBuffer
Test: make libcore-compare-upstreams && java -jar \
${ANDROID_HOST_OUT}/framework/libcore-compare-upstreams.jar \
> ~/compare-upstreams.tsv

Change-Id: I5bc2354049f0a9a087dce588a441b09ea531bc3a
5ea3fedc89b4f643a2b7868f0cd78d87011f654c 24-Oct-2017 Adam Vartanian <flooey@google.com> Fix CompareUpstreams instructions for jdk8u121-b13 and jdk-9+181.

The previous set of commands would check out the head copy of all of the
code rather than the version specified, because get_source.sh always
fetches the head revision.

Test: make
Change-Id: Id42534ff21d1a6849836a00785d896572e6f1694
fe2fbdf8f9572aa81a0c3a71e237fcb1e4678884 28-Sep-2017 Tobias Thierer <tobiast@google.com> Establish OpenJDK 9+181 as an upstream revision of interest.

jdk-9+181 (added 3 August 2017) is currently the latest
tag at http://hg.openjdk.java.net/jdk9/jdk9/

This CL arbitrarily picks that commit as an initial reference
point, from which one may want to integrate upstream sources.
This tag should be pretty close to the public availability build
of OpenJDK 9, but I don't know whether it is exactly identical.

This CL adds toplevel documentation to CompareUpstream for how to
check out that upstream revision, but does not change the expected
upstream version of any particular ojluni class and doesn't change
the tool to compare ojluni files against the new upstream.

The purpose of this CL is merely to pick, and name, a new upstream
revision that other CLs may want to refer to.

Test: Ran the given commands to check out upstream sources.
Test: Treehugger.
Change-Id: I89e95a98268d38224f663c449f019624f8d1c685
8922e94af1236ea68dca162542a9b8c7838faa21 06-Apr-2017 Tobias Thierer <tobiast@google.com> Port CompareUpstreams tool to Java and improve.

This version runs ~ 50x faster than the .py version, is configured via
environment variables rather than command line parameters, and has
additional features:

* Summarize change comments that occur in each file
* Add support for OpenJDK 9 upstreams.
* Know expected upstream for each file (hard coded), currently 9b113+
for java.util.concurrent and parts of java.util, but 8u121-b13 for
everything else.
* Add functionality to copy files from each upstream
(rather than just 8u121-b13) to $OJLUNI_UPSTREAMS
* As a side effect, this fixes the counting of line numbers: If a file
ends with a newline, Python counts that as an additional (empty) line,
whereas the Java version counts the newline character as belonging to
the line that it terminates; Java's interpretation matches that of
unix tools such as wc -l.

Bug: 35910877
Test: make libcore-compare-upstreams && \
java -jar out/host/linux-x86/framework/libcore-compare-upstreams.jar
Test: make libcore-copy-upstream-files && \
java -jar out/host/linux-x86/framework/libcore-copy-upstream-files.jar \
/tmp/upstreams

Change-Id: I1604b4c4430fe032250f694b7db42456c7653d64