Updater: re-instate command-line's gentle 'update' command

The 'update' command is actually not supposed to overwrite
locally-modified files... That's 'update-force's job.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: Brown paper bag fix

This fixes a bug introduced in 34d01ebe(Updater: prefer the update site's
current versions to locally-cached ones). Basically, it would prevent any
shadowing (update sites overriding other update sites' files).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: refactor the version merging from multiple update sites

Incidentally, this also fixes a subtle bug where file versions from
overridden update sites would not show up as previous versions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: do not print extra empty lines when warning about conflicts

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: use LinkedHashSet where appropriate

This developer missed the LinkedHashSet when starting the Updater
project, and used LinkedHashMap to emulate it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: always update metadata from .jar files' pom.xml

... if they have one...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: do not allow to edit descriptions that came from pom.xml

If the description was set from the pom.xml included in the .jar
file, do not allow editing, since it would not have the desired
effect anyway.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: do not show obsolete files

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: really scroll the file details to the top

There was a scrollRectToVisible() call that tried to do, but failed to
achieve the desired effect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: offer the update sites filters right from the start

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: offer to move the files into place without restart

This is not the safest thing to do, as Java relies on the .jar files
being available in unchanged form. This was done so that older Windows
versions -- which were seriously limited in file descriptors --
would not run out of resources just because the class path contains
593 .jar files.

As a consequence, updating .jar files while they are in use can lead to
'funny' exceptions and even crashes.

Nevertheless, for people who know what they're doing (or think they
do), having the option of shooting yourself into your foot is nicer
than not to have it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI (sites dialog): keep the selection when toggling 'for update'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a utility method for executing programs

Its initial purpose is to help the Updater with diff'ing local vs remote
file versions, but it is too useful to be hidden in ij-updater-core.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater: add a class to find out how the local files differ

When a file is marked locally-modified, it is often quite interesting
to see where those differences are exactly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add an OutputStream adapter for line-based outputs

When parsing the output of programs, it is often convenient to have
an adapter that passes complete lines instead of random chunks of
bytes. This class helps with that situation. Its initial purpose is
to help with colorizing the differences between local and remote .jar
files in the ImageJ updater.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: offer to show how local and remote versions differ

This is a major overhaul of the 'Show changes' button in the advanced
mode. It also switches this mode on based on the availability of the
'git' executable rather than the presence of the .git/ directory in
the ImageJ root directory, since the latter is no longer the case
for ImageJ2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: show a busy cursor while diff'ing files

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: show a hand cursor over the action links in the diff view

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: offer to show the Git log in the diff view

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater GUI: try harder to offer a Git log

We can use the timestamps stored in the update site's db.xml.gz.

While at it, let's switch on git log's rename detection.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>