D5488: typos: correct spelling of uninterruptable -> uninterruptible
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Fri Dec 28 21:22:26 UTC 2018
spectral created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: martinvonz.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5488
AFFECTED FILES
hgext/narrow/narrowbundle2.py
hgext/narrow/narrowcommands.py
mercurial/repair.py
mercurial/ui.py
mercurial/utils/procutil.py
tests/test-nointerrupt.t
CHANGE DETAILS
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")
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/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,16 +362,16 @@
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
def warn():
self.warn(_("shutting down cleanly\n"))
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/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/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:
@@ -281,7 +281,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/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
To: spectral, durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list