|
Version Control with Subversion - Chapter 7. Advanced Topics - Config
Config
The config file contains the rest
of the currently available Subversion run-time options,
those not related to networking. There are only a few
options in use at this time, but they are again grouped into
sections in expectation of future additions.
The auth section contains settings
related to Subversion's authentication and authorization
against the repository. It contains:
-
store-passwords
-
This instructs Subversion to cache, or not to
cache, passwords that are supplied by the user in
response to server authentication challenges. The
default value is yes . Set this to
no to disable this on-disk password
caching. You can override this option for a single
instance of the
svn
command using
the --no-auth-cache command-line
parameter (for those subcommands that support it).
For more information, see
the section called “Client Credentials Caching”.
-
store-auth-creds
-
This setting is the same as
store-passwords , except that it
enables or disables disk-caching of
all
authentication information:
usernames, passwords, server certificates, and any
other types of cacheable credentials.
The helpers section controls which
external applications Subversion uses to accomplish its
tasks. Valid options in this section are:
-
editor-cmd
-
This specifies the program Subversion will use to
query the user for a log message during a commit
operation, such as when using
svn
commit
without either the
--message (-m ) or
--file (-F ) options.
This program is also used with the
svn
propedit
command—a temporary file is
populated with the current value of the property the
user wishes to edit, and the edits take place right
in the editor program (see
the section called “Properties”). This option's default
value is empty. The order of priority for determining the
editor command is:
-
Command-line option --editor-cmd
-
Environment variable SVN_EDITOR
-
Configuration option editor-cmd
-
Environment variable VISUAL
-
Environment variable EDITOR
-
Possibly, a default value built in to Subversion
(not present in the official builds)
The value of any of these options or variables is
(unlike diff-cmd ) the beginning of a
command line to be executed by the shell. Subversion
appends a space and the pathname of the temporary file to be
edited. The editor should modify the temporary file and
return a zero exit code to indicate success.
-
diff-cmd
-
This specifies the absolute path of a differencing
program, used when Subversion generates
“diff” output (such as when using the
svn diff
command). By default
Subversion uses an internal differencing
library—setting this option will cause it to
perform this task using an external program. See
the section called “Using External Differencing Tools” for
more details on using such programs.
-
diff3-cmd
-
This specifies the absolute path of a three-way
differencing program. Subversion uses this program to
merge changes made by the user with those received
from the repository. By default Subversion uses an
internal differencing library—setting this
option will cause it to perform this task using an
external program. See
the section called “Using External Differencing Tools” for more
details on using such programs.
-
diff3-has-program-arg
-
This flag should be set to true
if the program specified by the
diff3-cmd option accepts a
--diff-program command-line
parameter.
The tunnels section allows you to
define new tunnel schemes for use with
svnserve
and svn://
client connections. For more details, see
the section called “SSH authentication and authorization”.
The miscellany section is where
everything that doesn't belong elsewhere winds up.
[30]
In this section, you can find:
-
global-ignores
-
When running the
svn status
command, Subversion lists unversioned files and
directories along with the versioned ones, annotating
them with a ? character
(see
the section called “
svn status
”). Sometimes, it can
be annoying to see uninteresting, unversioned
items—for example, object files that result from
a program's compilation—in this display. The
global-ignores option is a list of
whitespace-delimited globs which describe the names of
files and directories that Subversion should not
display unless they are versioned. The default value
is *.o *.lo *.la #*# .*.rej *.rej .*~ *~
.#* .DS_Store .
As well as
svn status
, the
svn add
and
svn import
commands also ignore files that match the list.
You can override this option for a single instance
of any of these commands by using
the --no-ignore command-line flag.
For information on more fine-grained control of
ignored items, see
the section called “svn:ignore ”.
-
enable-auto-props
-
This instructs Subversion to automatically set
properties on newly added or imported files. The
default value is no , so set this to
yes to enable Auto-props.
The auto-props section of this file
specifies which properties are to be set on which files.
-
log-encoding
-
This variable sets the default character set
encoding for commit log messages. It's a permanent
form of the --encoding option (see
the section called “
svn
Switches”). The Subversion
repository stores log messages in UTF-8, and assumes
that your log message is written using your operating
system's native locale. You should specify a
different encoding if your commit messages are written
in any other encoding.
-
use-commit-times
-
Normally your working copy files have timestamps
that reflect the last time they were touched by any
process, whether that be your own editor or by some
svn
subcommand. This is generally
convenient for people developing software, because
build systems often look at timestamps as a way of
deciding which files need to be recompiled.
In other situations, however, it's sometimes nice
for the working copy files to have timestamps that
reflect the last time they were changed in the
repository. The
svn export
command
always places these “last-commit
timestamps” on trees that it produces. By
setting this config variable to
yes , the
svn
checkout
,
svn update
,
svn switch
, and
svn
revert
commands will also set last-commit
timestamps on files that they touch.
The auto-props section controls
the Subversion client's ability to automatically set
properties on files when they are added or imported.
It contains any number of key-value pairs in the
format PATTERN = PROPNAME=PROPVALUE
where PATTERN is a file pattern
that matches a set of filenames and the rest of the
line is the property and its value. Multiple matches
on a file will result in multiple propsets for that
file; however, there is no guarantee that auto-props
will be applied in the order in which they are listed
in the config file, so you can't have one rule
“override” another. You can find several
examples of auto-props usage in the
config file. Lastly, don't
forget to set enable-auto-props to
yes in the miscellany
section if you want to enable auto-props.
[an error occurred while processing this directive]
|
|