Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 49829:f2f4ec857f78
path: pass `path` to `peer` in `hg incoming` bookmark logic
We directly use the `path` object to build the `peer` object.
Touching this code highlighted that we never honor the branches' information
of when doing bookmark level incoming checks.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 01 Dec 2022 17:55:17 +0100 |
parents | 30ac702a7488 |
children | 06083c5f9e29 |
comparison
equal
deleted
inserted
replaced
49828:d4926e08507d | 49829:f2f4ec857f78 |
---|---|
4381 cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'bundle']) | 4381 cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'bundle']) |
4382 | 4382 |
4383 if opts.get(b'bookmarks'): | 4383 if opts.get(b'bookmarks'): |
4384 srcs = urlutil.get_pull_paths(repo, ui, [source]) | 4384 srcs = urlutil.get_pull_paths(repo, ui, [source]) |
4385 for path in srcs: | 4385 for path in srcs: |
4386 source, branches = urlutil.parseurl( | 4386 # XXX the "branches" options are not used. Should it be used? |
4387 path.rawloc, opts.get(b'branch') | 4387 other = hg.peer(repo, opts, path) |
4388 ) | |
4389 other = hg.peer(repo, opts, source) | |
4390 try: | 4388 try: |
4391 if b'bookmarks' not in other.listkeys(b'namespaces'): | 4389 if b'bookmarks' not in other.listkeys(b'namespaces'): |
4392 ui.warn(_(b"remote doesn't support bookmarks\n")) | 4390 ui.warn(_(b"remote doesn't support bookmarks\n")) |
4393 return 0 | 4391 return 0 |
4394 ui.pager(b'incoming') | 4392 ui.pager(b'incoming') |
4395 ui.status( | 4393 ui.status( |
4396 _(b'comparing with %s\n') % urlutil.hidepassword(source) | 4394 _(b'comparing with %s\n') % urlutil.hidepassword(path.loc) |
4397 ) | 4395 ) |
4398 return bookmarks.incoming( | 4396 return bookmarks.incoming( |
4399 ui, repo, other, mode=path.bookmarks_mode | 4397 ui, repo, other, mode=path.bookmarks_mode |
4400 ) | 4398 ) |
4401 finally: | 4399 finally: |