Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | no longer in the source branch. |
Merge reported by: | The Breezy Bot |
Merged at revision: | not available |
Proposed branch: | lp:~jelmer/brz/probe-hg |
Merge into: | lp:brz |
Diff against target: |
1016 lines (+328/-96) 31 files modified
breezy/annotate.py (+1/-1) breezy/bedding.py (+3/-1) breezy/builtins.py (+4/-1) breezy/bzr/bundle/commands.py (+4/-1) breezy/bzr/knitpack_repo.py (+4/-1) breezy/bzr/knitrepo.py (+3/-1) breezy/bzr/smart/ping.py (+2/-1) breezy/bzr/versionedfile.py (+3/-1) breezy/bzr/workingtree_4.py (+3/-1) breezy/cmd_version_info.py (+3/-1) breezy/conflicts.py (+1/-1) breezy/diff.py (+3/-1) breezy/errors.py (+0/-35) breezy/filters/__init__.py (+4/-1) breezy/foreign.py (+1/-4) breezy/ignores.py (+3/-1) breezy/lazy_import.py (+46/-17) breezy/lockable_files.py (+3/-1) breezy/merge_directive.py (+3/-1) breezy/mergeable.py (+3/-1) breezy/multiparent.py (+3/-1) breezy/plugin.py (+4/-1) breezy/plugins/hg/__init__.py (+177/-0) breezy/plugins/netrc_credential_store/__init__.py (+1/-4) breezy/plugins/upload/cmds.py (+1/-1) breezy/tag.py (+4/-1) breezy/tests/test_lazy_import.py (+10/-10) breezy/trace.py (+3/-1) breezy/transport/http/__init__.py (+21/-3) breezy/workingtree.py (+3/-1) doc/en/release-notes/brz-3.1.txt (+4/-0) |
To merge this branch: | bzr merge lp:~jelmer/brz/probe-hg |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+375181@code.launchpad.net |
Commit message
Add a Mercurial prober that mentions that mercurial repositories are unsupported.
Description of the change
Add a Mercurial prober that mentions that mercurial repositories are unsupported.
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) : | # |
review:
Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote : | # |
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote : | # |
Merging failed
https:/
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote : | # |
Running landing tests failed
https:/
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'breezy/annotate.py' | |||
2 | --- breezy/annotate.py 2019-06-16 01:03:51 +0000 | |||
3 | +++ breezy/annotate.py 2020-01-11 17:50:43 +0000 | |||
4 | @@ -36,12 +36,12 @@ | |||
5 | 36 | import patiencediff | 36 | import patiencediff |
6 | 37 | 37 | ||
7 | 38 | from breezy import ( | 38 | from breezy import ( |
8 | 39 | errors, | ||
9 | 40 | tsort, | 39 | tsort, |
10 | 41 | ) | 40 | ) |
11 | 42 | """) | 41 | """) |
12 | 43 | from . import ( | 42 | from . import ( |
13 | 44 | config, | 43 | config, |
14 | 44 | errors, | ||
15 | 45 | osutils, | 45 | osutils, |
16 | 46 | ) | 46 | ) |
17 | 47 | from .repository import _strip_NULL_ghosts | 47 | from .repository import _strip_NULL_ghosts |
18 | 48 | 48 | ||
19 | === modified file 'breezy/bedding.py' | |||
20 | --- breezy/bedding.py 2019-06-16 19:53:27 +0000 | |||
21 | +++ breezy/bedding.py 2020-01-11 17:50:43 +0000 | |||
22 | @@ -25,12 +25,14 @@ | |||
23 | 25 | from .lazy_import import lazy_import | 25 | from .lazy_import import lazy_import |
24 | 26 | lazy_import(globals(), """ | 26 | lazy_import(globals(), """ |
25 | 27 | from breezy import ( | 27 | from breezy import ( |
26 | 28 | errors, | ||
27 | 29 | osutils, | 28 | osutils, |
28 | 30 | trace, | 29 | trace, |
29 | 31 | win32utils, | 30 | win32utils, |
30 | 32 | ) | 31 | ) |
31 | 33 | """) | 32 | """) |
32 | 33 | from . import ( | ||
33 | 34 | errors, | ||
34 | 35 | ) | ||
35 | 34 | from .sixish import ( | 36 | from .sixish import ( |
36 | 35 | PY3, | 37 | PY3, |
37 | 36 | ) | 38 | ) |
38 | 37 | 39 | ||
39 | === modified file 'breezy/builtins.py' | |||
40 | --- breezy/builtins.py 2019-10-13 18:52:37 +0000 | |||
41 | +++ breezy/builtins.py 2020-01-11 17:50:43 +0000 | |||
42 | @@ -25,6 +25,10 @@ | |||
43 | 25 | import breezy.bzr | 25 | import breezy.bzr |
44 | 26 | import breezy.git | 26 | import breezy.git |
45 | 27 | 27 | ||
46 | 28 | from . import ( | ||
47 | 29 | errors, | ||
48 | 30 | ) | ||
49 | 31 | |||
50 | 28 | from . import lazy_import | 32 | from . import lazy_import |
51 | 29 | lazy_import.lazy_import(globals(), """ | 33 | lazy_import.lazy_import(globals(), """ |
52 | 30 | import time | 34 | import time |
53 | @@ -38,7 +42,6 @@ | |||
54 | 38 | directory_service, | 42 | directory_service, |
55 | 39 | delta, | 43 | delta, |
56 | 40 | config as _mod_config, | 44 | config as _mod_config, |
57 | 41 | errors, | ||
58 | 42 | globbing, | 45 | globbing, |
59 | 43 | gpg, | 46 | gpg, |
60 | 44 | hooks, | 47 | hooks, |
61 | 45 | 48 | ||
62 | === modified file 'breezy/bzr/bundle/commands.py' | |||
63 | --- breezy/bzr/bundle/commands.py 2019-07-25 22:19:30 +0000 | |||
64 | +++ breezy/bzr/bundle/commands.py 2020-01-11 17:50:43 +0000 | |||
65 | @@ -23,11 +23,14 @@ | |||
66 | 23 | 23 | ||
67 | 24 | from __future__ import absolute_import | 24 | from __future__ import absolute_import |
68 | 25 | 25 | ||
69 | 26 | from ... import ( | ||
70 | 27 | errors, | ||
71 | 28 | ) | ||
72 | 29 | |||
73 | 26 | from ...lazy_import import lazy_import | 30 | from ...lazy_import import lazy_import |
74 | 27 | lazy_import(globals(), """ | 31 | lazy_import(globals(), """ |
75 | 28 | from breezy import ( | 32 | from breezy import ( |
76 | 29 | branch, | 33 | branch, |
77 | 30 | errors, | ||
78 | 31 | merge_directive, | 34 | merge_directive, |
79 | 32 | revision as _mod_revision, | 35 | revision as _mod_revision, |
80 | 33 | urlutils, | 36 | urlutils, |
81 | 34 | 37 | ||
82 | === modified file 'breezy/bzr/knitpack_repo.py' | |||
83 | --- breezy/bzr/knitpack_repo.py 2019-01-09 00:04:02 +0000 | |||
84 | +++ breezy/bzr/knitpack_repo.py 2020-01-11 17:50:43 +0000 | |||
85 | @@ -18,6 +18,10 @@ | |||
86 | 18 | 18 | ||
87 | 19 | from __future__ import absolute_import | 19 | from __future__ import absolute_import |
88 | 20 | 20 | ||
89 | 21 | from .. import ( | ||
90 | 22 | errors, | ||
91 | 23 | ) | ||
92 | 24 | |||
93 | 21 | from ..lazy_import import lazy_import | 25 | from ..lazy_import import lazy_import |
94 | 22 | lazy_import(globals(), """ | 26 | lazy_import(globals(), """ |
95 | 23 | import time | 27 | import time |
96 | @@ -25,7 +29,6 @@ | |||
97 | 25 | from breezy import ( | 29 | from breezy import ( |
98 | 26 | controldir, | 30 | controldir, |
99 | 27 | debug, | 31 | debug, |
100 | 28 | errors, | ||
101 | 29 | osutils, | 32 | osutils, |
102 | 30 | revision as _mod_revision, | 33 | revision as _mod_revision, |
103 | 31 | trace, | 34 | trace, |
104 | 32 | 35 | ||
105 | === modified file 'breezy/bzr/knitrepo.py' | |||
106 | --- breezy/bzr/knitrepo.py 2018-11-30 12:39:04 +0000 | |||
107 | +++ breezy/bzr/knitrepo.py 2020-01-11 17:50:43 +0000 | |||
108 | @@ -22,7 +22,6 @@ | |||
109 | 22 | 22 | ||
110 | 23 | from breezy import ( | 23 | from breezy import ( |
111 | 24 | controldir, | 24 | controldir, |
112 | 25 | errors, | ||
113 | 26 | lockable_files, | 25 | lockable_files, |
114 | 27 | lockdir, | 26 | lockdir, |
115 | 28 | osutils, | 27 | osutils, |
116 | @@ -38,6 +37,9 @@ | |||
117 | 38 | xml7, | 37 | xml7, |
118 | 39 | ) | 38 | ) |
119 | 40 | """) | 39 | """) |
120 | 40 | from .. import ( | ||
121 | 41 | errors, | ||
122 | 42 | ) | ||
123 | 41 | from ..repository import ( | 43 | from ..repository import ( |
124 | 42 | InterRepository, | 44 | InterRepository, |
125 | 43 | IsInWriteGroupError, | 45 | IsInWriteGroupError, |
126 | 44 | 46 | ||
127 | === modified file 'breezy/bzr/smart/ping.py' | |||
128 | --- breezy/bzr/smart/ping.py 2018-08-08 02:10:06 +0000 | |||
129 | +++ breezy/bzr/smart/ping.py 2020-01-11 17:50:43 +0000 | |||
130 | @@ -23,11 +23,12 @@ | |||
131 | 23 | from ...sixish import viewitems | 23 | from ...sixish import viewitems |
132 | 24 | 24 | ||
133 | 25 | lazy_import(globals(), """ | 25 | lazy_import(globals(), """ |
134 | 26 | from breezy import errors | ||
135 | 27 | from breezy.bzr.smart.client import _SmartClient | 26 | from breezy.bzr.smart.client import _SmartClient |
136 | 28 | from breezy.transport import get_transport | 27 | from breezy.transport import get_transport |
137 | 29 | """) | 28 | """) |
138 | 30 | 29 | ||
139 | 30 | from breezy import errors | ||
140 | 31 | |||
141 | 31 | 32 | ||
142 | 32 | class cmd_ping(Command): | 33 | class cmd_ping(Command): |
143 | 33 | """Pings a Bazaar smart server. | 34 | """Pings a Bazaar smart server. |
144 | 34 | 35 | ||
145 | === modified file 'breezy/bzr/versionedfile.py' | |||
146 | --- breezy/bzr/versionedfile.py 2019-06-16 15:20:09 +0000 | |||
147 | +++ breezy/bzr/versionedfile.py 2020-01-11 17:50:43 +0000 | |||
148 | @@ -29,7 +29,6 @@ | |||
149 | 29 | from breezy import ( | 29 | from breezy import ( |
150 | 30 | annotate, | 30 | annotate, |
151 | 31 | bencode, | 31 | bencode, |
152 | 32 | errors, | ||
153 | 33 | graph as _mod_graph, | 32 | graph as _mod_graph, |
154 | 34 | osutils, | 33 | osutils, |
155 | 35 | multiparent, | 34 | multiparent, |
156 | @@ -43,6 +42,9 @@ | |||
157 | 43 | knit, | 42 | knit, |
158 | 44 | ) | 43 | ) |
159 | 45 | """) | 44 | """) |
160 | 45 | from .. import ( | ||
161 | 46 | errors, | ||
162 | 47 | ) | ||
163 | 46 | from ..registry import Registry | 48 | from ..registry import Registry |
164 | 47 | from ..sixish import ( | 49 | from ..sixish import ( |
165 | 48 | BytesIO, | 50 | BytesIO, |
166 | 49 | 51 | ||
167 | === modified file 'breezy/bzr/workingtree_4.py' | |||
168 | --- breezy/bzr/workingtree_4.py 2020-01-11 14:56:33 +0000 | |||
169 | +++ breezy/bzr/workingtree_4.py 2020-01-11 17:50:43 +0000 | |||
170 | @@ -38,7 +38,6 @@ | |||
171 | 38 | cleanup, | 38 | cleanup, |
172 | 39 | controldir, | 39 | controldir, |
173 | 40 | debug, | 40 | debug, |
174 | 41 | errors, | ||
175 | 42 | filters as _mod_filters, | 41 | filters as _mod_filters, |
176 | 43 | osutils, | 42 | osutils, |
177 | 44 | revision as _mod_revision, | 43 | revision as _mod_revision, |
178 | @@ -53,6 +52,9 @@ | |||
179 | 53 | ) | 52 | ) |
180 | 54 | """) | 53 | """) |
181 | 55 | 54 | ||
182 | 55 | from .. import ( | ||
183 | 56 | errors, | ||
184 | 57 | ) | ||
185 | 56 | from .inventory import Inventory, ROOT_ID, entry_factory | 58 | from .inventory import Inventory, ROOT_ID, entry_factory |
186 | 57 | from ..lock import LogicalLockResult | 59 | from ..lock import LogicalLockResult |
187 | 58 | from ..lockable_files import LockableFiles | 60 | from ..lockable_files import LockableFiles |
188 | 59 | 61 | ||
189 | === modified file 'breezy/cmd_version_info.py' | |||
190 | --- breezy/cmd_version_info.py 2018-11-12 01:41:38 +0000 | |||
191 | +++ breezy/cmd_version_info.py 2020-01-11 17:50:43 +0000 | |||
192 | @@ -23,13 +23,15 @@ | |||
193 | 23 | lazy_import(globals(), """ | 23 | lazy_import(globals(), """ |
194 | 24 | from breezy import ( | 24 | from breezy import ( |
195 | 25 | branch, | 25 | branch, |
196 | 26 | errors, | ||
197 | 27 | version_info_formats, | 26 | version_info_formats, |
198 | 28 | workingtree, | 27 | workingtree, |
199 | 29 | ) | 28 | ) |
200 | 30 | from breezy.i18n import gettext | 29 | from breezy.i18n import gettext |
201 | 31 | """) | 30 | """) |
202 | 32 | 31 | ||
203 | 32 | from . import ( | ||
204 | 33 | errors, | ||
205 | 34 | ) | ||
206 | 33 | from .commands import Command | 35 | from .commands import Command |
207 | 34 | from .option import Option, RegistryOption | 36 | from .option import Option, RegistryOption |
208 | 35 | from .sixish import text_type | 37 | from .sixish import text_type |
209 | 36 | 38 | ||
210 | === modified file 'breezy/conflicts.py' | |||
211 | --- breezy/conflicts.py 2019-06-22 11:16:17 +0000 | |||
212 | +++ breezy/conflicts.py 2020-01-11 17:50:43 +0000 | |||
213 | @@ -27,7 +27,6 @@ | |||
214 | 27 | import errno | 27 | import errno |
215 | 28 | 28 | ||
216 | 29 | from breezy import ( | 29 | from breezy import ( |
217 | 30 | errors, | ||
218 | 31 | osutils, | 30 | osutils, |
219 | 32 | rio, | 31 | rio, |
220 | 33 | trace, | 32 | trace, |
221 | @@ -38,6 +37,7 @@ | |||
222 | 38 | """) | 37 | """) |
223 | 39 | from . import ( | 38 | from . import ( |
224 | 40 | cache_utf8, | 39 | cache_utf8, |
225 | 40 | errors, | ||
226 | 41 | commands, | 41 | commands, |
227 | 42 | option, | 42 | option, |
228 | 43 | registry, | 43 | registry, |
229 | 44 | 44 | ||
230 | === modified file 'breezy/diff.py' | |||
231 | --- breezy/diff.py 2019-12-23 01:39:21 +0000 | |||
232 | +++ breezy/diff.py 2020-01-11 17:50:43 +0000 | |||
233 | @@ -31,7 +31,6 @@ | |||
234 | 31 | from breezy import ( | 31 | from breezy import ( |
235 | 32 | cleanup, | 32 | cleanup, |
236 | 33 | controldir, | 33 | controldir, |
237 | 34 | errors, | ||
238 | 35 | osutils, | 34 | osutils, |
239 | 36 | textfile, | 35 | textfile, |
240 | 37 | timestamp, | 36 | timestamp, |
241 | @@ -42,6 +41,9 @@ | |||
242 | 42 | from breezy.i18n import gettext | 41 | from breezy.i18n import gettext |
243 | 43 | """) | 42 | """) |
244 | 44 | 43 | ||
245 | 44 | from . import ( | ||
246 | 45 | errors, | ||
247 | 46 | ) | ||
248 | 45 | from .registry import ( | 47 | from .registry import ( |
249 | 46 | Registry, | 48 | Registry, |
250 | 47 | ) | 49 | ) |
251 | 48 | 50 | ||
252 | === modified file 'breezy/errors.py' | |||
253 | --- breezy/errors.py 2019-09-01 16:44:05 +0000 | |||
254 | +++ breezy/errors.py 2020-01-11 17:50:43 +0000 | |||
255 | @@ -2027,41 +2027,6 @@ | |||
256 | 2027 | self.revision_id = revision_id | 2027 | self.revision_id = revision_id |
257 | 2028 | 2028 | ||
258 | 2029 | 2029 | ||
259 | 2030 | class IllegalUseOfScopeReplacer(InternalBzrError): | ||
260 | 2031 | |||
261 | 2032 | _fmt = ("ScopeReplacer object %(name)r was used incorrectly:" | ||
262 | 2033 | " %(msg)s%(extra)s") | ||
263 | 2034 | |||
264 | 2035 | def __init__(self, name, msg, extra=None): | ||
265 | 2036 | BzrError.__init__(self) | ||
266 | 2037 | self.name = name | ||
267 | 2038 | self.msg = msg | ||
268 | 2039 | if extra: | ||
269 | 2040 | self.extra = ': ' + str(extra) | ||
270 | 2041 | else: | ||
271 | 2042 | self.extra = '' | ||
272 | 2043 | |||
273 | 2044 | |||
274 | 2045 | class InvalidImportLine(InternalBzrError): | ||
275 | 2046 | |||
276 | 2047 | _fmt = "Not a valid import statement: %(msg)\n%(text)s" | ||
277 | 2048 | |||
278 | 2049 | def __init__(self, text, msg): | ||
279 | 2050 | BzrError.__init__(self) | ||
280 | 2051 | self.text = text | ||
281 | 2052 | self.msg = msg | ||
282 | 2053 | |||
283 | 2054 | |||
284 | 2055 | class ImportNameCollision(InternalBzrError): | ||
285 | 2056 | |||
286 | 2057 | _fmt = ("Tried to import an object to the same name as" | ||
287 | 2058 | " an existing object. %(name)s") | ||
288 | 2059 | |||
289 | 2060 | def __init__(self, name): | ||
290 | 2061 | BzrError.__init__(self) | ||
291 | 2062 | self.name = name | ||
292 | 2063 | |||
293 | 2064 | |||
294 | 2065 | class NotAMergeDirective(BzrError): | 2030 | class NotAMergeDirective(BzrError): |
295 | 2066 | """File starting with %(firstline)r is not a merge directive""" | 2031 | """File starting with %(firstline)r is not a merge directive""" |
296 | 2067 | 2032 | ||
297 | 2068 | 2033 | ||
298 | === modified file 'breezy/filters/__init__.py' | |||
299 | --- breezy/filters/__init__.py 2018-11-11 04:08:32 +0000 | |||
300 | +++ breezy/filters/__init__.py 2020-01-11 17:50:43 +0000 | |||
301 | @@ -48,12 +48,15 @@ | |||
302 | 48 | lazy_import(globals(), """ | 48 | lazy_import(globals(), """ |
303 | 49 | from breezy import ( | 49 | from breezy import ( |
304 | 50 | config, | 50 | config, |
305 | 51 | errors, | ||
306 | 52 | osutils, | 51 | osutils, |
307 | 53 | registry, | 52 | registry, |
308 | 54 | ) | 53 | ) |
309 | 55 | """) | 54 | """) |
310 | 56 | 55 | ||
311 | 56 | from .. import ( | ||
312 | 57 | errors, | ||
313 | 58 | ) | ||
314 | 59 | |||
315 | 57 | 60 | ||
316 | 58 | class ContentFilter(object): | 61 | class ContentFilter(object): |
317 | 59 | 62 | ||
318 | 60 | 63 | ||
319 | === modified file 'breezy/foreign.py' | |||
320 | --- breezy/foreign.py 2018-11-18 19:48:57 +0000 | |||
321 | +++ breezy/foreign.py 2020-01-11 17:50:43 +0000 | |||
322 | @@ -24,13 +24,10 @@ | |||
323 | 24 | ) | 24 | ) |
324 | 25 | from .repository import Repository | 25 | from .repository import Repository |
325 | 26 | from .revision import Revision | 26 | from .revision import Revision |
329 | 27 | from .lazy_import import lazy_import | 27 | from . import ( |
327 | 28 | lazy_import(globals(), """ | ||
328 | 29 | from breezy import ( | ||
330 | 30 | errors, | 28 | errors, |
331 | 31 | registry, | 29 | registry, |
332 | 32 | ) | 30 | ) |
333 | 33 | """) | ||
334 | 34 | 31 | ||
335 | 35 | 32 | ||
336 | 36 | class VcsMapping(object): | 33 | class VcsMapping(object): |
337 | 37 | 34 | ||
338 | === modified file 'breezy/ignores.py' | |||
339 | --- breezy/ignores.py 2019-11-19 18:10:28 +0000 | |||
340 | +++ breezy/ignores.py 2020-01-11 17:50:43 +0000 | |||
341 | @@ -27,11 +27,13 @@ | |||
342 | 27 | lazy_import(globals(), """ | 27 | lazy_import(globals(), """ |
343 | 28 | from breezy import ( | 28 | from breezy import ( |
344 | 29 | atomicfile, | 29 | atomicfile, |
345 | 30 | bedding, | ||
346 | 31 | globbing, | 30 | globbing, |
347 | 32 | trace, | 31 | trace, |
348 | 33 | ) | 32 | ) |
349 | 34 | """) | 33 | """) |
350 | 34 | from . import ( | ||
351 | 35 | bedding, | ||
352 | 36 | ) | ||
353 | 35 | 37 | ||
354 | 36 | # ~/.config/breezy/ignore will be filled out using | 38 | # ~/.config/breezy/ignore will be filled out using |
355 | 37 | # this ignore list, if it does not exist | 39 | # this ignore list, if it does not exist |
356 | 38 | 40 | ||
357 | === modified file 'breezy/lazy_import.py' | |||
358 | --- breezy/lazy_import.py 2018-11-12 01:41:38 +0000 | |||
359 | +++ breezy/lazy_import.py 2020-01-11 17:50:43 +0000 | |||
360 | @@ -43,6 +43,43 @@ | |||
361 | 43 | 43 | ||
362 | 44 | from __future__ import absolute_import | 44 | from __future__ import absolute_import |
363 | 45 | 45 | ||
364 | 46 | from .errors import BzrError, InternalBzrError | ||
365 | 47 | |||
366 | 48 | |||
367 | 49 | class ImportNameCollision(InternalBzrError): | ||
368 | 50 | |||
369 | 51 | _fmt = ("Tried to import an object to the same name as" | ||
370 | 52 | " an existing object. %(name)s") | ||
371 | 53 | |||
372 | 54 | def __init__(self, name): | ||
373 | 55 | BzrError.__init__(self) | ||
374 | 56 | self.name = name | ||
375 | 57 | |||
376 | 58 | |||
377 | 59 | class IllegalUseOfScopeReplacer(InternalBzrError): | ||
378 | 60 | |||
379 | 61 | _fmt = ("ScopeReplacer object %(name)r was used incorrectly:" | ||
380 | 62 | " %(msg)s%(extra)s") | ||
381 | 63 | |||
382 | 64 | def __init__(self, name, msg, extra=None): | ||
383 | 65 | BzrError.__init__(self) | ||
384 | 66 | self.name = name | ||
385 | 67 | self.msg = msg | ||
386 | 68 | if extra: | ||
387 | 69 | self.extra = ': ' + str(extra) | ||
388 | 70 | else: | ||
389 | 71 | self.extra = '' | ||
390 | 72 | |||
391 | 73 | |||
392 | 74 | class InvalidImportLine(InternalBzrError): | ||
393 | 75 | |||
394 | 76 | _fmt = "Not a valid import statement: %(msg)\n%(text)s" | ||
395 | 77 | |||
396 | 78 | def __init__(self, text, msg): | ||
397 | 79 | BzrError.__init__(self) | ||
398 | 80 | self.text = text | ||
399 | 81 | self.msg = msg | ||
400 | 82 | |||
401 | 46 | 83 | ||
402 | 47 | class ScopeReplacer(object): | 84 | class ScopeReplacer(object): |
403 | 48 | """A lazy object that will replace itself in the appropriate scope. | 85 | """A lazy object that will replace itself in the appropriate scope. |
404 | @@ -84,8 +121,9 @@ | |||
405 | 84 | scope = object.__getattribute__(self, '_scope') | 121 | scope = object.__getattribute__(self, '_scope') |
406 | 85 | obj = factory(self, scope, name) | 122 | obj = factory(self, scope, name) |
407 | 86 | if obj is self: | 123 | if obj is self: |
410 | 87 | raise errors.IllegalUseOfScopeReplacer(name, msg="Object tried" | 124 | raise IllegalUseOfScopeReplacer( |
411 | 88 | " to replace itself, check it's not using its own scope.") | 125 | name, msg="Object tried" |
412 | 126 | " to replace itself, check it's not using its own scope.") | ||
413 | 89 | 127 | ||
414 | 90 | # Check if another thread has jumped in while obj was generated. | 128 | # Check if another thread has jumped in while obj was generated. |
415 | 91 | real_obj = object.__getattribute__(self, '_real_obj') | 129 | real_obj = object.__getattribute__(self, '_real_obj') |
416 | @@ -99,7 +137,7 @@ | |||
417 | 99 | 137 | ||
418 | 100 | # Raise if proxying is disabled as obj has already been generated. | 138 | # Raise if proxying is disabled as obj has already been generated. |
419 | 101 | if not ScopeReplacer._should_proxy: | 139 | if not ScopeReplacer._should_proxy: |
421 | 102 | raise errors.IllegalUseOfScopeReplacer( | 140 | raise IllegalUseOfScopeReplacer( |
422 | 103 | name, msg="Object already replaced, did you assign it" | 141 | name, msg="Object already replaced, did you assign it" |
423 | 104 | " to another variable?") | 142 | " to another variable?") |
424 | 105 | return real_obj | 143 | return real_obj |
425 | @@ -260,8 +298,8 @@ | |||
426 | 260 | elif line.startswith('from '): | 298 | elif line.startswith('from '): |
427 | 261 | self._convert_from_str(line) | 299 | self._convert_from_str(line) |
428 | 262 | else: | 300 | else: |
431 | 263 | raise errors.InvalidImportLine(line, | 301 | raise InvalidImportLine( |
432 | 264 | "doesn't start with 'import ' or 'from '") | 302 | line, "doesn't start with 'import ' or 'from '") |
433 | 265 | 303 | ||
434 | 266 | def _convert_import_str(self, import_str): | 304 | def _convert_import_str(self, import_str): |
435 | 267 | """This converts a import string into an import map. | 305 | """This converts a import string into an import map. |
436 | @@ -286,7 +324,7 @@ | |||
437 | 286 | name = as_hunks[1].strip() | 324 | name = as_hunks[1].strip() |
438 | 287 | module_path = as_hunks[0].strip().split('.') | 325 | module_path = as_hunks[0].strip().split('.') |
439 | 288 | if name in self.imports: | 326 | if name in self.imports: |
441 | 289 | raise errors.ImportNameCollision(name) | 327 | raise ImportNameCollision(name) |
442 | 290 | if not module_path[0]: | 328 | if not module_path[0]: |
443 | 291 | raise ImportError(path) | 329 | raise ImportError(path) |
444 | 292 | # No children available in 'import foo as bar' | 330 | # No children available in 'import foo as bar' |
445 | @@ -345,7 +383,7 @@ | |||
446 | 345 | else: | 383 | else: |
447 | 346 | name = module = path | 384 | name = module = path |
448 | 347 | if name in self.imports: | 385 | if name in self.imports: |
450 | 348 | raise errors.ImportNameCollision(name) | 386 | raise ImportNameCollision(name) |
451 | 349 | self.imports[name] = (from_module_path, module, {}) | 387 | self.imports[name] = (from_module_path, module, {}) |
452 | 350 | 388 | ||
453 | 351 | def _canonicalize_import_text(self, text): | 389 | def _canonicalize_import_text(self, text): |
454 | @@ -377,7 +415,7 @@ | |||
455 | 377 | else: | 415 | else: |
456 | 378 | out.append(line.replace('(', '').replace(')', '')) | 416 | out.append(line.replace('(', '').replace(')', '')) |
457 | 379 | if cur is not None: | 417 | if cur is not None: |
459 | 380 | raise errors.InvalidImportLine(cur, 'Unmatched parenthesis') | 418 | raise InvalidImportLine(cur, 'Unmatched parenthesis') |
460 | 381 | return out | 419 | return out |
461 | 382 | 420 | ||
462 | 383 | 421 | ||
463 | @@ -408,12 +446,3 @@ | |||
464 | 408 | # This is just a helper around ImportProcessor.lazy_import | 446 | # This is just a helper around ImportProcessor.lazy_import |
465 | 409 | proc = ImportProcessor(lazy_import_class=lazy_import_class) | 447 | proc = ImportProcessor(lazy_import_class=lazy_import_class) |
466 | 410 | return proc.lazy_import(scope, text) | 448 | return proc.lazy_import(scope, text) |
467 | 411 | |||
468 | 412 | |||
469 | 413 | # The only module that this module depends on is 'breezy.errors'. But it | ||
470 | 414 | # can actually be imported lazily, since we only need it if there is a | ||
471 | 415 | # problem. | ||
472 | 416 | |||
473 | 417 | lazy_import(globals(), """ | ||
474 | 418 | from breezy import errors | ||
475 | 419 | """) | ||
476 | 420 | 449 | ||
477 | === modified file 'breezy/lockable_files.py' | |||
478 | --- breezy/lockable_files.py 2018-11-11 04:08:32 +0000 | |||
479 | +++ breezy/lockable_files.py 2020-01-11 17:50:43 +0000 | |||
480 | @@ -20,13 +20,15 @@ | |||
481 | 20 | lazy_import(globals(), """ | 20 | lazy_import(globals(), """ |
482 | 21 | from breezy import ( | 21 | from breezy import ( |
483 | 22 | counted_lock, | 22 | counted_lock, |
484 | 23 | errors, | ||
485 | 24 | lock, | 23 | lock, |
486 | 25 | transactions, | 24 | transactions, |
487 | 26 | urlutils, | 25 | urlutils, |
488 | 27 | ) | 26 | ) |
489 | 28 | """) | 27 | """) |
490 | 29 | 28 | ||
491 | 29 | from . import ( | ||
492 | 30 | errors, | ||
493 | 31 | ) | ||
494 | 30 | from .decorators import ( | 32 | from .decorators import ( |
495 | 31 | only_raises, | 33 | only_raises, |
496 | 32 | ) | 34 | ) |
497 | 33 | 35 | ||
498 | === modified file 'breezy/merge_directive.py' | |||
499 | --- breezy/merge_directive.py 2019-07-27 22:47:49 +0000 | |||
500 | +++ breezy/merge_directive.py 2020-01-11 17:50:43 +0000 | |||
501 | @@ -26,7 +26,6 @@ | |||
502 | 26 | cleanup, | 26 | cleanup, |
503 | 27 | diff, | 27 | diff, |
504 | 28 | email_message, | 28 | email_message, |
505 | 29 | errors, | ||
506 | 30 | gpg, | 29 | gpg, |
507 | 31 | hooks, | 30 | hooks, |
508 | 32 | registry, | 31 | registry, |
509 | @@ -42,6 +41,9 @@ | |||
510 | 42 | serializer as bundle_serializer, | 41 | serializer as bundle_serializer, |
511 | 43 | ) | 42 | ) |
512 | 44 | """) | 43 | """) |
513 | 44 | from . import ( | ||
514 | 45 | errors, | ||
515 | 46 | ) | ||
516 | 45 | from .sixish import ( | 47 | from .sixish import ( |
517 | 46 | BytesIO, | 48 | BytesIO, |
518 | 47 | ) | 49 | ) |
519 | 48 | 50 | ||
520 | === modified file 'breezy/mergeable.py' | |||
521 | --- breezy/mergeable.py 2019-06-30 10:50:40 +0000 | |||
522 | +++ breezy/mergeable.py 2020-01-11 17:50:43 +0000 | |||
523 | @@ -19,7 +19,6 @@ | |||
524 | 19 | from .lazy_import import lazy_import | 19 | from .lazy_import import lazy_import |
525 | 20 | lazy_import(globals(), """ | 20 | lazy_import(globals(), """ |
526 | 21 | from breezy import ( | 21 | from breezy import ( |
527 | 22 | errors, | ||
528 | 23 | transport as _mod_transport, | 22 | transport as _mod_transport, |
529 | 24 | urlutils, | 23 | urlutils, |
530 | 25 | ) | 24 | ) |
531 | @@ -28,6 +27,9 @@ | |||
532 | 28 | from breezy.i18n import gettext | 27 | from breezy.i18n import gettext |
533 | 29 | """) | 28 | """) |
534 | 30 | 29 | ||
535 | 30 | from . import ( | ||
536 | 31 | errors, | ||
537 | 32 | ) | ||
538 | 31 | from .sixish import ( | 33 | from .sixish import ( |
539 | 32 | BytesIO, | 34 | BytesIO, |
540 | 33 | ) | 35 | ) |
541 | 34 | 36 | ||
542 | === modified file 'breezy/multiparent.py' | |||
543 | --- breezy/multiparent.py 2019-03-02 21:46:18 +0000 | |||
544 | +++ breezy/multiparent.py 2020-01-11 17:50:43 +0000 | |||
545 | @@ -28,10 +28,12 @@ | |||
546 | 28 | 28 | ||
547 | 29 | from breezy import ( | 29 | from breezy import ( |
548 | 30 | bencode, | 30 | bencode, |
549 | 31 | errors, | ||
550 | 32 | ui, | 31 | ui, |
551 | 33 | ) | 32 | ) |
552 | 34 | """) | 33 | """) |
553 | 34 | from . import ( | ||
554 | 35 | errors, | ||
555 | 36 | ) | ||
556 | 35 | from .i18n import gettext | 37 | from .i18n import gettext |
557 | 36 | from .sixish import ( | 38 | from .sixish import ( |
558 | 37 | BytesIO, | 39 | BytesIO, |
559 | 38 | 40 | ||
560 | === modified file 'breezy/plugin.py' | |||
561 | --- breezy/plugin.py 2019-10-14 00:07:00 +0000 | |||
562 | +++ breezy/plugin.py 2020-01-11 17:50:43 +0000 | |||
563 | @@ -51,12 +51,15 @@ | |||
564 | 51 | from breezy import ( | 51 | from breezy import ( |
565 | 52 | bedding, | 52 | bedding, |
566 | 53 | debug, | 53 | debug, |
567 | 54 | errors, | ||
568 | 55 | help_topics, | 54 | help_topics, |
569 | 56 | trace, | 55 | trace, |
570 | 57 | ) | 56 | ) |
571 | 58 | """) | 57 | """) |
572 | 59 | 58 | ||
573 | 59 | from . import ( | ||
574 | 60 | errors, | ||
575 | 61 | ) | ||
576 | 62 | |||
577 | 60 | 63 | ||
578 | 61 | _MODULE_PREFIX = "breezy.plugins." | 64 | _MODULE_PREFIX = "breezy.plugins." |
579 | 62 | 65 | ||
580 | 63 | 66 | ||
581 | === added directory 'breezy/plugins/hg' | |||
582 | === added file 'breezy/plugins/hg/__init__.py' | |||
583 | --- breezy/plugins/hg/__init__.py 1970-01-01 00:00:00 +0000 | |||
584 | +++ breezy/plugins/hg/__init__.py 2020-01-11 17:50:43 +0000 | |||
585 | @@ -0,0 +1,177 @@ | |||
586 | 1 | # Copyright (C) 2019 Jelmer Vernooij <jelmer@jelmer.uk> | ||
587 | 2 | # | ||
588 | 3 | # This program is free software; you can redistribute it and/or modify | ||
589 | 4 | # it under the terms of the GNU General Public License as published by | ||
590 | 5 | # the Free Software Foundation; version 3 of the License or | ||
591 | 6 | # (at your option) a later version. | ||
592 | 7 | # | ||
593 | 8 | # This program is distributed in the hope that it will be useful, | ||
594 | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
595 | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
596 | 11 | # GNU General Public License for more details. | ||
597 | 12 | # | ||
598 | 13 | # You should have received a copy of the GNU General Public License | ||
599 | 14 | # along with this program; if not, write to the Free Software | ||
600 | 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
601 | 16 | |||
602 | 17 | """Mercurial foreign branch support. | ||
603 | 18 | |||
604 | 19 | Currently only tells the user that Mercurial is not supported. | ||
605 | 20 | """ | ||
606 | 21 | |||
607 | 22 | from __future__ import absolute_import | ||
608 | 23 | |||
609 | 24 | from ... import ( | ||
610 | 25 | controldir, | ||
611 | 26 | errors, | ||
612 | 27 | ) | ||
613 | 28 | |||
614 | 29 | from ... import version_info # noqa: F401 | ||
615 | 30 | |||
616 | 31 | |||
617 | 32 | class MercurialUnsupportedError(errors.UnsupportedFormatError): | ||
618 | 33 | |||
619 | 34 | _fmt = ('Mercurial branches are not yet supported. ' | ||
620 | 35 | 'To convert Mercurial branches to Bazaar branches or vice versa, ' | ||
621 | 36 | 'use the fastimport format. ') | ||
622 | 37 | |||
623 | 38 | |||
624 | 39 | class LocalHgDirFormat(controldir.ControlDirFormat): | ||
625 | 40 | """Mercurial directory format.""" | ||
626 | 41 | |||
627 | 42 | def get_converter(self): | ||
628 | 43 | raise NotImplementedError(self.get_converter) | ||
629 | 44 | |||
630 | 45 | def get_format_description(self): | ||
631 | 46 | return "Local Mercurial control directory" | ||
632 | 47 | |||
633 | 48 | def initialize_on_transport(self, transport): | ||
634 | 49 | raise errors.UninitializableFormat(self) | ||
635 | 50 | |||
636 | 51 | def is_supported(self): | ||
637 | 52 | return False | ||
638 | 53 | |||
639 | 54 | def supports_transport(self, transport): | ||
640 | 55 | return False | ||
641 | 56 | |||
642 | 57 | def check_support_status(self, allow_unsupported, recommend_upgrade=True, | ||
643 | 58 | basedir=None): | ||
644 | 59 | raise MercurialUnsupportedError() | ||
645 | 60 | |||
646 | 61 | def open(self, transport): | ||
647 | 62 | # Raise NotBranchError if there is nothing there | ||
648 | 63 | LocalHgProber().probe_transport(transport) | ||
649 | 64 | raise NotImplementedError(self.open) | ||
650 | 65 | |||
651 | 66 | |||
652 | 67 | class LocalHgProber(controldir.Prober): | ||
653 | 68 | |||
654 | 69 | @classmethod | ||
655 | 70 | def priority(klass, transport): | ||
656 | 71 | return 100 | ||
657 | 72 | |||
658 | 73 | @staticmethod | ||
659 | 74 | def _has_hg_dumb_repository(transport): | ||
660 | 75 | try: | ||
661 | 76 | return transport.has_any([".hg/requires", ".hg/00changelog.i"]) | ||
662 | 77 | except (errors.NoSuchFile, errors.PermissionDenied, | ||
663 | 78 | errors.InvalidHttpResponse): | ||
664 | 79 | return False | ||
665 | 80 | |||
666 | 81 | @classmethod | ||
667 | 82 | def probe_transport(klass, transport): | ||
668 | 83 | """Our format is present if the transport has a '.hg/' subdir.""" | ||
669 | 84 | if klass._has_hg_dumb_repository(transport): | ||
670 | 85 | return HgDirFormat() | ||
671 | 86 | raise errors.NotBranchError(path=transport.base) | ||
672 | 87 | |||
673 | 88 | @classmethod | ||
674 | 89 | def known_formats(cls): | ||
675 | 90 | return [LocalHgDirFormat()] | ||
676 | 91 | |||
677 | 92 | |||
678 | 93 | class SmartHgDirFormat(controldir.ControlDirFormat): | ||
679 | 94 | """Mercurial directory format.""" | ||
680 | 95 | |||
681 | 96 | def get_converter(self): | ||
682 | 97 | raise NotImplementedError(self.get_converter) | ||
683 | 98 | |||
684 | 99 | def get_format_description(self): | ||
685 | 100 | return "Smart Mercurial control directory" | ||
686 | 101 | |||
687 | 102 | def initialize_on_transport(self, transport): | ||
688 | 103 | raise errors.UninitializableFormat(self) | ||
689 | 104 | |||
690 | 105 | def is_supported(self): | ||
691 | 106 | return False | ||
692 | 107 | |||
693 | 108 | def supports_transport(self, transport): | ||
694 | 109 | return False | ||
695 | 110 | |||
696 | 111 | def check_support_status(self, allow_unsupported, recommend_upgrade=True, | ||
697 | 112 | basedir=None): | ||
698 | 113 | raise MercurialUnsupportedError() | ||
699 | 114 | |||
700 | 115 | def open(self, transport): | ||
701 | 116 | # Raise NotBranchError if there is nothing there | ||
702 | 117 | SmartHgProber().probe_transport(transport) | ||
703 | 118 | raise NotImplementedError(self.open) | ||
704 | 119 | |||
705 | 120 | |||
706 | 121 | class SmartHgProber(controldir.Prober): | ||
707 | 122 | |||
708 | 123 | # Perhaps retrieve list from mercurial.hg.schemes ? | ||
709 | 124 | _supported_schemes = ["http", "https"] | ||
710 | 125 | |||
711 | 126 | @classmethod | ||
712 | 127 | def priority(klass, transport): | ||
713 | 128 | return 90 | ||
714 | 129 | |||
715 | 130 | @staticmethod | ||
716 | 131 | def _has_hg_http_smart_server(transport, external_url): | ||
717 | 132 | """Check if there is a Mercurial smart server at the remote location. | ||
718 | 133 | |||
719 | 134 | :param transport: Transport to check | ||
720 | 135 | :param externa_url: External URL for transport | ||
721 | 136 | :return: Boolean indicating whether transport is backed onto hg | ||
722 | 137 | """ | ||
723 | 138 | from breezy.urlutils import urlparse | ||
724 | 139 | parsed_url = urlparse.urlparse(external_url) | ||
725 | 140 | parsed_url = parsed_url._replace( | ||
726 | 141 | query='cmd=capabilities', path=parsed_url.path.rstrip('/') + '/hg') | ||
727 | 142 | url = urlparse.urlunparse(parsed_url) | ||
728 | 143 | resp = transport.request( | ||
729 | 144 | 'GET', url, headers={'Accept': 'application/mercurial-0.1'}) | ||
730 | 145 | if resp.status == 404: | ||
731 | 146 | return False | ||
732 | 147 | ct = resp.getheader("Content-Type") | ||
733 | 148 | if ct is None: | ||
734 | 149 | return False | ||
735 | 150 | return ct.startswith("application/mercurial") | ||
736 | 151 | |||
737 | 152 | @classmethod | ||
738 | 153 | def probe_transport(klass, transport): | ||
739 | 154 | try: | ||
740 | 155 | external_url = transport.external_url() | ||
741 | 156 | except errors.InProcessTransport: | ||
742 | 157 | raise errors.NotBranchError(path=transport.base) | ||
743 | 158 | scheme = external_url.split(":")[0] | ||
744 | 159 | if scheme not in klass._supported_schemes: | ||
745 | 160 | raise errors.NotBranchError(path=transport.base) | ||
746 | 161 | from breezy import urlutils | ||
747 | 162 | external_url = urlutils.split_segment_parameters(external_url)[0] | ||
748 | 163 | # Explicitly check for .hg directories here, so we avoid | ||
749 | 164 | # loading foreign branches through Mercurial. | ||
750 | 165 | if (external_url.startswith("http:") or | ||
751 | 166 | external_url.startswith("https:")): | ||
752 | 167 | if klass._has_hg_http_smart_server(transport, external_url): | ||
753 | 168 | return SmartHgDirFormat() | ||
754 | 169 | raise errors.NotBranchError(path=transport.base) | ||
755 | 170 | |||
756 | 171 | @classmethod | ||
757 | 172 | def known_formats(cls): | ||
758 | 173 | return [SmartHgDirFormat()] | ||
759 | 174 | |||
760 | 175 | |||
761 | 176 | controldir.ControlDirFormat.register_prober(LocalHgProber) | ||
762 | 177 | controldir.ControlDirFormat.register_prober(SmartHgProber) | ||
763 | 0 | 178 | ||
764 | === modified file 'breezy/plugins/netrc_credential_store/__init__.py' | |||
765 | --- breezy/plugins/netrc_credential_store/__init__.py 2018-11-11 04:08:32 +0000 | |||
766 | +++ breezy/plugins/netrc_credential_store/__init__.py 2020-01-11 17:50:43 +0000 | |||
767 | @@ -23,16 +23,13 @@ | |||
768 | 23 | 23 | ||
769 | 24 | from ... import ( | 24 | from ... import ( |
770 | 25 | config, | 25 | config, |
771 | 26 | errors, | ||
772 | 26 | lazy_import, | 27 | lazy_import, |
773 | 27 | ) | 28 | ) |
774 | 28 | 29 | ||
775 | 29 | lazy_import.lazy_import(globals(), """ | 30 | lazy_import.lazy_import(globals(), """ |
776 | 30 | import errno | 31 | import errno |
777 | 31 | import netrc | 32 | import netrc |
778 | 32 | |||
779 | 33 | from breezy import ( | ||
780 | 34 | errors, | ||
781 | 35 | ) | ||
782 | 36 | """) | 33 | """) |
783 | 37 | 34 | ||
784 | 38 | 35 | ||
785 | 39 | 36 | ||
786 | === modified file 'breezy/plugins/upload/cmds.py' | |||
787 | --- breezy/plugins/upload/cmds.py 2019-09-21 23:05:12 +0000 | |||
788 | +++ breezy/plugins/upload/cmds.py 2020-01-11 17:50:43 +0000 | |||
789 | @@ -21,6 +21,7 @@ | |||
790 | 21 | from ... import ( | 21 | from ... import ( |
791 | 22 | commands, | 22 | commands, |
792 | 23 | config, | 23 | config, |
793 | 24 | errors, | ||
794 | 24 | lazy_import, | 25 | lazy_import, |
795 | 25 | option, | 26 | option, |
796 | 26 | osutils, | 27 | osutils, |
797 | @@ -30,7 +31,6 @@ | |||
798 | 30 | 31 | ||
799 | 31 | from breezy import ( | 32 | from breezy import ( |
800 | 32 | controldir, | 33 | controldir, |
801 | 33 | errors, | ||
802 | 34 | globbing, | 34 | globbing, |
803 | 35 | ignores, | 35 | ignores, |
804 | 36 | revision, | 36 | revision, |
805 | 37 | 37 | ||
806 | === modified file 'breezy/tag.py' | |||
807 | --- breezy/tag.py 2019-06-22 16:20:00 +0000 | |||
808 | +++ breezy/tag.py 2020-01-11 17:50:43 +0000 | |||
809 | @@ -40,11 +40,14 @@ | |||
810 | 40 | from breezy import ( | 40 | from breezy import ( |
811 | 41 | bencode, | 41 | bencode, |
812 | 42 | cleanup, | 42 | cleanup, |
813 | 43 | errors, | ||
814 | 44 | trace, | 43 | trace, |
815 | 45 | ) | 44 | ) |
816 | 46 | """) | 45 | """) |
817 | 47 | 46 | ||
818 | 47 | from . import ( | ||
819 | 48 | errors, | ||
820 | 49 | ) | ||
821 | 50 | |||
822 | 48 | 51 | ||
823 | 49 | def _reconcile_tags(source_dict, dest_dict, overwrite): | 52 | def _reconcile_tags(source_dict, dest_dict, overwrite): |
824 | 50 | """Do a two-way merge of two tag dictionaries. | 53 | """Do a two-way merge of two tag dictionaries. |
825 | 51 | 54 | ||
826 | === modified file 'breezy/tests/test_lazy_import.py' | |||
827 | --- breezy/tests/test_lazy_import.py 2018-11-11 04:08:32 +0000 | |||
828 | +++ breezy/tests/test_lazy_import.py 2020-01-11 17:50:43 +0000 | |||
829 | @@ -354,7 +354,7 @@ | |||
830 | 354 | 354 | ||
831 | 355 | # However, the next access on test_obj3 should raise an error | 355 | # However, the next access on test_obj3 should raise an error |
832 | 356 | # because only now are we able to detect the problem. | 356 | # because only now are we able to detect the problem. |
834 | 357 | self.assertRaises(errors.IllegalUseOfScopeReplacer, | 357 | self.assertRaises(lazy_import.IllegalUseOfScopeReplacer, |
835 | 358 | getattr, test_obj3, 'foo') | 358 | getattr, test_obj3, 'foo') |
836 | 359 | 359 | ||
837 | 360 | self.assertEqual([('__getattribute__', 'foo'), | 360 | self.assertEqual([('__getattribute__', 'foo'), |
838 | @@ -448,7 +448,7 @@ | |||
839 | 448 | 448 | ||
840 | 449 | self.assertEqual(InstrumentedReplacer, | 449 | self.assertEqual(InstrumentedReplacer, |
841 | 450 | object.__getattribute__(test_obj7, '__class__')) | 450 | object.__getattribute__(test_obj7, '__class__')) |
843 | 451 | e = self.assertRaises(errors.IllegalUseOfScopeReplacer, test_obj7) | 451 | e = self.assertRaises(lazy_import.IllegalUseOfScopeReplacer, test_obj7) |
844 | 452 | self.assertIn("replace itself", e.msg) | 452 | self.assertIn("replace itself", e.msg) |
845 | 453 | self.assertEqual([('__call__', (), {}), | 453 | self.assertEqual([('__call__', (), {}), |
846 | 454 | 'factory'], actions) | 454 | 'factory'], actions) |
847 | @@ -917,7 +917,7 @@ | |||
848 | 917 | 917 | ||
849 | 918 | def test_missing_trailing(self): | 918 | def test_missing_trailing(self): |
850 | 919 | proc = lazy_import.ImportProcessor() | 919 | proc = lazy_import.ImportProcessor() |
852 | 920 | self.assertRaises(errors.InvalidImportLine, | 920 | self.assertRaises(lazy_import.InvalidImportLine, |
853 | 921 | proc._canonicalize_import_text, | 921 | proc._canonicalize_import_text, |
854 | 922 | "from foo import (\n bar\n") | 922 | "from foo import (\n bar\n") |
855 | 923 | 923 | ||
856 | @@ -1016,13 +1016,13 @@ | |||
857 | 1016 | 1016 | ||
858 | 1017 | def test_incorrect_line(self): | 1017 | def test_incorrect_line(self): |
859 | 1018 | proc = lazy_import.ImportProcessor() | 1018 | proc = lazy_import.ImportProcessor() |
861 | 1019 | self.assertRaises(errors.InvalidImportLine, | 1019 | self.assertRaises(lazy_import.InvalidImportLine, |
862 | 1020 | proc._build_map, 'foo bar baz') | 1020 | proc._build_map, 'foo bar baz') |
864 | 1021 | self.assertRaises(errors.InvalidImportLine, | 1021 | self.assertRaises(lazy_import.InvalidImportLine, |
865 | 1022 | proc._build_map, 'improt foo') | 1022 | proc._build_map, 'improt foo') |
867 | 1023 | self.assertRaises(errors.InvalidImportLine, | 1023 | self.assertRaises(lazy_import.InvalidImportLine, |
868 | 1024 | proc._build_map, 'importfoo') | 1024 | proc._build_map, 'importfoo') |
870 | 1025 | self.assertRaises(errors.InvalidImportLine, | 1025 | self.assertRaises(lazy_import.InvalidImportLine, |
871 | 1026 | proc._build_map, 'fromimport') | 1026 | proc._build_map, 'fromimport') |
872 | 1027 | 1027 | ||
873 | 1028 | def test_name_collision(self): | 1028 | def test_name_collision(self): |
874 | @@ -1031,11 +1031,11 @@ | |||
875 | 1031 | 1031 | ||
876 | 1032 | # All of these would try to create an object with the | 1032 | # All of these would try to create an object with the |
877 | 1033 | # same name as an existing object. | 1033 | # same name as an existing object. |
879 | 1034 | self.assertRaises(errors.ImportNameCollision, | 1034 | self.assertRaises(lazy_import.ImportNameCollision, |
880 | 1035 | proc._build_map, 'import bar as foo') | 1035 | proc._build_map, 'import bar as foo') |
882 | 1036 | self.assertRaises(errors.ImportNameCollision, | 1036 | self.assertRaises(lazy_import.ImportNameCollision, |
883 | 1037 | proc._build_map, 'from foo import bar as foo') | 1037 | proc._build_map, 'from foo import bar as foo') |
885 | 1038 | self.assertRaises(errors.ImportNameCollision, | 1038 | self.assertRaises(lazy_import.ImportNameCollision, |
886 | 1039 | proc._build_map, 'from bar import foo') | 1039 | proc._build_map, 'from bar import foo') |
887 | 1040 | 1040 | ||
888 | 1041 | def test_relative_imports(self): | 1041 | def test_relative_imports(self): |
889 | 1042 | 1042 | ||
890 | === modified file 'breezy/trace.py' | |||
891 | --- breezy/trace.py 2019-07-13 14:35:12 +0000 | |||
892 | +++ breezy/trace.py 2020-01-11 17:50:43 +0000 | |||
893 | @@ -74,11 +74,13 @@ | |||
894 | 74 | from breezy import ( | 74 | from breezy import ( |
895 | 75 | bedding, | 75 | bedding, |
896 | 76 | debug, | 76 | debug, |
897 | 77 | errors, | ||
898 | 78 | osutils, | 77 | osutils, |
899 | 79 | ui, | 78 | ui, |
900 | 80 | ) | 79 | ) |
901 | 81 | """) | 80 | """) |
902 | 81 | from . import ( | ||
903 | 82 | errors, | ||
904 | 83 | ) | ||
905 | 82 | 84 | ||
906 | 83 | from .sixish import ( | 85 | from .sixish import ( |
907 | 84 | PY3, | 86 | PY3, |
908 | 85 | 87 | ||
909 | === modified file 'breezy/transport/http/__init__.py' | |||
910 | --- breezy/transport/http/__init__.py 2020-01-10 02:20:50 +0000 | |||
911 | +++ breezy/transport/http/__init__.py 2020-01-11 17:50:43 +0000 | |||
912 | @@ -1037,6 +1037,9 @@ | |||
913 | 1037 | newurl = headers.get('uri') | 1037 | newurl = headers.get('uri') |
914 | 1038 | else: | 1038 | else: |
915 | 1039 | return | 1039 | return |
916 | 1040 | |||
917 | 1041 | newurl = urljoin(req.get_full_url(), newurl) | ||
918 | 1042 | |||
919 | 1040 | if self._debuglevel >= 1: | 1043 | if self._debuglevel >= 1: |
920 | 1041 | print('Redirected to: %s (followed: %r)' % (newurl, | 1044 | print('Redirected to: %s (followed: %r)' % (newurl, |
921 | 1042 | req.follow_redirections)) | 1045 | req.follow_redirections)) |
922 | @@ -1044,8 +1047,6 @@ | |||
923 | 1044 | req.redirected_to = newurl | 1047 | req.redirected_to = newurl |
924 | 1045 | return fp | 1048 | return fp |
925 | 1046 | 1049 | ||
926 | 1047 | newurl = urljoin(req.get_full_url(), newurl) | ||
927 | 1048 | |||
928 | 1049 | # This call succeeds or raise an error. urllib_request returns | 1050 | # This call succeeds or raise an error. urllib_request returns |
929 | 1050 | # if redirect_request returns None, but our | 1051 | # if redirect_request returns None, but our |
930 | 1051 | # redirect_request never returns None. | 1052 | # redirect_request never returns None. |
931 | @@ -1830,6 +1831,7 @@ | |||
932 | 1830 | 400, | 1831 | 400, |
933 | 1831 | 403, | 1832 | 403, |
934 | 1832 | 404, # Not found | 1833 | 404, # Not found |
935 | 1834 | 405, # Method not allowed | ||
936 | 1833 | 416, | 1835 | 416, |
937 | 1834 | 422, | 1836 | 422, |
938 | 1835 | 501, # Not implemented | 1837 | 501, # Not implemented |
939 | @@ -2018,6 +2020,10 @@ | |||
940 | 2018 | return self._actual.code | 2020 | return self._actual.code |
941 | 2019 | 2021 | ||
942 | 2020 | @property | 2022 | @property |
943 | 2023 | def reason(self): | ||
944 | 2024 | return self._actual.reason | ||
945 | 2025 | |||
946 | 2026 | @property | ||
947 | 2021 | def data(self): | 2027 | def data(self): |
948 | 2022 | if self._data is None: | 2028 | if self._data is None: |
949 | 2023 | self._data = self._actual.read() | 2029 | self._data = self._actual.read() |
950 | @@ -2081,16 +2087,28 @@ | |||
951 | 2081 | if range_header is not None: | 2087 | if range_header is not None: |
952 | 2082 | bytes = 'bytes=' + range_header | 2088 | bytes = 'bytes=' + range_header |
953 | 2083 | headers = {'Range': bytes} | 2089 | headers = {'Range': bytes} |
954 | 2090 | else: | ||
955 | 2091 | range_header = None | ||
956 | 2084 | 2092 | ||
957 | 2085 | response = self.request('GET', abspath, headers=headers) | 2093 | response = self.request('GET', abspath, headers=headers) |
958 | 2086 | 2094 | ||
959 | 2087 | if response.status == 404: # not found | 2095 | if response.status == 404: # not found |
960 | 2088 | raise errors.NoSuchFile(abspath) | 2096 | raise errors.NoSuchFile(abspath) |
962 | 2089 | elif response.status in (400, 416): | 2097 | elif response.status == 416: |
963 | 2090 | # We don't know which, but one of the ranges we specified was | 2098 | # We don't know which, but one of the ranges we specified was |
964 | 2091 | # wrong. | 2099 | # wrong. |
965 | 2092 | raise errors.InvalidHttpRange(abspath, range_header, | 2100 | raise errors.InvalidHttpRange(abspath, range_header, |
966 | 2093 | 'Server return code %d' % response.status) | 2101 | 'Server return code %d' % response.status) |
967 | 2102 | elif response.status == 400: | ||
968 | 2103 | if range_header: | ||
969 | 2104 | # We don't know which, but one of the ranges we specified was | ||
970 | 2105 | # wrong. | ||
971 | 2106 | raise errors.InvalidHttpRange( | ||
972 | 2107 | abspath, range_header, | ||
973 | 2108 | 'Server return code %d' % response.status) | ||
974 | 2109 | else: | ||
975 | 2110 | raise errors.InvalidHttpResponse( | ||
976 | 2111 | abspath, 'Unexpected status %d' % response.status) | ||
977 | 2094 | elif response.status not in (200, 206): | 2112 | elif response.status not in (200, 206): |
978 | 2095 | raise errors.InvalidHttpResponse( | 2113 | raise errors.InvalidHttpResponse( |
979 | 2096 | abspath, 'Unexpected status %d' % response.status) | 2114 | abspath, 'Unexpected status %d' % response.status) |
980 | 2097 | 2115 | ||
981 | === modified file 'breezy/workingtree.py' | |||
982 | --- breezy/workingtree.py 2020-01-10 01:37:30 +0000 | |||
983 | +++ breezy/workingtree.py 2020-01-11 17:50:43 +0000 | |||
984 | @@ -43,7 +43,6 @@ | |||
985 | 43 | from breezy import ( | 43 | from breezy import ( |
986 | 44 | cleanup, | 44 | cleanup, |
987 | 45 | conflicts as _mod_conflicts, | 45 | conflicts as _mod_conflicts, |
988 | 46 | errors, | ||
989 | 47 | filters as _mod_filters, | 46 | filters as _mod_filters, |
990 | 48 | merge, | 47 | merge, |
991 | 49 | revision as _mod_revision, | 48 | revision as _mod_revision, |
992 | @@ -56,6 +55,9 @@ | |||
993 | 56 | ) | 55 | ) |
994 | 57 | """) | 56 | """) |
995 | 58 | 57 | ||
996 | 58 | from . import ( | ||
997 | 59 | errors, | ||
998 | 60 | ) | ||
999 | 59 | from .controldir import ( | 61 | from .controldir import ( |
1000 | 60 | ControlComponent, | 62 | ControlComponent, |
1001 | 61 | ControlComponentFormatRegistry, | 63 | ControlComponentFormatRegistry, |
1002 | 62 | 64 | ||
1003 | === modified file 'doc/en/release-notes/brz-3.1.txt' | |||
1004 | --- doc/en/release-notes/brz-3.1.txt 2020-01-02 11:31:03 +0000 | |||
1005 | +++ doc/en/release-notes/brz-3.1.txt 2020-01-11 17:50:43 +0000 | |||
1006 | @@ -46,6 +46,10 @@ | |||
1007 | 46 | have installed and speeds up import time since psutil brings in | 46 | have installed and speeds up import time since psutil brings in |
1008 | 47 | various other modules. (Jelmer Vernooij) | 47 | various other modules. (Jelmer Vernooij) |
1009 | 48 | 48 | ||
1010 | 49 | * Add a basic Mercurial plugin that mentions that .hg repositories | ||
1011 | 50 | are unsupported when the user attempts to access one. | ||
1012 | 51 | (Jelmer Vernooij) | ||
1013 | 52 | |||
1014 | 49 | * The ``2a`` format now officially supports storing tree references. | 53 | * The ``2a`` format now officially supports storing tree references. |
1015 | 50 | It always partially supported storing tree reference data, | 54 | It always partially supported storing tree reference data, |
1016 | 51 | and would happily pull in tree reference data from other repository | 55 | and would happily pull in tree reference data from other repository |
Merging failed /ci.breezy- vcs.org/ job/brz/ job/brz- land/584/
https:/