diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-08-24 17:57:26 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-08-24 17:57:26 +0100 |
commit | 3775e56ef1a4c96b29e0c9a1a8629715df1fffe2 (patch) | |
tree | a007fc1660b3b5671c8953328d91ecd2e1603e08 | |
parent | 899597ca60c40d947d9e0443857b9f9d7813c5d4 (diff) | |
download | obnam-3775e56ef1a4c96b29e0c9a1a8629715df1fffe2.tar.gz |
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | obnamlib/app.py | 10 |
4 files changed, 25 insertions, 3 deletions
@@ -8,6 +8,12 @@ This file summarizes changes between releases of Obnam. Version 0.22, released UNRELEASED; a BETA release ------------------------------------------------- +USER VISIBLE CHANGES: + +* Obnam now reports its current configuration in the log file at startup. + This will hopefully remove one round of "did you use the --foo option?" + questions between developers and bug reporters. + BUG FIXES: * The repository is now unlocked on exit only if it is still locked. diff --git a/debian/changelog b/debian/changelog index ecaa75d5..98246fd4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +obnam (0.22-1) UNRELEASED; urgency=low + + * New upstream release. + * debian/control: Update versioned depedendency on python-cliapp. Upstream + now uses the dump_config feature in cliapp 0.18. + + -- Lars Wirzenius <liw@liw.fi> Wed, 24 Aug 2011 17:53:12 +0100 + obnam (0.21-1) unstable; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index 99821fe4..bd39b09d 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 7.3.8), python-paramiko, python-tracing (>= 0.2), fakeroot, - python-cliapp (>= 0.17) + python-cliapp (>= 0.18) Homepage: http://braawi.org/obnam/ X-Python-Version: >= 2.6 @@ -20,7 +20,7 @@ Provides: python-obnam Architecture: any Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends}, python-larch (>= 0.21~), python-ttystatus (>= 0.8), - python-paramiko, python-tracing (>= 0.2), python-cliapp (>= 0.17) + python-paramiko, python-tracing (>= 0.2), python-cliapp (>= 0.18) Description: online and disk-based backup application Obnam makes backups. Backups can be stored on local hard disks, or online via the SSH SFTP protocol. The backup server, if used, does not require any diff --git a/obnamlib/app.py b/obnamlib/app.py index 2f65d087..83f049a8 100644 --- a/obnamlib/app.py +++ b/obnamlib/app.py @@ -18,8 +18,9 @@ import cliapp import logging import os import socket -import tracing +import StringIO import sys +import tracing import obnamlib @@ -107,6 +108,7 @@ class App(cliapp.Application): return os.path.join(os.path.dirname(obnamlib.__file__), 'plugins') def process_args(self, args): + self.log_config() for pattern in self.settings['trace']: tracing.trace_add_pattern(pattern) self.hooks.call('config-loaded') @@ -115,6 +117,12 @@ class App(cliapp.Application): self.hooks.call('shutdown') logging.info('Obnam ends') + def log_config(self): + '''Log current configuration into the log file.''' + f = StringIO.StringIO() + self.settings.dump_config(f) + logging.debug('Current configuration:\n%s' % f.getvalue()) + def open_repository(self, create=False): # pragma: no cover logging.debug('opening repository (create=%s)' % create) repopath = self.settings['repository'] |