Mercurial > hg-stable
changeset 41079:8ecb17b7f432
procutil: correct spelling of uninterruptable -> uninterruptible
Differential Revision: https://phab.mercurial-scm.org/D5488
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Fri, 28 Dec 2018 12:51:47 -0800 |
parents | d0c86a7447a6 |
children | 517a51d9cd7f |
files | hgext/narrow/narrowbundle2.py hgext/narrow/narrowcommands.py mercurial/repair.py mercurial/ui.py mercurial/utils/procutil.py tests/test-nointerrupt.t |
diffstat | 6 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/narrow/narrowbundle2.py Fri Dec 28 18:14:10 2018 -0500 +++ b/hgext/narrow/narrowbundle2.py Fri Dec 28 12:51:47 2018 -0800 @@ -188,7 +188,7 @@ chgrpfile = repair.strip(op.ui, repo, list(clkills), backup=True, topic='widen') if chgrpfile: - op._widen_uninterr = repo.ui.uninterruptable() + op._widen_uninterr = repo.ui.uninterruptible() op._widen_uninterr.__enter__() # presence of _widen_bundle attribute activates widen handler later op._widen_bundle = chgrpfile
--- a/hgext/narrow/narrowcommands.py Fri Dec 28 18:14:10 2018 -0500 +++ b/hgext/narrow/narrowcommands.py Fri Dec 28 12:51:47 2018 -0800 @@ -207,7 +207,7 @@ hint=_('use --force-delete-local-changes to ' 'ignore')) - with ui.uninterruptable(): + with ui.uninterruptible(): if revstostrip: tostrip = [unfi.changelog.node(r) for r in revstostrip] if repo['.'].node() in tostrip: @@ -284,7 +284,7 @@ # silence the devel-warning of applying an empty changegroup overrides = {('devel', 'all-warnings'): False} - with ui.uninterruptable(): + with ui.uninterruptible(): common = commoninc[0] if ellipsesremote: ds = repo.dirstate
--- a/mercurial/repair.py Fri Dec 28 18:14:10 2018 -0500 +++ b/mercurial/repair.py Fri Dec 28 12:51:47 2018 -0800 @@ -188,7 +188,7 @@ tmpbundlefile = backupbundle(repo, savebases, saveheads, node, 'temp', compress=False, obsolescence=False) - with ui.uninterruptable(): + with ui.uninterruptible(): try: with repo.transaction("strip") as tr: # TODO this code violates the interface abstraction of the
--- a/mercurial/ui.py Fri Dec 28 18:14:10 2018 -0500 +++ b/mercurial/ui.py Fri Dec 28 12:51:47 2018 -0800 @@ -348,7 +348,7 @@ (util.timer() - starttime) * 1000 @contextlib.contextmanager - def uninterruptable(self): + def uninterruptible(self): """Mark an operation as unsafe. Most operations on a repository are safe to interrupt, but a @@ -362,7 +362,7 @@ enabled = self.interactive() if self._uninterruptible or not enabled: # if nointerrupt support is turned off, the process isn't - # interactive, or we're already in an uninterruptable + # interactive, or we're already in an uninterruptible # block, do nothing. yield return @@ -371,7 +371,7 @@ self.warn( _("press ^C again to terminate immediately (dangerous)\n")) return True - with procutil.uninterruptable(warn): + with procutil.uninterruptible(warn): try: self._uninterruptible = True yield
--- a/mercurial/utils/procutil.py Fri Dec 28 18:14:10 2018 -0500 +++ b/mercurial/utils/procutil.py Fri Dec 28 12:51:47 2018 -0800 @@ -437,7 +437,7 @@ signal.signal(signal.SIGCHLD, prevhandler) @contextlib.contextmanager -def uninterruptable(warn): +def uninterruptible(warn): """Inhibit SIGINT handling on a region of code. Note that if this is called in a non-main thread, it turns into a no-op.
--- a/tests/test-nointerrupt.t Fri Dec 28 18:14:10 2018 -0500 +++ b/tests/test-nointerrupt.t Fri Dec 28 12:51:47 2018 -0800 @@ -13,7 +13,7 @@ > > @command(b'sleep', [], _(b'TIME'), norepo=True) > def sleep(ui, sleeptime=b"1", **opts): - > with ui.uninterruptable(): + > with ui.uninterruptible(): > for _i in itertools.repeat(None, int(sleeptime)): > time.sleep(1) > ui.warn(b"end of unsafe operation\n")