Merge lp:~cjwatson/isitdeployable/breezy into lp:isitdeployable

Proposed by Colin Watson on 2018-02-08
Status: Merged
Approved by: Colin Watson on 2018-02-09
Approved revision: 278
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~cjwatson/isitdeployable/breezy
Merge into: lp:isitdeployable
Diff against target: 182 lines (+27/-30)
7 files modified
Dockerfile.test (+0/-8)
dependencies-devel.txt (+3/-2)
dependencies-devel.txt.docker (+0/-2)
requirements.txt (+5/-1)
revtracker/tasks.py (+16/-14)
revtracker/tests/test_tasks.py (+2/-2)
setup.py (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/isitdeployable/breezy
Reviewer Review Type Date Requested Status
Adam Collard (community) 2018-02-08 Approve on 2018-02-08
Review via email: mp+337328@code.launchpad.net

Commit message

Port to breezy.

Description of the change

This is one of the blockers for moving to Python 3.

bzr is still used as a system dependency in various places, but I decided not to try to excise that for now; it can be done in a separate step without too much difficulty.

Requires https://code.launchpad.net/~cjwatson/isitdeployable-dependencies/breezy/+merge/337327.

To post a comment you must log in.
Adam Collard (adam-collard) wrote :

Ah, nice to see the first bits of Breezy coming in. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dockerfile.test'
2--- Dockerfile.test 2017-09-12 18:23:10 +0000
3+++ Dockerfile.test 2018-02-08 07:59:31 +0000
4@@ -3,14 +3,6 @@
5 # switch back to root user for installing extra test dependencies
6 USER root
7
8-# install system dependencies (debs)
9-COPY dependencies-devel.txt.docker ./
10-RUN apt-get update \
11- && cat dependencies-devel.txt.docker | xargs apt-get install -y --no-install-recommends \
12- && apt-get autoremove -y \
13- && apt-get clean \
14- && rm -rf /var/lib/apt/lists/*
15-
16 # install python dependencies (wheels)
17 COPY requirements-devel.txt /usr/src/app
18 RUN pip install --find-links=branches/wheels --no-index -r requirements-devel.txt
19
20=== modified file 'dependencies-devel.txt'
21--- dependencies-devel.txt 2017-08-04 19:25:45 +0000
22+++ dependencies-devel.txt 2018-02-08 07:59:31 +0000
23@@ -1,12 +1,13 @@
24 bzr
25 config-manager
26+cython
27 docker.io
28+gcc
29 make
30 postgresql-contrib-9.3
31 postgresql-plpython-9.3
32-rabbitmq-server
33-python-bzrlib.tests
34 python-codetree
35 python-dev
36 python-setuptools
37 python-virtualenv
38+rabbitmq-server
39
40=== removed file 'dependencies-devel.txt.docker'
41--- dependencies-devel.txt.docker 2017-08-03 18:18:52 +0000
42+++ dependencies-devel.txt.docker 1970-01-01 00:00:00 +0000
43@@ -1,2 +0,0 @@
44-bzr
45-python-bzrlib.tests
46
47=== modified file 'requirements.txt'
48--- requirements.txt 2018-01-31 01:12:43 +0000
49+++ requirements.txt 2018-02-08 07:59:31 +0000
50@@ -4,6 +4,11 @@
51 bleach==1.4.3
52 BeautifulSoup==3.2.1
53 billiard==3.3.0.14
54+# Must be listed above breezy until
55+# https://code.launchpad.net/~cjwatson/brz/requires-six/+merge/336764 lands
56+# in a released version.
57+six==1.10.0
58+breezy==3.0.0dev1
59 bson==0.3.3
60 celery==3.1.23
61 convoy==0.2.4
62@@ -41,7 +46,6 @@
63 pygit2==0.24.2
64 PyMeta==0.5.0
65 pyinotify==0.9.3
66-six==1.10.0
67 soupmatchers==0.2
68 testresources==0.2.5
69 testtools==0.9.16
70
71=== modified file 'revtracker/tasks.py'
72--- revtracker/tasks.py 2018-01-29 11:50:15 +0000
73+++ revtracker/tasks.py 2018-02-08 07:59:31 +0000
74@@ -6,14 +6,15 @@
75 import shutil
76 import tempfile
77
78-from bzrlib import (
79- errors as bzr_errors,
80+from breezy import (
81+ errors as brz_errors,
82 revision as _mod_revision,
83 transport,
84+ urlutils,
85 )
86-from bzrlib.branch import Branch
87-from bzrlib.plugin import load_plugins
88-from bzrlib.revisionspec import RevisionSpec
89+from breezy.branch import Branch
90+from breezy.plugin import load_plugins
91+from breezy.revisionspec import RevisionSpec
92 from celery import shared_task
93 from django.conf import settings
94 from django.contrib.auth.models import User
95@@ -134,10 +135,11 @@
96 if not all_revs and branch_from_revs_count > 1000:
97 revision_id = branch_from_revs[1000]
98 print("Getting up to revision 1000")
99- to_dir = branch_from.bzrdir.sprout(to_transport.base,
100- create_tree_if_local=False,
101- source_branch=branch_from,
102- revision_id=revision_id)
103+ to_dir = branch_from.controldir.sprout(
104+ to_transport.base,
105+ create_tree_if_local=False,
106+ source_branch=branch_from,
107+ revision_id=revision_id)
108 branch_to = to_dir.open_branch()
109 branch_to.lock_write()
110 finally:
111@@ -199,14 +201,14 @@
112 "revno_to_revid is not implemented for git.")
113 try:
114 return self.branch.get_rev_id(revno)
115- except bzr_errors.NoSuchRevision:
116+ except brz_errors.NoSuchRevision:
117 raise NoSuchRevision(self, revno)
118
119 def revid_to_revno(self, revid):
120 if self.vcs == VCS.VCS_BAZAAR:
121 try:
122 return self.branch.revision_id_to_dotted_revno(revid)[0]
123- except bzr_errors.NoSuchRevision:
124+ except brz_errors.NoSuchRevision:
125 raise NoSuchRevision(self, revid)
126 else:
127 if revid is None:
128@@ -554,7 +556,7 @@
129 try:
130 try:
131 old_revision = branch.revspec_to_revision(old_revspec)
132- except (bzr_errors.InvalidRevisionSpec, KeyError, ValueError):
133+ except (brz_errors.InvalidRevisionSpec, KeyError, ValueError):
134 # Can't determine old revision, so just take one
135 # revision
136 old_revision = None
137@@ -618,7 +620,7 @@
138 branch = LocalBranch.get_or_create(vcs, fixed_branch_url, branch_id,
139 git_branch=git_branch, fetched_branches=fetched_branches,
140 all_revs=all_revs)
141- except (bzr_errors.NotBranchError, bzr_errors.InvalidURL,
142+ except (brz_errors.NotBranchError, urlutils.InvalidURL,
143 pygit2.GitError) as e:
144 if not allow_missing:
145 raise
146@@ -657,7 +659,7 @@
147 try:
148 branch = get_branch(url, project.name, git_branch=project.git_branch,
149 fetched_branches=fetched_branches)
150- except bzr_errors.LockContention as err:
151+ except brz_errors.LockContention as err:
152 print('Can not acquire lock for {}. There is already a lock at {}. '
153 'Skipping.'.format(url, err.msg))
154 return
155
156=== modified file 'revtracker/tests/test_tasks.py'
157--- revtracker/tests/test_tasks.py 2018-01-29 14:57:56 +0000
158+++ revtracker/tests/test_tasks.py 2018-02-08 07:59:31 +0000
159@@ -4,8 +4,8 @@
160 import tempfile
161 from test.test_support import captured_stdout
162
163-from bzrlib.controldir import ControlDir
164-from bzrlib.tests import TestCaseWithTransport
165+from breezy.controldir import ControlDir
166+from breezy.tests import TestCaseWithTransport
167 from django.test.utils import override_settings
168 import pygit2
169 from six.moves.urllib.request import pathname2url
170
171=== modified file 'setup.py'
172--- setup.py 2018-01-31 01:12:43 +0000
173+++ setup.py 2018-02-08 07:59:31 +0000
174@@ -18,7 +18,7 @@
175 'South',
176 # django_openid_auth doesn't currently depend on this.deploy_tracker
177 'python-openid',
178- 'bzr',
179+ 'breezy',
180 'launchpadlib',
181 'Markdown',
182 'psycopg2',

Subscribers

People subscribed via source and target branches