Clarify diff display of MutatingCommand

Tools inheriting from MutatingCommand print out the change they are going to
make and then ask the user to confirm that this is indeed what they wanted to
do.

The change is outputted as a list of updated values in the form

key -> [oldValue, newValue]

e.g.

dnsPaused -> [true, false]

This CL will change the output to be clearer:

key: oldValue -> newValue

e.g.

dnsPaused: true -> false

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170853745
This commit is contained in:
guyben 2017-10-03 07:41:02 -07:00 committed by Ben McIlwain
parent fd62f4a74e
commit 01591ff88e
8 changed files with 30 additions and 31 deletions

View file

@ -57,16 +57,16 @@ import javax.annotation.Nullable;
* <p>For example, if you had an {@code ImmutableSortedMap<String, String>} on a field named
* {@code field}, then this would look like:<pre> {@code
*
* field.key -> [key1, key2]
* field.value -> [value1, value2]}</pre>
* field.key: key1 -> key2
* field.value: value1 -> value2}</pre>
*
* <p>If you had an {@code ImmutableSortedMap<String, EmbeddedClass>} on a field named
* {@code field}, where {@code EmbeddedClass} defines two {@code foo} and {@code bar} fields, then
* the embedded properties might look like:<pre> {@code
*
* field.key -> [key1, key2]
* field.value.foo -> [foo1, foo2]
* field.value.bar -> [bar1, bar2]}</pre>
* field.key: key1 -> key2
* field.value.foo: foo1 -> foo2
* field.value.bar: bar1 -> bar2}</pre>
*
* @param <K> key type for sorted map which must be {@link Comparable}
* @param <V> value type for sorted map