5429 msg = _(b'update destination required by configuration') |
5429 msg = _(b'update destination required by configuration') |
5430 hint = _(b'use hg pull followed by hg update DEST') |
5430 hint = _(b'use hg pull followed by hg update DEST') |
5431 raise error.InputError(msg, hint=hint) |
5431 raise error.InputError(msg, hint=hint) |
5432 |
5432 |
5433 for path in urlutil.get_pull_paths(repo, ui, sources): |
5433 for path in urlutil.get_pull_paths(repo, ui, sources): |
5434 source, branches = urlutil.parseurl(path.rawloc, opts.get(b'branch')) |
5434 ui.status(_(b'pulling from %s\n') % urlutil.hidepassword(path.loc)) |
5435 ui.status(_(b'pulling from %s\n') % urlutil.hidepassword(source)) |
|
5436 ui.flush() |
5435 ui.flush() |
5437 other = hg.peer(repo, opts, source) |
5436 other = hg.peer(repo, opts, path) |
5438 update_conflict = None |
5437 update_conflict = None |
5439 try: |
5438 try: |
|
5439 branches = (path.branch, opts.get(b'branch', [])) |
5440 revs, checkout = hg.addbranchrevs( |
5440 revs, checkout = hg.addbranchrevs( |
5441 repo, other, branches, opts.get(b'rev') |
5441 repo, other, branches, opts.get(b'rev') |
5442 ) |
5442 ) |
5443 |
5443 |
5444 pullopargs = {} |
5444 pullopargs = {} |
5510 if opts.get(b'rev'): |
5510 if opts.get(b'rev'): |
5511 brev = opts[b'rev'][0] |
5511 brev = opts[b'rev'][0] |
5512 elif opts.get(b'branch'): |
5512 elif opts.get(b'branch'): |
5513 brev = opts[b'branch'][0] |
5513 brev = opts[b'branch'][0] |
5514 else: |
5514 else: |
5515 brev = branches[0] |
5515 brev = path.branch |
5516 repo._subtoppath = source |
5516 |
|
5517 # XXX path: we are losing the `path` object here. Keeping it |
|
5518 # would be valuable. For example as a "variant" as we do |
|
5519 # for pushes. |
|
5520 repo._subtoppath = path.loc |
5517 try: |
5521 try: |
5518 update_conflict = postincoming( |
5522 update_conflict = postincoming( |
5519 ui, repo, modheads, opts.get(b'update'), checkout, brev |
5523 ui, repo, modheads, opts.get(b'update'), checkout, brev |
5520 ) |
5524 ) |
5521 except error.FilteredRepoLookupError as exc: |
5525 except error.FilteredRepoLookupError as exc: |