3 Jul 13:56
[Trac-dev] Some small cleanup patches in the db backends
From: Felix Schwarz <felix.schwarz <at> agile42.com>
Subject: [Trac-dev] Some small cleanup patches in the db backends
Newsgroups: gmane.comp.version-control.subversion.trac.devel
Date: 2009-07-03 11:58:43 GMT
Subject: [Trac-dev] Some small cleanup patches in the db backends
Newsgroups: gmane.comp.version-control.subversion.trac.devel
Date: 2009-07-03 11:58:43 GMT
While looking at the postgres backends, I added some small cleanup patches to db backends which are not really bugs. How do you want to deal with patches like these? - Should there always be a bug report? - Do you want patches for more or less cosmetic changes at all? fs
diff -r bde1a821a377 trac/db/postgres_backend.py
--- a/trac/db/postgres_backend.py Fri Jul 03 12:48:17 2009 +0200
+++ b/trac/db/postgres_backend.py Fri Jul 03 12:55:12 2009 +0200
@@ -113,20 +113,21 @@
scheme, db_prop = _parse_db_str(db_url)
db_prop.setdefault('params', {})
db_name = os.path.basename(db_prop['path'])
+ db_params = db_prop['params']
args = [self.pg_dump_path, '-C', '-d', '-x', '-Z', '8']
if 'user' in db_prop:
args.extend(['-U', db_prop['user']])
- if 'host' in db_prop['params']:
- host = db_prop['params']['host']
+ if 'host' in db_params:
+ host = db_params['host']
else:
host = db_prop.get('host', 'localhost')
(Continue reading)
RSS Feed