comparison mercurial/revset.py @ 49823:e2a31b0bc5d0

path: pass `path` to `peer` in the `outgoing` revset We directly use the `path` object to build the `peer` object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Dec 2022 02:14:40 +0100
parents c55e70bed7eb
children f632b9e1e047
comparison
equal deleted inserted replaced
49822:30ac702a7488 49823:e2a31b0bc5d0
1867 dests = [dest] 1867 dests = [dest]
1868 else: 1868 else:
1869 dests = [] 1869 dests = []
1870 missing = set() 1870 missing = set()
1871 for path in urlutil.get_push_paths(repo, repo.ui, dests): 1871 for path in urlutil.get_push_paths(repo, repo.ui, dests):
1872 dest = path.loc
1873 branches = path.branch, [] 1872 branches = path.branch, []
1874 1873
1875 revs, checkout = hg.addbranchrevs(repo, repo, branches, []) 1874 revs, checkout = hg.addbranchrevs(repo, repo, branches, [])
1876 if revs: 1875 if revs:
1877 revs = [repo.lookup(rev) for rev in revs] 1876 revs = [repo.lookup(rev) for rev in revs]
1878 other = hg.peer(repo, {}, dest) 1877 other = hg.peer(repo, {}, path)
1879 try: 1878 try:
1880 with repo.ui.silent(): 1879 with repo.ui.silent():
1881 outgoing = discovery.findcommonoutgoing( 1880 outgoing = discovery.findcommonoutgoing(
1882 repo, other, onlyheads=revs 1881 repo, other, onlyheads=revs
1883 ) 1882 )