diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -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 --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -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 --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -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 --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -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 --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -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 --git a/tests/test-nointerrupt.t b/tests/test-nointerrupt.t --- a/tests/test-nointerrupt.t +++ b/tests/test-nointerrupt.t @@ -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")