In addition to the usual INI-based configuration area, Subversion clients running on Windows platforms may also use the Windows Registry to hold the configuration data. The option names and their values are the same as in the INI files. The “file/section” hierarchy is preserved as well, though addressed in a slightly different fashion—in this schema, files and sections are just levels in the Registry key tree.
Subversion looks for system-wide configuration values under the
HKEY_LOCAL_MACHINESoftwareTigris.orgSubversion
key. For example, the global-ignores
option, which is in the miscellany
section of the config file, would
be found at HKEY_LOCAL_MACHINESoftwareTigris.orgSubversionConfigMiscellanyglobal-ignores
.
Per-user configuration values should be stored under HKEY_CURRENT_USERSoftwareTigris.orgSubversion
.
Registry-based configuration options are parsed before their file-based counterparts, so they are overridden by values found in the configuration files. In other words, Subversion looks for configuration information in the following locations on a Windows system; lower-numbered locations take precedence over higher-numbered locations:
Command-line options
The per-user INI files
The per-user Registry values
The system-wide INI files
The system-wide Registry values
Also, the Windows Registry doesn’t really support the notion of
something being “commented out.” However, Subversion will
ignore any option key whose name begins with a hash (#
) character. This allows you to effectively
comment out a Subversion option without deleting the entire key from the
Registry, obviously simplifying the process of restoring that
option.
The svn command-line client never attempts to write to the Windows Registry and will not attempt to create a default configuration area there. You can create the keys you need using the REGEDIT program. Alternatively, you can create a .reg file (such as the one in Example 7-1), and then double-click on that file’s icon in the Explorer shell, which will cause the data to be merged into your Registry.
REGEDIT4 [HKEY_LOCAL_MACHINESoftwareTigris.orgSubversionServersgroups] [HKEY_LOCAL_MACHINESoftwareTigris.orgSubversionServersglobal] "#http-proxy-host"="" "#http-proxy-port"="" "#http-proxy-username"="" "#http-proxy-password"="" "#http-proxy-exceptions"="" "#http-timeout"="0" "#http-compression"="yes" "#neon-debug-mask"="" "#ssl-authority-files"="" "#ssl-trust-default-ca"="" "#ssl-client-cert-file"="" "#ssl-client-cert-password"="" [HKEY_CURRENT_USERSoftwareTigris.orgSubversionConfigauth] "#store-passwords"="yes" "#store-auth-creds"="yes" [HKEY_CURRENT_USERSoftwareTigris.orgSubversionConfighelpers] "#editor-cmd"="notepad" "#diff-cmd"="" "#diff3-cmd"="" "#diff3-has-program-arg"="" [HKEY_CURRENT_USERSoftwareTigris.orgSubversionConfig unnels] [HKEY_CURRENT_USERSoftwareTigris.orgSubversionConfigmiscellany] "#global-ignores"="*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store" "#log-encoding"="" "#use-commit-times"="" "#no-unlock"="" "#enable-auto-props"="" [HKEY_CURRENT_USERSoftwareTigris.orgSubversionConfigauto-props]
The preceding example shows the contents of a .reg file, which contains some of the most
commonly used configuration options and their default values. Note the
presence of both system-wide (for network proxy-related options) and
per-user settings (editor programs and password storage, among others).
Also note that all the options are effectively commented out. You need only
remove the hash (#
) character from
the beginning of the option names
and set the values as you desire.