# HG changeset patch # User Kyle Lippincott # Date 1546030307 28800 # Node ID 8ecb17b7f43234c1eae0fb769dab795bf79fa485 # Parent d0c86a7447a67db8ff2a6d6afbdddbca2bc3d428 procutil: correct spelling of uninterruptable -> uninterruptible Differential Revision: https://phab.mercurial-scm.org/D5488 diff -r d0c86a7447a6 -r 8ecb17b7f432 hgext/narrow/narrowbundle2.py --- 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 diff -r d0c86a7447a6 -r 8ecb17b7f432 hgext/narrow/narrowcommands.py --- 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 diff -r d0c86a7447a6 -r 8ecb17b7f432 mercurial/repair.py --- 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 diff -r d0c86a7447a6 -r 8ecb17b7f432 mercurial/ui.py --- 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 diff -r d0c86a7447a6 -r 8ecb17b7f432 mercurial/utils/procutil.py --- 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. diff -r d0c86a7447a6 -r 8ecb17b7f432 tests/test-nointerrupt.t --- 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")