Merge lp:~jelmer/bzr-builddeb/fix-do-tests-2 into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 480
Proposed branch: lp:~jelmer/bzr-builddeb/fix-do-tests-2
Merge into: lp:bzr-builddeb
Diff against target: 74 lines (+12/-5)
4 files modified
__init__.py (+3/-1)
debian/changelog (+5/-1)
launchpad.py (+2/-1)
util.py (+2/-2)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/fix-do-tests-2
Reviewer Review Type Date Requested Status
Bzr-builddeb-hackers code Pending
Review via email: mp+32344@code.launchpad.net

Description of the change

Use config_dir() to find the Bazaar home directory, so we find the right directory during blackbox test runs. Fixes the "bzr bd-do" tests on my machines because I have a custom builddeb.conf.

To post a comment you must log in.
467. By Jelmer Vernooij

Determine Bazaar home directory using bzrlib to prevent test
isolation issues. LP: #614125

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '__init__.py'
2--- __init__.py 2010-05-03 03:03:34 +0000
3+++ __init__.py 2010-08-11 15:58:46 +0000
4@@ -33,6 +33,7 @@
5 msgeditor,
6 )
7 from bzrlib.commands import plugin_cmds
8+from bzrlib.config import config_dir
9 from bzrlib.directory_service import directories
10
11 from info import (
12@@ -70,7 +71,8 @@
13
14 builddeb_dir = '.bzr-builddeb'
15 default_conf = os.path.join(builddeb_dir, 'default.conf')
16-global_conf = os.path.expanduser('~/.bazaar/builddeb.conf')
17+def global_conf():
18+ return os.path.join(config_dir(), 'builddeb.conf')
19 local_conf = os.path.join(builddeb_dir, 'local.conf')
20
21 default_build_dir = '../build-area'
22
23=== modified file 'debian/changelog'
24--- debian/changelog 2010-07-29 18:51:39 +0000
25+++ debian/changelog 2010-08-11 15:58:46 +0000
26@@ -27,7 +27,11 @@
27 appropriate when doing a merge from Debian or similar. LP: #576027
28 * Fixed a logic error that stops -r working in merge-upstream. LP: #594575
29
30- -- James Westby <james.westby@ubuntu.com> Thu, 06 May 2010 15:22:40 +0100
31+ [ Jelmer Vernooij ]
32+ * Determine Bazaar home directory using bzrlib to prevent test
33+ isolation issues. LP: #614125
34+
35+ -- Jelmer Vernooij <jelmer@debian.org> Wed, 11 Aug 2010 17:52:23 +0200
36
37 bzr-builddeb (2.4.2) UNRELEASED; urgency=low
38
39
40=== modified file 'launchpad.py'
41--- launchpad.py 2010-03-31 20:59:18 +0000
42+++ launchpad.py 2010-08-11 15:58:46 +0000
43@@ -20,6 +20,7 @@
44
45 import os
46
47+from bzrlib.config import config_dir
48 from bzrlib.trace import mutter
49
50 try:
51@@ -32,7 +33,7 @@
52
53
54 def _get_launchpad():
55- creds_path = os.path.expanduser("~/.bazaar/builddeb.lp_creds.txt")
56+ creds_path = os.path.join(config_dir(), "builddeb.lp_creds.txt")
57 if not os.path.exists(creds_path):
58 return None
59 creds = Credentials("bzr-builddeb")
60
61=== modified file 'util.py'
62--- util.py 2010-07-29 18:41:30 +0000
63+++ util.py 2010-08-11 15:58:46 +0000
64@@ -529,8 +529,8 @@
65 else:
66 warning('Not using configuration from %s as it is versioned.')
67 if not no_user_config:
68- config_files.append((global_conf, True))
69- user_config = global_conf
70+ config_files.append((global_conf(), True))
71+ user_config = global_conf()
72 if tree.path2id(default_conf):
73 config_files.append((tree.get_file(tree.path2id(default_conf)), False,
74 "default.conf"))

Subscribers

People subscribed via source and target branches