1337
1337
"""Return the ShelfManager for this WorkingTree."""
1338
1338
raise NotImplementedError(self.get_shelf_manager)
1340
def get_canonical_paths(self, paths):
1341
"""Like get_canonical_path() but works on multiple items.
1343
:param paths: A sequence of paths relative to the root of the tree.
1344
:return: A list of paths, with each item the corresponding input path
1345
adjusted to account for existing elements that match case
1348
with self.lock_read():
1352
def get_canonical_path(self, path):
1353
"""Returns the first item in the tree that matches a path.
1355
This is meant to allow case-insensitive path lookups on e.g.
1358
If a path matches exactly, it is returned. If no path matches exactly
1359
but more than one path matches according to the underlying file system,
1360
it is implementation defined which is returned.
1362
If no path matches according to the file system, the input path is
1363
returned, but with as many path entries that do exist changed to their
1366
If you need to resolve many names from the same tree, you should
1367
use get_canonical_paths() to avoid O(N) behaviour.
1369
:param path: A paths relative to the root of the tree.
1370
:return: The input path adjusted to account for existing elements
1371
that match case insensitively.
1373
with self.lock_read():
1374
return next(self.get_canonical_paths([path]))
1341
1377
class WorkingTreeFormatRegistry(controldir.ControlComponentFormatRegistry):
1342
1378
"""Registry for working tree formats."""