/**
 * Copyright (C) 2009-2013 FoundationDB, LLC
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.foundationdb.server;

import com.foundationdb.sql.Main;

public class GetVersion{

    public static void main (String[] a) throws Exception
    {
        System.out.println(Main.VERSION_STRING);
    }
}


@@ -786,16 +786,84 @@
 .Main;%0A%0A
+import java.lang.reflect.Field;%0Aimport java.lang.reflect.Modifier;%0A%0A
 public c
@@ -877,18 +877,18 @@
 tVersion
-%7B
 %0A
+%7B
 %0A    pub
@@ -907,17 +907,16 @@
 oid main
- 
 (String%5B
@@ -918,16 +918,19 @@
 ring%5B%5D a
+rgs
 ) throws
@@ -943,61 +943,581 @@
 tion
+ %7B
 %0A    
-%7B%0A        System.out.println(Main.VERSION_STRING
+    if(args.length %3E 0 && %22-v%22.equals(args%5B0%5D)) %7B%0A            dumpVerbose();%0A        %7D else %7B%0A            dumpMinimal();%0A        %7D%0A    %7D%0A%0A    private static void dumpVerbose() throws IllegalAccessException %7B%0A        for(Field field : Main.VERSION_INFO.getClass().getDeclaredFields()) %7B%0A            if((field.getModifiers() & Modifier.PUBLIC) %3E 0) %7B%0A                System.out.println(field.getName() + %22=%22 + field.get(Main.VERSION_INFO));%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static void dumpMinimal() %7B%0A        System.out.println(Main.VERSION_INFO.versionLong
 );%0A 
@@ -1523,9 +1523,8 @@
     %7D%0A%7D%0A
-%0A

Add -v flag for dumping everything