[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1127965 - in /subversion/branches/1.6.x-r966167: ./ build/generator/ subversion/include/private/ subversion/libsvn_fs_fs/ subversion/tests/cmdline/ subversion/tests/cmdline/svntest/

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 26 May 2011 21:48:09 +0200

> -----Original Message-----
> From: rhuijben_at_apache.org [mailto:rhuijben_at_apache.org]
> Sent: donderdag 26 mei 2011 17:39
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1127965 - in /subversion/branches/1.6.x-r966167: ./
> build/generator/ subversion/include/private/ subversion/libsvn_fs_fs/
> subversion/tests/cmdline/ subversion/tests/cmdline/svntest/
>
> Author: rhuijben
> Date: Thu May 26 15:39:27 2011
> New Revision: 1127965
>
> URL: http://svn.apache.org/viewvc?rev=1127965&view=rev
> Log:
> Merge r966167 from trunk, reapplying the change to gen_win.py as this
> file was modified in too many ways.
>
> * .
> * get-deps.sh
> * subversion/tests/cmdline/svntest/main.py
> * subversion/tests/cmdline/merge_tests.py
> * subversion/include/private/svn_repos_private.h
> * subversion/libsvn_fs_fs/rep-cache.c
> Update mergeinfo
>
> * build/generator/gen_win.py
> Handle --with-jdk.
>
> * gen-make.py
> Document and allow --with-jdk.
>
> Modified:
> subversion/branches/1.6.x-r966167/ (props changed)
> subversion/branches/1.6.x-r966167/build/generator/gen_win.py
> subversion/branches/1.6.x-r966167/gen-make.py
> subversion/branches/1.6.x-r966167/get-deps.sh (props changed)
> subversion/branches/1.6.x-
> r966167/subversion/include/private/svn_repos_private.h (props changed)
> subversion/branches/1.6.x-r966167/subversion/libsvn_fs_fs/rep-cache.c
> (props changed)
> subversion/branches/1.6.x-
> r966167/subversion/tests/cmdline/merge_tests.py (props changed)
> subversion/branches/1.6.x-
> r966167/subversion/tests/cmdline/svntest/main.py (props changed)
>
<snip>

>
> Modified: subversion/branches/1.6.x-r966167/build/generator/gen_win.py
> URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-
> r966167/build/generator/gen_win.py?rev=1127965&r1=1127964&r2=1127965
> &view=diff
> ==========================================================
> ====================
> --- subversion/branches/1.6.x-r966167/build/generator/gen_win.py
> (original)
> +++ subversion/branches/1.6.x-r966167/build/generator/gen_win.py Thu
> May 26 15:39:27 2011
> @@ -50,6 +50,7 @@ class GeneratorBase(gen_base.GeneratorBa
> self.libintl_path = None
> self.zlib_path = 'zlib'
> self.openssl_path = None
> + self.jdk_path = None
> self.junit_path = None
> self.swig_path = None
> self.vsnet_version = '7.00'
> @@ -95,6 +96,8 @@ class GeneratorBase(gen_base.GeneratorBa
> elif opt == '--with-libintl':
> self.libintl_path = val
> self.enable_nls = 1
> + elif opt == '--with-jdk':
> + self.jdk_path = val
> elif opt == '--with-junit':
> self.junit_path = val
> elif opt == '--with-zlib':
> @@ -1173,35 +1176,38 @@ class WinGeneratorBase(GeneratorBase):
> pass
>
> def _find_jdk(self):
> - self.jdk_path = None
> - jdk_ver = None
> - try:
> - import _winreg
> - key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
> - r"SOFTWARE\JavaSoft\Java Development Kit")
> - # Find the newest JDK version.
> - num_values = _winreg.QueryInfoKey(key)[1]
> - for i in range(num_values):
> - (name, value, key_type) = _winreg.EnumValue(key, i)
> - if name == "CurrentVersion":
> - jdk_ver = value
> - break
> -
> - # Find the JDK path.
> - if jdk_ver is not None:
> - key = _winreg.OpenKey(key, jdk_ver)
> + if not self.jdk_path:
> + self.jdk_path = None
> + jdk_ver = None
> + try:
> + import _winreg
> + key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
> + r"SOFTWARE\JavaSoft\Java Development Kit")
> + # Find the newest JDK version.
> num_values = _winreg.QueryInfoKey(key)[1]
> for i in range(num_values):
> (name, value, key_type) = _winreg.EnumValue(key, i)
> - if name == "JavaHome":
> - self.jdk_path = value
> + if name == "CurrentVersion":
> + jdk_ver = value
> break
> - _winreg.CloseKey(key)
> - except (ImportError, EnvironmentError):
> - pass
> - if self.jdk_path:
> - sys.stderr.write("Found JDK version %s in %s\n"
> - % (jdk_ver, self.jdk_path))
> +
> + # Find the JDK path.
> + if jdk_ver is not None:
> + key = _winreg.OpenKey(key, jdk_ver)
> + num_values = _winreg.QueryInfoKey(key)[1]
> + for i in range(num_values):
> + (name, value, key_type) = _winreg.EnumValue(key, i)
> + if name == "JavaHome":
> + self.jdk_path = value
> + break
> + _winreg.CloseKey(key)
> + except (ImportError, EnvironmentError):
> + pass
> + if self.jdk_path:
> + sys.stderr.write("Found JDK version %s in %s\n"
> + % (jdk_ver, self.jdk_path))
> + else:
> + print("Using JDK in %s\n" % (self.jdk_path))

Everything in this function is indented by two spaces inside that outer if (that is the only change), but it shows some lines as unmodified because the two blocks are somehow are to similar for our diff calculation.

        Bert
Received on 2011-05-26 21:48:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.