Quellcode durchsuchen

ZOOKEEPER-3370: Remove SVN specific revision generation

As we don't maintain the SVN repo any more.

ref 8771ffdaacb87126a485ae740558f6a288ab980b

Author: tison <wander4096@gmail.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes #915 from TisonKun/ZOOKEEPER-3370
tison vor 6 Jahren
Ursprung
Commit
44c9d56f22

+ 2 - 13
zookeeper-server/src/main/java/org/apache/zookeeper/Version.java

@@ -23,17 +23,6 @@ import org.apache.zookeeper.server.ExitCode;
 
 
 public class Version implements org.apache.zookeeper.version.Info {
 public class Version implements org.apache.zookeeper.version.Info {
 
 
-    /*
-     * Since the SVN to Git port this field doesn't return the revision anymore
-     * TODO: remove this method and associated field declaration in VerGen
-     * @see {@link #getHashRevision()}
-     * @return the default value -1
-     */
-    @Deprecated
-    public static int getRevision() {
-        return REVISION;
-    }
-
     public static String getRevisionHash() {
     public static String getRevisionHash() {
         return REVISION_HASH;
         return REVISION_HASH;
     }
     }
@@ -71,8 +60,8 @@ public class Version implements org.apache.zookeeper.version.Info {
      * @param args
      * @param args
      *            <ul>
      *            <ul>
      *            <li> --short - prints a short version string "1.2.3"
      *            <li> --short - prints a short version string "1.2.3"
-     *            <li> --revision - prints a short version string with the SVN
-     *            repository revision "1.2.3-94"
+     *            <li> --revision - prints a short version string with the Git
+     *            repository revision "1.2.3-${revision_hash}"
      *            <li> --full - prints the revision and the build date
      *            <li> --full - prints the revision and the build date
      *            </ul>
      *            </ul>
      */
      */

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/version/util/VerGen.java

@@ -87,7 +87,6 @@ public class VerGen {
             if (rev.equals("-1")) {
             if (rev.equals("-1")) {
                 System.out.println("Unknown REVISION number, using " + rev);
                 System.out.println("Unknown REVISION number, using " + rev);
             }
             }
-            w.write("    int REVISION=-1; //TODO: remove as related to SVN VCS\n");
             w.write("    String REVISION_HASH=\"" + rev + "\";\n");
             w.write("    String REVISION_HASH=\"" + rev + "\";\n");
             w.write("    String BUILD_DATE=\"" + buildDate
             w.write("    String BUILD_DATE=\"" + buildDate
                     + "\";\n");
                     + "\";\n");