Merge lp:~jelmer/lptools/breezy into lp:lptools

Proposed by Jelmer Vernooij on 2018-08-26
Status: Needs review
Proposed branch: lp:~jelmer/lptools/breezy
Merge into: lp:lptools
Diff against target: 75 lines (+8/-8)
3 files modified
bin/lp-milestones (+1/-1)
bin/lp-project (+3/-3)
lptools/command.py (+4/-4)
To merge this branch: bzr merge lp:~jelmer/lptools/breezy
Reviewer Review Type Date Requested Status
Ubuntu One Control Tower 2018-08-26 Pending
Review via email: mp+353756@code.launchpad.net

Description of the change

Use breezy for command infrastructure.

Unlike bzrlib, breezy is ported to Python 3.

To post a comment you must log in.

Unmerged revisions

46. By Jelmer Vernooij on 2018-08-26

Port lptools to breezy.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/lp-milestones'
2--- bin/lp-milestones 2010-03-11 10:08:53 +0000
3+++ bin/lp-milestones 2018-08-26 16:54:18 +0000
4@@ -25,7 +25,7 @@
5 import time
6
7 # Might want to make errors import lazy.
8-from bzrlib import errors
9+from breezy import errors
10 from launchpadlib.errors import HTTPError
11
12 from lptools.command import *
13
14=== modified file 'bin/lp-project'
15--- bin/lp-project 2011-08-27 15:44:25 +0000
16+++ bin/lp-project 2018-08-26 16:54:18 +0000
17@@ -25,7 +25,7 @@
18 import os
19
20 # Might want to make errors import lazy.
21-from bzrlib import bzrdir
22+from breezy import controldir
23
24 from lptools.command import *
25
26@@ -55,7 +55,7 @@
27 def run(self, project):
28 self.outf.write('creating project %s\n' % project)
29 # load the lp plugin - we needs it, but don't want its commands shown.
30- from bzrlib.plugins import launchpad
31+ from breezy.plugins import launchpad
32 project_d = {'project':project}
33 mgmt = self.launchpad.people.newTeam(
34 display_name='%s committers' % project, name=project,
35@@ -96,7 +96,7 @@
36 lp_host = os.environ.get('LAUNCHPAD_API', '')
37 if lp_host:
38 lp_host = '//%s/' % lp_host
39- branch = bzrdir.BzrDir.create_branch_convenience(
40+ branch = controldir.ControlDir.create_branch_convenience(
41 'lp:%s%s' % (lp_host, branch_path), force_new_tree=False)
42 series = proj.getSeries(name='trunk')
43 series.branch_link = self.launchpad.load(branch_path)
44
45=== modified file 'lptools/command.py'
46--- lptools/command.py 2010-03-11 10:19:10 +0000
47+++ lptools/command.py 2018-08-26 16:54:18 +0000
48@@ -38,7 +38,7 @@
49 import os
50 import sys
51
52-from bzrlib import commands, ui, version_info as bzr_version_info
53+from breezy import commands, ui, version_info as bzr_version_info
54
55 from lptools import config
56
57@@ -72,15 +72,15 @@
58 class cmd_help(commands.Command):
59 """Show help on a command or other topic."""
60
61- # Can't use the stock bzrlib help, because the help indices aren't quite
62+ # Can't use the stock breezy help, because the help indices aren't quite
63 # generic enough.
64 takes_args = ['topic?']
65 def run(self, topic=None):
66 if topic is None:
67 self.outf.write(sys.modules['__main__'].__doc__)
68 else:
69- import bzrlib.help
70- bzrlib.help.help(topic)
71+ import breezy.help
72+ breezy.help.help(topic)
73
74
75 def do_run_bzr(argv):

Subscribers

People subscribed via source and target branches