##// END OF EJS Templates
urlutil: introduce a new `list_paths` function...
marmoute -
r47794:83902c57 default draft
parent child Browse files
Show More
@@ -445,6 +445,18 b' def removeauth(u):'
445 return bytes(u)
445 return bytes(u)
446
446
447
447
448 def list_paths(ui, target_path=None):
449 """list all the (name, paths) in the passed ui"""
450 if target_path is None:
451 return sorted(pycompat.iteritems(ui.paths))
452 else:
453 path = ui.paths.get(target_path)
454 if path is None:
455 return []
456 else:
457 return [(target_path, path)]
458
459
448 def try_path(ui, url):
460 def try_path(ui, url):
449 """try to build a path from a url
461 """try to build a path from a url
450
462
General Comments 0
You need to be logged in to leave comments. Login now