# HG changeset patch # User Steve Borho # Date 1299611118 21600 # Node ID 98417560531170b8b04ff98d98b745a97205d930 # Parent 391948925b670839f1a7d498d8fc34e33b5ea112 filemerge: introduce a 'regkeyalt' merge tool variable This allows us to provide alternate search keys for 64bit operating systems that may have 32bit merge tools installed. Presumably it may find other uses. diff -r 391948925b67 -r 984175605311 doc/hgrc.5.txt --- a/doc/hgrc.5.txt Tue Mar 08 10:03:01 2011 -0600 +++ b/doc/hgrc.5.txt Tue Mar 08 13:05:18 2011 -0600 @@ -556,6 +556,12 @@ tool. Mercurial will search for this key first under ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. Default: None +``regkeyalt`` + An alternate Windows registry key to try if the first key is not + found. The alternate key uses the same ``regname`` and ``regappend`` + semantics of the primary key. The most common use for this key + is to search for 32bit applications on 64bit operating systems. + Default: None ``regname`` Name of value to read from specified registry key. Defaults to the unnamed (default) value. diff -r 391948925b67 -r 984175605311 mercurial/filemerge.py --- a/mercurial/filemerge.py Tue Mar 08 10:03:01 2011 -0600 +++ b/mercurial/filemerge.py Tue Mar 08 13:05:18 2011 -0600 @@ -25,8 +25,10 @@ def _findtool(ui, tool): if tool in _internal: return tool - k = _toolstr(ui, tool, "regkey") - if k: + for kn in ("regkey", "regkeyalt"): + k = _toolstr(ui, tool, kn) + if not k: + continue p = util.lookup_reg(k, _toolstr(ui, tool, "regname")) if p: p = util.find_exe(p + _toolstr(ui, tool, "regappend"))