Patchwork D5488: typos: correct spelling of uninterruptable -> uninterruptible

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2018, 8:34 a.m.
Message ID <c2339516e80550d47d17867f5c522e36@localhost.localdomain>
Download mbox | patch
Permalink /patch/37391/
State Not Applicable
Headers show

Comments

phabricator - Dec. 30, 2018, 8:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8ecb17b7f432: procutil: correct spelling of uninterruptable -&gt; uninterruptible (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5488?vs=12992&id=12993

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




To: spectral, durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

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:
@@ -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/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