From 5e2505add37d712b972ead3a3e38e3f60e0b8062 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 28 Jun 2007 22:53:00 +0000
Subject: [PATCH] converted bad code for determining svn rev number of installation to use better method
---
opends/src/quicksetup/org/opends/quicksetup/Installation.java | 36 +++---------------------------------
1 files changed, 3 insertions(+), 33 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Installation.java b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
index b9f4965..f3bfd27 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Installation.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -473,45 +473,15 @@
}
/**
- * Gets the SVN revision number of the build by looking for the 'base'
- * configuration file config/upgrade/config.ldif.[svn rev #].
+ * Gets the SVN revision number of the build.
*
* @return Integer representing the svn number
* @throws ApplicationException if for some reason the number could not
* be determined
*/
public Integer getSvnRev() throws ApplicationException {
- Integer rev = null;
- File configUpgradeDir = getConfigurationUpgradeDirectory();
- if (configUpgradeDir.exists()) {
- String[] upgradeFileNames = configUpgradeDir.list();
- for (String upgradeFileName : upgradeFileNames) {
-
- // This code assumes that there will only be one file
- // in the config/upgrade directory having the prefix
- // config.ldif. and that it will end with the SVN
- // revision number of the build of the current
- // installation.
- if (upgradeFileName.startsWith(BASE_CONFIG_FILE_PREFIX)) {
- String svnRefString = upgradeFileName.substring(
- BASE_CONFIG_FILE_PREFIX.length());
- try {
- rev = new Integer(svnRefString);
- } catch (NumberFormatException nfe) {
- // ignore for now; try other files
- }
- if (rev != null) {
- break;
- }
- }
- }
- }
- if (rev == null) {
- throw new ApplicationException(
- ApplicationException.Type.FILE_SYSTEM_ERROR,
- getMsg("error-determining-svn-rev"), null);
- }
- return rev;
+ BuildInformation bi = getBuildInformation();
+ return bi.getRevisionNumber();
}
/**
--
Gitblit v1.10.0