Mercurial > hg-stable
changeset 51703:653b7a19f1de stable
outgoing: pre-indent some code
This will make the next changeset clearer.
author | Felipe Resende <felipe@fcresende.dev.br> |
---|---|
date | Fri, 25 Oct 2024 01:14:53 +0200 |
parents | 75123bc60b66 |
children | fb15ba66c702 |
files | mercurial/hg.py |
diffstat | 1 files changed, 34 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Oct 25 01:23:24 2024 +0200 +++ b/mercurial/hg.py Fri Oct 25 01:14:53 2024 +0200 @@ -1495,38 +1495,43 @@ others = [] for path in urlutil.get_push_paths(repo, ui, dests): dest = path.loc - if subpath is not None: - subpath = urlutil.url(subpath) - if subpath.isabs(): - dest = bytes(subpath) - else: - p = urlutil.url(dest) - if p.islocal(): - normpath = os.path.normpath + if True: + if subpath is not None: + subpath = urlutil.url(subpath) + if subpath.isabs(): + dest = bytes(subpath) else: - normpath = posixpath.normpath - p.path = normpath(b'%s/%s' % (p.path, subpath)) - dest = bytes(p) - branches = path.branch, opts.get(b'branch') or [] + p = urlutil.url(dest) + if p.islocal(): + normpath = os.path.normpath + else: + normpath = posixpath.normpath + p.path = normpath(b'%s/%s' % (p.path, subpath)) + dest = bytes(p) + branches = path.branch, opts.get(b'branch') or [] - ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest)) - revs, checkout = addbranchrevs(repo, repo, branches, opts.get(b'rev')) - if revs: - revs = [repo[rev].node() for rev in logcmdutil.revrange(repo, revs)] + ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest)) + revs, checkout = addbranchrevs( + repo, repo, branches, opts.get(b'rev') + ) + if revs: + revs = [ + repo[rev].node() for rev in logcmdutil.revrange(repo, revs) + ] - other = peer(repo, opts, dest) - try: - outgoing = discovery.findcommonoutgoing( - repo, other, revs, force=opts.get(b'force') - ) - o = outgoing.missing - out.update(o) - if not o: - scmutil.nochangesfound(repo.ui, repo, outgoing.excluded) - others.append(other) - except: # re-raises - other.close() - raise + other = peer(repo, opts, dest) + try: + outgoing = discovery.findcommonoutgoing( + repo, other, revs, force=opts.get(b'force') + ) + o = outgoing.missing + out.update(o) + if not o: + scmutil.nochangesfound(repo.ui, repo, outgoing.excluded) + others.append(other) + except: # re-raises + other.close() + raise return list(out), others