X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/41a6d8591d5962dbfe8e372fff10c60e06718083..1e78b00609d4d284f6316a328aa9b25c1cf2a254:/stgit/config.py diff --git a/stgit/config.py b/stgit/config.py index 3bbbd0d..e6c9538 100644 --- a/stgit/config.py +++ b/stgit/config.py @@ -28,6 +28,23 @@ else: config = ConfigParser.RawConfigParser() -config.readfp(file('/etc/stgitrc')) +# Set the defaults +config.add_section('stgit') +config.set('stgit', 'autoresolved', 'no') +config.set('stgit', 'smtpserver', 'localhost:25') +config.set('stgit', 'smtpdelay', '2') +config.set('stgit', 'merger', + 'diff3 -L local -L older -L remote -m -E ' \ + '"%(branch1)s" "%(ancestor)s" "%(branch2)s" > "%(output)s"') +config.set('stgit', 'keeporig', 'yes') + +# Read the configuration files (if any) and override the default settings +config.read('/etc/stgitrc') config.read(os.path.expanduser('~/.stgitrc')) config.read(os.path.join(__git_dir, 'stgitrc')) + +# [gitmergeonefile] section is deprecated. In case it exists copy the +# options/values to the [stgit] one +if config.has_section('gitmergeonefile'): + for option, value in config.items('gitmergeonefile'): + config.set('stgit', option, value)