Author: mahadev
Date: Tue Dec  9 14:16:05 2008
New Revision: 724913

URL: http://svn.apache.org/viewvc?rev=724913&view=rev
Log:
ZOOKEEPER-241. Build of a distro fails after clean target is run. (patrick hunt 
via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/version/util/VerGen.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=724913&r1=724912&r2=724913&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Dec  9 14:16:05 2008
@@ -47,6 +47,9 @@
   ZOOKEEPER-248.  QuorumPeer should use Map interface instead of 
 HashMap implementation. (nitay joffe via mahadev)
 
+  ZOOKEEPER-241. Build of a distro fails after clean target is run. (patrick
+hunt via mahadev)
+
 IMPROVEMENTS:
    
    ZOOKEEPER-64. Log system env information when initializing server and

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/version/util/VerGen.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/version/util/VerGen.java?rev=724913&r1=724912&r2=724913&view=diff
==============================================================================
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/version/util/VerGen.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/version/util/VerGen.java
 Tue Dec  9 14:16:05 2008
@@ -59,6 +59,9 @@
             w.write("    public static final int MAJOR=" + maj + ";\n");
             w.write("    public static final int MINOR=" + min + ";\n");
             w.write("    public static final int MICRO=" + micro + ";\n");
+            if (rev < 0) {
+                System.out.println("Unknown REVISION number, using " + rev);
+            }
             w.write("    public static final int REVISION=" + rev + ";\n");
             w.write("    public static final String BUILD_DATE=\"" + buildDate
                     + "\";\n");
@@ -108,7 +111,12 @@
             int maj = Integer.parseInt(v[0]);
             int min = Integer.parseInt(v[1]);
             int micro = Integer.parseInt(v[2]);
-            int rev = Integer.parseInt(args[1]);
+            int rev;
+            try {
+                rev = Integer.parseInt(args[1]);
+            } catch (NumberFormatException e) {
+                rev = -1;
+            }
             generateFile(new File("."), maj, min, micro, rev, args[2]);
         } catch (NumberFormatException e) {
             System.err


Reply via email to