501 msg %= dest |
501 msg %= dest |
502 raise error.RepoError(msg) |
502 raise error.RepoError(msg) |
503 yield path |
503 yield path |
504 |
504 |
505 |
505 |
506 def get_pull_paths(repo, ui, sources, default_branches=()): |
506 def get_pull_paths(repo, ui, sources): |
507 """yields all the `(path, branch)` selected as pull source by `sources`""" |
507 """yields all the `(path, branch)` selected as pull source by `sources`""" |
508 if not sources: |
508 if not sources: |
509 sources = [b'default'] |
509 sources = [b'default'] |
510 for source in sources: |
510 for source in sources: |
511 if source in ui.paths: |
511 if source in ui.paths: |
512 for p in ui.paths[source]: |
512 for p in ui.paths[source]: |
513 yield parseurl(p.rawloc, default_branches) |
513 yield p |
514 else: |
514 else: |
515 p = path(ui, None, source, validate_path=False) |
515 p = path(ui, None, source, validate_path=False) |
516 yield parseurl(p.rawloc, default_branches) |
516 yield p |
517 |
517 |
518 |
518 |
519 def get_unique_push_path(action, repo, ui, dest=None): |
519 def get_unique_push_path(action, repo, ui, dest=None): |
520 """return a unique `path` or abort if multiple are found |
520 """return a unique `path` or abort if multiple are found |
521 |
521 |