Merge lp:~kvalo/bzr-builder/bug-744087 into lp:bzr-builder

Proposed by Kalle Valo
Status: Merged
Merged at revision: 119
Proposed branch: lp:~kvalo/bzr-builder/bug-744087
Merge into: lp:bzr-builder
Diff against target: 51 lines (+4/-20)
2 files modified
cmds.py (+3/-3)
ppa.py (+1/-17)
To merge this branch: bzr merge lp:~kvalo/bzr-builder/bug-744087
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+55117@code.launchpad.net

Description of the change

Fixed few issues I found while testing --watch-ppa in natty.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Merged, thanks Kalle.

James

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmds.py'
2--- cmds.py 2011-03-01 18:06:06 +0000
3+++ cmds.py 2011-03-28 10:38:26 +0000
4@@ -539,8 +539,8 @@
5 shutil.rmtree(temp_dir)
6 if watch_ppa:
7 from bzrlib.plugins.builder.ppa import watch
8- target = target_from_dput(dput)
9- if not watch(target, self.package, base_branch.deb_version):
10+ (owner, archive) = target_from_dput(dput)
11+ if not watch(owner, archive, package_name, base_branch.deb_version):
12 return 2
13
14 def _calculate_package_name(self, recipe_file, package):
15@@ -565,5 +565,5 @@
16 base, _, suffix = dput[len(ppa_prefix):].partition('/')
17 if not suffix:
18 suffix = 'ppa'
19- return base + '/' + suffix
20+ return base, suffix
21
22
23=== modified file 'ppa.py'
24--- ppa.py 2010-07-06 20:19:05 +0000
25+++ ppa.py 2011-03-28 10:38:26 +0000
26@@ -31,24 +31,8 @@
27
28
29 def get_lp():
30- credentials = Credentials()
31 oauth_file = os.path.expanduser('~/.cache/launchpadlib/bzr-builder')
32- if os.path.exists(oauth_file):
33- f = open(oauth_file)
34- try:
35- credentials.load(f)
36- finally:
37- f.close()
38- launchpad = Launchpad(credentials, EDGE_SERVICE_ROOT)
39- else:
40- launchpad = Launchpad.get_token_and_login('bzr-builder',
41- EDGE_SERVICE_ROOT)
42- f = open(oauth_file, 'wb')
43- try:
44- launchpad.credentials.save(f)
45- finally:
46- f.close()
47- return launchpad
48+ return Launchpad.login_with('bzr-builder', 'production', credentials_file=oauth_file)
49
50
51 def watch(owner_name, archive_name, package_name, version):

Subscribers

People subscribed via source and target branches