Merge lp:~jelmer/brz/detect-local-wt into lp:brz
- detect-local-wt
- Merge into trunk
Proposed by
Jelmer Vernooij
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/detect-local-wt |
Merge into: | lp:brz |
Diff against target: |
369 lines (+94/-90) 8 files modified
breezy/bzr/bzrdir.py (+18/-17) breezy/bzr/workingtree.py (+28/-1) breezy/controldir.py (+24/-3) breezy/git/dir.py (+8/-5) breezy/git/workingtree.py (+1/-2) breezy/tests/test_controldir.py (+1/-1) breezy/tests/test_workingtree.py (+0/-12) breezy/workingtree.py (+14/-49) |
To merge this branch: | bzr merge lp:~jelmer/brz/detect-local-wt |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+368240@code.launchpad.net |
Commit message
Remove WorkingTree.
Description of the change
Remove unused WorkingTree.
Only detect .bzr subtrees in Bzr workingtrees and .git subtrees in Git workingtrees.
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 : | # |
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/bzr/bzrdir.py' | |||
2 | --- breezy/bzr/bzrdir.py 2018-11-18 19:48:57 +0000 | |||
3 | +++ breezy/bzr/bzrdir.py 2019-06-03 21:45:42 +0000 | |||
4 | @@ -662,23 +662,6 @@ | |||
5 | 662 | def control_transport(self): | 662 | def control_transport(self): |
6 | 663 | return self.transport | 663 | return self.transport |
7 | 664 | 664 | ||
8 | 665 | def is_control_filename(self, filename): | ||
9 | 666 | """True if filename is the name of a path which is reserved for bzrdir's. | ||
10 | 667 | |||
11 | 668 | :param filename: A filename within the root transport of this bzrdir. | ||
12 | 669 | |||
13 | 670 | This is true IF and ONLY IF the filename is part of the namespace | ||
14 | 671 | reserved for bzr control dirs. Currently this is the '.bzr' directory | ||
15 | 672 | in the root of the root_transport. | ||
16 | 673 | """ | ||
17 | 674 | # this might be better on the BzrDirFormat class because it refers to | ||
18 | 675 | # all the possible bzrdir disk formats. | ||
19 | 676 | # This method is tested via the workingtree is_control_filename tests- | ||
20 | 677 | # it was extracted from WorkingTree.is_control_filename. If the | ||
21 | 678 | # method's contract is extended beyond the current trivial | ||
22 | 679 | # implementation, please add new tests for it to the appropriate place. | ||
23 | 680 | return filename == '.bzr' or filename.startswith('.bzr/') | ||
24 | 681 | |||
25 | 682 | def _cloning_metadir(self): | 665 | def _cloning_metadir(self): |
26 | 683 | """Produce a metadir suitable for cloning with. | 666 | """Produce a metadir suitable for cloning with. |
27 | 684 | 667 | ||
28 | @@ -1469,6 +1452,24 @@ | |||
29 | 1469 | BzrFormat.check_support_status(self, allow_unsupported=allow_unsupported, | 1452 | BzrFormat.check_support_status(self, allow_unsupported=allow_unsupported, |
30 | 1470 | recommend_upgrade=recommend_upgrade, basedir=basedir) | 1453 | recommend_upgrade=recommend_upgrade, basedir=basedir) |
31 | 1471 | 1454 | ||
32 | 1455 | @classmethod | ||
33 | 1456 | def is_control_filename(klass, filename): | ||
34 | 1457 | """True if filename is the name of a path which is reserved for bzrdir's. | ||
35 | 1458 | |||
36 | 1459 | :param filename: A filename within the root transport of this bzrdir. | ||
37 | 1460 | |||
38 | 1461 | This is true IF and ONLY IF the filename is part of the namespace | ||
39 | 1462 | reserved for bzr control dirs. Currently this is the '.bzr' directory | ||
40 | 1463 | in the root of the root_transport. | ||
41 | 1464 | """ | ||
42 | 1465 | # this might be better on the BzrDirFormat class because it refers to | ||
43 | 1466 | # all the possible bzrdir disk formats. | ||
44 | 1467 | # This method is tested via the workingtree is_control_filename tests- | ||
45 | 1468 | # it was extracted from WorkingTree.is_control_filename. If the | ||
46 | 1469 | # method's contract is extended beyond the current trivial | ||
47 | 1470 | # implementation, please add new tests for it to the appropriate place. | ||
48 | 1471 | return filename == '.bzr' or filename.startswith('.bzr/') | ||
49 | 1472 | |||
50 | 1472 | 1473 | ||
51 | 1473 | class BzrDirMetaFormat1(BzrDirFormat): | 1474 | class BzrDirMetaFormat1(BzrDirFormat): |
52 | 1474 | """Bzr meta control format 1 | 1475 | """Bzr meta control format 1 |
53 | 1475 | 1476 | ||
54 | === modified file 'breezy/bzr/workingtree.py' | |||
55 | --- breezy/bzr/workingtree.py 2018-12-11 00:51:46 +0000 | |||
56 | +++ breezy/bzr/workingtree.py 2019-06-03 21:45:42 +0000 | |||
57 | @@ -126,6 +126,7 @@ | |||
58 | 126 | 126 | ||
59 | 127 | self._control_files = _control_files | 127 | self._control_files = _control_files |
60 | 128 | self._detect_case_handling() | 128 | self._detect_case_handling() |
61 | 129 | self._setup_directory_is_tree_reference() | ||
62 | 129 | 130 | ||
63 | 130 | if _inventory is None: | 131 | if _inventory is None: |
64 | 131 | # This will be acquired on lock_read() or lock_write() | 132 | # This will be acquired on lock_read() or lock_write() |
65 | @@ -160,7 +161,33 @@ | |||
66 | 160 | else: | 161 | else: |
67 | 161 | self.case_sensitive = False | 162 | self.case_sensitive = False |
68 | 162 | 163 | ||
70 | 163 | self._setup_directory_is_tree_reference() | 164 | def _setup_directory_is_tree_reference(self): |
71 | 165 | if self._branch.repository._format.supports_tree_reference: | ||
72 | 166 | self._directory_is_tree_reference = \ | ||
73 | 167 | self._directory_may_be_tree_reference | ||
74 | 168 | else: | ||
75 | 169 | self._directory_is_tree_reference = \ | ||
76 | 170 | self._directory_is_never_tree_reference | ||
77 | 171 | |||
78 | 172 | def _directory_is_never_tree_reference(self, relpath): | ||
79 | 173 | return False | ||
80 | 174 | |||
81 | 175 | def _directory_may_be_tree_reference(self, relpath): | ||
82 | 176 | # as a special case, if a directory contains control files then | ||
83 | 177 | # it's a tree reference, except that the root of the tree is not | ||
84 | 178 | return relpath and osutils.isdir(self.abspath(relpath) + u"/.bzr") | ||
85 | 179 | # TODO: We could ask all the control formats whether they | ||
86 | 180 | # recognize this directory, but at the moment there's no cheap api | ||
87 | 181 | # to do that. Since we probably can only nest bzr checkouts and | ||
88 | 182 | # they always use this name it's ok for now. -- mbp 20060306 | ||
89 | 183 | # | ||
90 | 184 | # FIXME: There is an unhandled case here of a subdirectory | ||
91 | 185 | # containing .bzr but not a branch; that will probably blow up | ||
92 | 186 | # when you try to commit it. It might happen if there is a | ||
93 | 187 | # checkout in a subdirectory. This can be avoided by not adding | ||
94 | 188 | # it. mbp 20070306 | ||
95 | 189 | |||
96 | 190 | |||
97 | 164 | 191 | ||
98 | 165 | def _serialize(self, inventory, out_file): | 192 | def _serialize(self, inventory, out_file): |
99 | 166 | xml5.serializer_v5.write_inventory( | 193 | xml5.serializer_v5.write_inventory( |
100 | 167 | 194 | ||
101 | === modified file 'breezy/controldir.py' | |||
102 | --- breezy/controldir.py 2018-11-12 01:41:38 +0000 | |||
103 | +++ breezy/controldir.py 2019-06-03 21:45:42 +0000 | |||
104 | @@ -152,7 +152,7 @@ | |||
105 | 152 | this in the future - for instance to make bzr talk with svn working | 152 | this in the future - for instance to make bzr talk with svn working |
106 | 153 | trees. | 153 | trees. |
107 | 154 | """ | 154 | """ |
109 | 155 | raise NotImplementedError(self.is_control_filename) | 155 | return self._format.is_control_filename(filename) |
110 | 156 | 156 | ||
111 | 157 | def needs_format_conversion(self, format=None): | 157 | def needs_format_conversion(self, format=None): |
112 | 158 | """Return true if this controldir needs convert_format run on it. | 158 | """Return true if this controldir needs convert_format run on it. |
113 | @@ -1246,6 +1246,22 @@ | |||
114 | 1246 | """ | 1246 | """ |
115 | 1247 | raise NotImplementedError(self.supports_transport) | 1247 | raise NotImplementedError(self.supports_transport) |
116 | 1248 | 1248 | ||
117 | 1249 | @classmethod | ||
118 | 1250 | def is_control_filename(klass, filename): | ||
119 | 1251 | """True if filename is the name of a path which is reserved for | ||
120 | 1252 | controldirs. | ||
121 | 1253 | |||
122 | 1254 | :param filename: A filename within the root transport of this | ||
123 | 1255 | controldir. | ||
124 | 1256 | |||
125 | 1257 | This is true IF and ONLY IF the filename is part of the namespace reserved | ||
126 | 1258 | for bzr control dirs. Currently this is the '.bzr' directory in the root | ||
127 | 1259 | of the root_transport. it is expected that plugins will need to extend | ||
128 | 1260 | this in the future - for instance to make bzr talk with svn working | ||
129 | 1261 | trees. | ||
130 | 1262 | """ | ||
131 | 1263 | raise NotImplementedError(self.is_control_filename) | ||
132 | 1264 | |||
133 | 1249 | 1265 | ||
134 | 1250 | class Prober(object): | 1266 | class Prober(object): |
135 | 1251 | """Abstract class that can be used to detect a particular kind of | 1267 | """Abstract class that can be used to detect a particular kind of |
136 | @@ -1461,8 +1477,13 @@ | |||
137 | 1461 | 1477 | ||
138 | 1462 | def is_control_filename(filename): | 1478 | def is_control_filename(filename): |
139 | 1463 | """Check if filename is used for control directories.""" | 1479 | """Check if filename is used for control directories.""" |
142 | 1464 | # TODO(jelmer): Allow registration by other VCSes | 1480 | # TODO(jelmer): Instead, have a function that returns all control |
143 | 1465 | return filename == '.bzr' | 1481 | # filenames. |
144 | 1482 | for key, format in format_registry.items(): | ||
145 | 1483 | if format().is_control_filename(filename): | ||
146 | 1484 | return True | ||
147 | 1485 | else: | ||
148 | 1486 | return False | ||
149 | 1466 | 1487 | ||
150 | 1467 | 1488 | ||
151 | 1468 | class RepositoryAcquisitionPolicy(object): | 1489 | class RepositoryAcquisitionPolicy(object): |
152 | 1469 | 1490 | ||
153 | === modified file 'breezy/git/dir.py' | |||
154 | --- breezy/git/dir.py 2019-03-18 04:31:21 +0000 | |||
155 | +++ breezy/git/dir.py 2019-06-03 21:45:42 +0000 | |||
156 | @@ -401,6 +401,11 @@ | |||
157 | 401 | raise brz_errors.NotBranchError(path=transport.base) | 401 | raise brz_errors.NotBranchError(path=transport.base) |
158 | 402 | return external_url.startswith("file:") | 402 | return external_url.startswith("file:") |
159 | 403 | 403 | ||
160 | 404 | def is_control_filename(self, filename): | ||
161 | 405 | return (filename == '.git' | ||
162 | 406 | or filename.startswith('.git/') | ||
163 | 407 | or filename.startswith('.git\\')) | ||
164 | 408 | |||
165 | 404 | 409 | ||
166 | 405 | class BareLocalGitControlDirFormat(LocalGitControlDirFormat): | 410 | class BareLocalGitControlDirFormat(LocalGitControlDirFormat): |
167 | 406 | 411 | ||
168 | @@ -410,6 +415,9 @@ | |||
169 | 410 | def get_format_description(self): | 415 | def get_format_description(self): |
170 | 411 | return "Local Git Repository (bare)" | 416 | return "Local Git Repository (bare)" |
171 | 412 | 417 | ||
172 | 418 | def is_control_filename(self, filename): | ||
173 | 419 | return False | ||
174 | 420 | |||
175 | 413 | 421 | ||
176 | 414 | class LocalGitDir(GitDir): | 422 | class LocalGitDir(GitDir): |
177 | 415 | """An adapter to the '.git' dir used by git.""" | 423 | """An adapter to the '.git' dir used by git.""" |
178 | @@ -443,11 +451,6 @@ | |||
179 | 443 | self.transport = transport.clone('.git') | 451 | self.transport = transport.clone('.git') |
180 | 444 | self._mode_check_done = None | 452 | self._mode_check_done = None |
181 | 445 | 453 | ||
182 | 446 | def is_control_filename(self, filename): | ||
183 | 447 | return (filename == '.git' | ||
184 | 448 | or filename.startswith('.git/') | ||
185 | 449 | or filename.startswith('.git\\')) | ||
186 | 450 | |||
187 | 451 | def _get_symref(self, ref): | 454 | def _get_symref(self, ref): |
188 | 452 | ref_chain, unused_sha = self._git.refs.follow(ref) | 455 | ref_chain, unused_sha = self._git.refs.follow(ref) |
189 | 453 | if len(ref_chain) == 1: | 456 | if len(ref_chain) == 1: |
190 | 454 | 457 | ||
191 | === modified file 'breezy/git/workingtree.py' | |||
192 | --- breezy/git/workingtree.py 2019-02-05 04:00:02 +0000 | |||
193 | +++ breezy/git/workingtree.py 2019-06-03 21:45:42 +0000 | |||
194 | @@ -568,8 +568,7 @@ | |||
195 | 568 | except OSError as e: | 568 | except OSError as e: |
196 | 569 | if e.errno == errno.ENOENT: | 569 | if e.errno == errno.ENOENT: |
197 | 570 | raise errors.NoSuchFile(fullpath) | 570 | raise errors.NoSuchFile(fullpath) |
200 | 571 | if (kind == 'directory' and f != '' and | 571 | if f != '' and self._directory_is_tree_reference(f): |
199 | 572 | os.path.exists(os.path.join(fullpath, '.git'))): | ||
201 | 573 | kind = 'tree-reference' | 572 | kind = 'tree-reference' |
202 | 574 | kinds[pos] = kind | 573 | kinds[pos] = kind |
203 | 575 | 574 | ||
204 | 576 | 575 | ||
205 | === modified file 'breezy/tests/test_controldir.py' | |||
206 | --- breezy/tests/test_controldir.py 2018-11-11 04:08:32 +0000 | |||
207 | +++ breezy/tests/test_controldir.py 2019-06-03 21:45:42 +0000 | |||
208 | @@ -241,7 +241,7 @@ | |||
209 | 241 | 241 | ||
210 | 242 | def test_is_bzrdir(self): | 242 | def test_is_bzrdir(self): |
211 | 243 | self.assertTrue(controldir.is_control_filename('.bzr')) | 243 | self.assertTrue(controldir.is_control_filename('.bzr')) |
212 | 244 | self.assertTrue(controldir.is_control_filename('.git')) | ||
213 | 244 | 245 | ||
214 | 245 | def test_is_not_bzrdir(self): | 246 | def test_is_not_bzrdir(self): |
215 | 246 | self.assertFalse(controldir.is_control_filename('.git')) | ||
216 | 247 | self.assertFalse(controldir.is_control_filename('bla')) | 247 | self.assertFalse(controldir.is_control_filename('bla')) |
217 | 248 | 248 | ||
218 | === modified file 'breezy/tests/test_workingtree.py' | |||
219 | --- breezy/tests/test_workingtree.py 2018-11-12 01:41:38 +0000 | |||
220 | +++ breezy/tests/test_workingtree.py 2019-06-03 21:45:42 +0000 | |||
221 | @@ -452,18 +452,6 @@ | |||
222 | 452 | tree.auto_resolve() | 452 | tree.auto_resolve() |
223 | 453 | 453 | ||
224 | 454 | 454 | ||
225 | 455 | class TestFindTrees(TestCaseWithTransport): | ||
226 | 456 | |||
227 | 457 | def test_find_trees(self): | ||
228 | 458 | self.make_branch_and_tree('foo') | ||
229 | 459 | self.make_branch_and_tree('foo/bar') | ||
230 | 460 | # Sticking a tree inside a control dir is heinous, so let's skip it | ||
231 | 461 | self.make_branch_and_tree('foo/.bzr/baz') | ||
232 | 462 | self.make_branch('qux') | ||
233 | 463 | trees = workingtree.WorkingTree.find_trees('.') | ||
234 | 464 | self.assertEqual(2, len(list(trees))) | ||
235 | 465 | |||
236 | 466 | |||
237 | 467 | class TestStoredUncommitted(TestCaseWithTransport): | 455 | class TestStoredUncommitted(TestCaseWithTransport): |
238 | 468 | 456 | ||
239 | 469 | def store_uncommitted(self): | 457 | def store_uncommitted(self): |
240 | 470 | 458 | ||
241 | === modified file 'breezy/workingtree.py' | |||
242 | --- breezy/workingtree.py 2019-02-14 22:18:59 +0000 | |||
243 | +++ breezy/workingtree.py 2019-06-03 21:45:42 +0000 | |||
244 | @@ -43,7 +43,6 @@ | |||
245 | 43 | 43 | ||
246 | 44 | from breezy import ( | 44 | from breezy import ( |
247 | 45 | conflicts as _mod_conflicts, | 45 | conflicts as _mod_conflicts, |
248 | 46 | controldir, | ||
249 | 47 | errors, | 46 | errors, |
250 | 48 | filters as _mod_filters, | 47 | filters as _mod_filters, |
251 | 49 | merge, | 48 | merge, |
252 | @@ -57,6 +56,13 @@ | |||
253 | 57 | ) | 56 | ) |
254 | 58 | """) | 57 | """) |
255 | 59 | 58 | ||
256 | 59 | from .controldir import ( | ||
257 | 60 | ControlComponent, | ||
258 | 61 | ControlComponentFormatRegistry, | ||
259 | 62 | ControlComponentFormat, | ||
260 | 63 | ControlDir, | ||
261 | 64 | ControlDirFormat, | ||
262 | 65 | ) | ||
263 | 60 | from . import ( | 66 | from . import ( |
264 | 61 | osutils, | 67 | osutils, |
265 | 62 | ) | 68 | ) |
266 | @@ -78,7 +84,7 @@ | |||
267 | 78 | _fmt = "This format does not support shelving changes." | 84 | _fmt = "This format does not support shelving changes." |
268 | 79 | 85 | ||
269 | 80 | 86 | ||
271 | 81 | class WorkingTree(mutabletree.MutableTree, controldir.ControlComponent): | 87 | class WorkingTree(mutabletree.MutableTree, ControlComponent): |
272 | 82 | """Working copy tree. | 88 | """Working copy tree. |
273 | 83 | 89 | ||
274 | 84 | :ivar basedir: The root of the tree on disk. This is a unicode path object | 90 | :ivar basedir: The root of the tree on disk. This is a unicode path object |
275 | @@ -198,7 +204,7 @@ | |||
276 | 198 | """ | 204 | """ |
277 | 199 | if path is None: | 205 | if path is None: |
278 | 200 | path = osutils.getcwd() | 206 | path = osutils.getcwd() |
280 | 201 | control = controldir.ControlDir.open(path, _unsupported=_unsupported) | 207 | control = ControlDir.open(path, _unsupported=_unsupported) |
281 | 202 | return control.open_workingtree(unsupported=_unsupported) | 208 | return control.open_workingtree(unsupported=_unsupported) |
282 | 203 | 209 | ||
283 | 204 | @staticmethod | 210 | @staticmethod |
284 | @@ -216,7 +222,7 @@ | |||
285 | 216 | """ | 222 | """ |
286 | 217 | if path is None: | 223 | if path is None: |
287 | 218 | path = osutils.getcwd() | 224 | path = osutils.getcwd() |
289 | 219 | control, relpath = controldir.ControlDir.open_containing(path) | 225 | control, relpath = ControlDir.open_containing(path) |
290 | 220 | return control.open_workingtree(), relpath | 226 | return control.open_workingtree(), relpath |
291 | 221 | 227 | ||
292 | 222 | @staticmethod | 228 | @staticmethod |
293 | @@ -294,24 +300,6 @@ | |||
294 | 294 | """ | 300 | """ |
295 | 295 | return WorkingTree.open(path, _unsupported=True) | 301 | return WorkingTree.open(path, _unsupported=True) |
296 | 296 | 302 | ||
297 | 297 | @staticmethod | ||
298 | 298 | def find_trees(location): | ||
299 | 299 | def list_current(transport): | ||
300 | 300 | return [d for d in transport.list_dir('') | ||
301 | 301 | if not controldir.is_control_filename(d)] | ||
302 | 302 | |||
303 | 303 | def evaluate(controldir): | ||
304 | 304 | try: | ||
305 | 305 | tree = controldir.open_workingtree() | ||
306 | 306 | except errors.NoWorkingTree: | ||
307 | 307 | return True, None | ||
308 | 308 | else: | ||
309 | 309 | return True, tree | ||
310 | 310 | t = transport.get_transport(location) | ||
311 | 311 | iterator = controldir.ControlDir.find_controldirs(t, evaluate=evaluate, | ||
312 | 312 | list_current=list_current) | ||
313 | 313 | return [tr for tr in iterator if tr is not None] | ||
314 | 314 | |||
315 | 315 | def __repr__(self): | 303 | def __repr__(self): |
316 | 316 | return "<%s of %s>" % (self.__class__.__name__, | 304 | return "<%s of %s>" % (self.__class__.__name__, |
317 | 317 | getattr(self, 'basedir', None)) | 305 | getattr(self, 'basedir', None)) |
318 | @@ -729,31 +717,8 @@ | |||
319 | 729 | def subsume(self, other_tree): | 717 | def subsume(self, other_tree): |
320 | 730 | raise NotImplementedError(self.subsume) | 718 | raise NotImplementedError(self.subsume) |
321 | 731 | 719 | ||
347 | 732 | def _setup_directory_is_tree_reference(self): | 720 | def _directory_is_tree_reference(self, relpath): |
348 | 733 | if self._branch.repository._format.supports_tree_reference: | 721 | raise NotImplementedError(self._directory_is_tree_reference) |
324 | 734 | self._directory_is_tree_reference = \ | ||
325 | 735 | self._directory_may_be_tree_reference | ||
326 | 736 | else: | ||
327 | 737 | self._directory_is_tree_reference = \ | ||
328 | 738 | self._directory_is_never_tree_reference | ||
329 | 739 | |||
330 | 740 | def _directory_is_never_tree_reference(self, relpath): | ||
331 | 741 | return False | ||
332 | 742 | |||
333 | 743 | def _directory_may_be_tree_reference(self, relpath): | ||
334 | 744 | # as a special case, if a directory contains control files then | ||
335 | 745 | # it's a tree reference, except that the root of the tree is not | ||
336 | 746 | return relpath and osutils.isdir(self.abspath(relpath) + u"/.bzr") | ||
337 | 747 | # TODO: We could ask all the control formats whether they | ||
338 | 748 | # recognize this directory, but at the moment there's no cheap api | ||
339 | 749 | # to do that. Since we probably can only nest bzr checkouts and | ||
340 | 750 | # they always use this name it's ok for now. -- mbp 20060306 | ||
341 | 751 | # | ||
342 | 752 | # FIXME: There is an unhandled case here of a subdirectory | ||
343 | 753 | # containing .bzr but not a branch; that will probably blow up | ||
344 | 754 | # when you try to commit it. It might happen if there is a | ||
345 | 755 | # checkout in a subdirectory. This can be avoided by not adding | ||
346 | 756 | # it. mbp 20070306 | ||
349 | 757 | 722 | ||
350 | 758 | def extract(self, path, format=None): | 723 | def extract(self, path, format=None): |
351 | 759 | """Extract a subtree from this tree. | 724 | """Extract a subtree from this tree. |
352 | @@ -1373,7 +1338,7 @@ | |||
353 | 1373 | return next(self.get_canonical_paths([path])) | 1338 | return next(self.get_canonical_paths([path])) |
354 | 1374 | 1339 | ||
355 | 1375 | 1340 | ||
357 | 1376 | class WorkingTreeFormatRegistry(controldir.ControlComponentFormatRegistry): | 1341 | class WorkingTreeFormatRegistry(ControlComponentFormatRegistry): |
358 | 1377 | """Registry for working tree formats.""" | 1342 | """Registry for working tree formats.""" |
359 | 1378 | 1343 | ||
360 | 1379 | def __init__(self, other_registry=None): | 1344 | def __init__(self, other_registry=None): |
361 | @@ -1402,7 +1367,7 @@ | |||
362 | 1402 | format_registry = WorkingTreeFormatRegistry() | 1367 | format_registry = WorkingTreeFormatRegistry() |
363 | 1403 | 1368 | ||
364 | 1404 | 1369 | ||
366 | 1405 | class WorkingTreeFormat(controldir.ControlComponentFormat): | 1370 | class WorkingTreeFormat(ControlComponentFormat): |
367 | 1406 | """An encapsulation of the initialization and open routines for a format. | 1371 | """An encapsulation of the initialization and open routines for a format. |
368 | 1407 | 1372 | ||
369 | 1408 | Formats provide three things: | 1373 | Formats provide three things: |
Running landing tests failed /ci.breezy- vcs.org/ job/brz/ job/brz- land/321/
https:/