mercurial/utils/urlutil.py
changeset 46909 067840864f37
parent 46908 4452cb788404
child 46910 df7439cc6806
--- a/mercurial/utils/urlutil.py	Mon Apr 12 06:34:54 2021 +0200
+++ b/mercurial/utils/urlutil.py	Mon Apr 12 22:22:56 2021 +0200
@@ -445,6 +445,14 @@
     return bytes(u)
 
 
+def get_push_paths(repo, ui, dests):
+    """yields all the `path` selected as push destination by `dests`"""
+    if not dests:
+        dests = [None]
+    for dest in dests:
+        yield ui.getpath(dest, default=(b'default-push', b'default'))
+
+
 def parseurl(path, branches=None):
     '''parse url#branch, returning (url, (branch, branches))'''
     u = url(path)