Show More
@@ -811,7 +811,7 b' def _findcommonincoming(orig, *args, **k' | |||
|
811 | 811 | return common, True, remoteheads |
|
812 | 812 | |
|
813 | 813 | |
|
814 |
def _push(orig, ui, repo, |
|
|
814 | def _push(orig, ui, repo, *dests, **opts): | |
|
815 | 815 | opts = pycompat.byteskwargs(opts) |
|
816 | 816 | bookmark = opts.get(b'bookmark') |
|
817 | 817 | # we only support pushing one infinitepush bookmark at once |
@@ -839,18 +839,18 b' def _push(orig, ui, repo, dest=None, *ar' | |||
|
839 | 839 | oldphasemove = extensions.wrapfunction( |
|
840 | 840 | exchange, b'_localphasemove', _phasemove |
|
841 | 841 | ) |
|
842 | # Copy-paste from `push` command | |
|
843 | path = ui.getpath(dest, default=(b'default-push', b'default')) | |
|
844 |
if |
|
|
845 | raise error.Abort( | |
|
846 | _(b'default repository not configured!'), | |
|
847 | hint=_(b"see 'hg help config.paths'"), | |
|
848 | ) | |
|
842 | ||
|
843 | paths = list(urlutil.get_push_paths(repo, ui, dests)) | |
|
844 | if len(paths) > 1: | |
|
845 | msg = _(b'cannot push to multiple path with infinitepush') | |
|
846 | raise error.Abort(msg) | |
|
847 | ||
|
848 | path = paths[0] | |
|
849 | 849 | destpath = path.pushloc or path.loc |
|
850 | 850 | # Remote scratch bookmarks will be deleted because remotenames doesn't |
|
851 | 851 | # know about them. Let's save it before push and restore after |
|
852 | 852 | remotescratchbookmarks = _readscratchremotebookmarks(ui, repo, destpath) |
|
853 |
result = orig(ui, repo, |
|
|
853 | result = orig(ui, repo, *dests, **pycompat.strkwargs(opts)) | |
|
854 | 854 | if common.isremotebooksenabled(ui): |
|
855 | 855 | if bookmark and scratchpush: |
|
856 | 856 | other = hg.peer(repo, opts, destpath) |
General Comments 0
You need to be logged in to leave comments.
Login now