Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 51605:3e0f86f09f26 stable
subrepo: propagate non-default path on outgoing
There was already a fix made in 5dbff89cf107 for pull and push commands. I did
the same for the outgoing command.
The problem I identified is that when the parent repository has multiple paths,
the outgoing command was not respecting the parent path used and was always
using the default path for subrepositories.
author | Felipe Resende <felipe@fcresende.dev.br> |
---|---|
date | Sun, 31 Mar 2024 17:57:46 -0300 |
parents | 18c8c18993f0 |
children | fc317bd5b637 |
comparison
equal
deleted
inserted
replaced
51569:13c004b54cbe | 51605:3e0f86f09f26 |
---|---|
1423 def _outgoing(ui, repo, dests, opts, subpath=None): | 1423 def _outgoing(ui, repo, dests, opts, subpath=None): |
1424 out = set() | 1424 out = set() |
1425 others = [] | 1425 others = [] |
1426 for path in urlutil.get_push_paths(repo, ui, dests): | 1426 for path in urlutil.get_push_paths(repo, ui, dests): |
1427 dest = path.loc | 1427 dest = path.loc |
1428 repo._subtoppath = dest | |
1428 if subpath is not None: | 1429 if subpath is not None: |
1429 subpath = urlutil.url(subpath) | 1430 subpath = urlutil.url(subpath) |
1430 if subpath.isabs(): | 1431 if subpath.isabs(): |
1431 dest = bytes(subpath) | 1432 dest = bytes(subpath) |
1432 else: | 1433 else: |
1526 ret = min(ret, _outgoing_recurse(ui, repo, dests, opts)) | 1527 ret = min(ret, _outgoing_recurse(ui, repo, dests, opts)) |
1527 return ret # exit code is zero since we found outgoing changes | 1528 return ret # exit code is zero since we found outgoing changes |
1528 finally: | 1529 finally: |
1529 for oth in others: | 1530 for oth in others: |
1530 oth.close() | 1531 oth.close() |
1532 del repo._subtoppath | |
1531 | 1533 |
1532 | 1534 |
1533 def verify(repo, level=None): | 1535 def verify(repo, level=None): |
1534 """verify the consistency of a repository""" | 1536 """verify the consistency of a repository""" |
1535 ret = verifymod.verify(repo, level=level) | 1537 ret = verifymod.verify(repo, level=level) |