Mercurial > hg
comparison mercurial/revset.py @ 46663:a4c19a162615
sshpeer: enable+fix warning about sshpeers not being closed explicitly
I recommend looking at this with a diff that ignores indentation.
The test changes are because localrepo.close() updates some cache,
which appears happens earlier now on rollbacks or strips or something.
The http changes are because httppeer.close() prints stats with
--verbose.
Differential Revision: https://phab.mercurial-scm.org/D9999
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 15 Feb 2021 14:48:36 -0500 |
parents | be3d8178251e |
children | 66fb04552122 |
comparison
equal
deleted
inserted
replaced
46662:db8037e38085 | 46663:a4c19a162615 |
---|---|
1839 | 1839 |
1840 revs, checkout = hg.addbranchrevs(repo, repo, branches, []) | 1840 revs, checkout = hg.addbranchrevs(repo, repo, branches, []) |
1841 if revs: | 1841 if revs: |
1842 revs = [repo.lookup(rev) for rev in revs] | 1842 revs = [repo.lookup(rev) for rev in revs] |
1843 other = hg.peer(repo, {}, dest) | 1843 other = hg.peer(repo, {}, dest) |
1844 repo.ui.pushbuffer() | 1844 try: |
1845 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs) | 1845 repo.ui.pushbuffer() |
1846 repo.ui.popbuffer() | 1846 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs) |
1847 repo.ui.popbuffer() | |
1848 finally: | |
1849 other.close() | |
1847 cl = repo.changelog | 1850 cl = repo.changelog |
1848 o = {cl.rev(r) for r in outgoing.missing} | 1851 o = {cl.rev(r) for r in outgoing.missing} |
1849 return subset & o | 1852 return subset & o |
1850 | 1853 |
1851 | 1854 |