Show More
@@ -5720,12 +5720,9 b' def push(ui, repo, *dests, **opts):' | |||||
5720 | # this lets simultaneous -r, -b options continue working |
|
5720 | # this lets simultaneous -r, -b options continue working | |
5721 | opts.setdefault(b'rev', []).append(b"null") |
|
5721 | opts.setdefault(b'rev', []).append(b"null") | |
5722 |
|
5722 | |||
5723 | if not dests: |
|
|||
5724 | dests = [None] |
|
|||
5725 | some_pushed = False |
|
5723 | some_pushed = False | |
5726 | result = 0 |
|
5724 | result = 0 | |
5727 | for dest in dests: |
|
5725 | for path in urlutil.get_push_paths(repo, ui, dests): | |
5728 | path = ui.getpath(dest, default=(b'default-push', b'default')) |
|
|||
5729 | if not path: |
|
5726 | if not path: | |
5730 | raise error.ConfigError( |
|
5727 | raise error.ConfigError( | |
5731 | _(b'default repository not configured!'), |
|
5728 | _(b'default repository not configured!'), |
@@ -445,6 +445,14 b' def removeauth(u):' | |||||
445 | return bytes(u) |
|
445 | return bytes(u) | |
446 |
|
446 | |||
447 |
|
447 | |||
|
448 | def get_push_paths(repo, ui, dests): | |||
|
449 | """yields all the `path` selected as push destination by `dests`""" | |||
|
450 | if not dests: | |||
|
451 | dests = [None] | |||
|
452 | for dest in dests: | |||
|
453 | yield ui.getpath(dest, default=(b'default-push', b'default')) | |||
|
454 | ||||
|
455 | ||||
448 | def parseurl(path, branches=None): |
|
456 | def parseurl(path, branches=None): | |
449 | '''parse url#branch, returning (url, (branch, branches))''' |
|
457 | '''parse url#branch, returning (url, (branch, branches))''' | |
450 | u = url(path) |
|
458 | u = url(path) |
General Comments 0
You need to be logged in to leave comments.
Login now