comparison mercurial/debugcommands.py @ 47438:1be9bf3669cb

debugbackupbundle: use new context manager for silencing the ui A difference between setting `ui.quiet` and using `ui.silent()` is that the latter also silences `ui.write()` calls. That's practically always what one wants, including here, I think. Differential Revision: https://phab.mercurial-scm.org/D10885
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 18 Jun 2021 16:00:58 -0700
parents 7a430116f639
children 5363610f61ef
comparison
equal deleted inserted replaced
47437:7a430116f639 47438:1be9bf3669cb
3789 ) 3789 )
3790 3790
3791 if revs: 3791 if revs:
3792 revs = [other.lookup(rev) for rev in revs] 3792 revs = [other.lookup(rev) for rev in revs]
3793 3793
3794 quiet = ui.quiet 3794 with ui.silent():
3795 try: 3795 try:
3796 ui.quiet = True 3796 other, chlist, cleanupfn = bundlerepo.getremotechanges(
3797 other, chlist, cleanupfn = bundlerepo.getremotechanges( 3797 ui, repo, other, revs, opts[b"bundle"], opts[b"force"]
3798 ui, repo, other, revs, opts[b"bundle"], opts[b"force"] 3798 )
3799 ) 3799 except error.LookupError:
3800 except error.LookupError: 3800 continue
3801 continue
3802 finally:
3803 ui.quiet = quiet
3804 3801
3805 try: 3802 try:
3806 if not chlist: 3803 if not chlist:
3807 continue 3804 continue
3808 if recovernode: 3805 if recovernode: