##// END OF EJS Templates
push-dests: move the code around missing default dest inside `get_push_paths`...
marmoute -
r47679:efadec3e default
parent child Browse files
Show More
@@ -5703,11 +5703,6 b' def push(ui, repo, *dests, **opts):'
5703 some_pushed = False
5703 some_pushed = False
5704 result = 0
5704 result = 0
5705 for path in urlutil.get_push_paths(repo, ui, dests):
5705 for path in urlutil.get_push_paths(repo, ui, dests):
5706 if not path:
5707 raise error.ConfigError(
5708 _(b'default repository not configured!'),
5709 hint=_(b"see 'hg help config.paths'"),
5710 )
5711 dest = path.pushloc or path.loc
5706 dest = path.pushloc or path.loc
5712 branches = (path.branch, opts.get(b'branch') or [])
5707 branches = (path.branch, opts.get(b'branch') or [])
5713 ui.status(_(b'pushing to %s\n') % urlutil.hidepassword(dest))
5708 ui.status(_(b'pushing to %s\n') % urlutil.hidepassword(dest))
@@ -453,7 +453,10 b' def get_push_paths(repo, ui, dests):'
453 elif b'default' in ui.paths:
453 elif b'default' in ui.paths:
454 yield ui.paths[b'default']
454 yield ui.paths[b'default']
455 else:
455 else:
456 yield None
456 raise error.ConfigError(
457 _(b'default repository not configured!'),
458 hint=_(b"see 'hg help config.paths'"),
459 )
457 else:
460 else:
458 for dest in dests:
461 for dest in dests:
459 yield ui.getpath(dest)
462 yield ui.getpath(dest)
General Comments 0
You need to be logged in to leave comments. Login now