Patchwork [1,of,4] dispatch: mark callcatch() as a private function

login
register
mail settings
Submitter Yuya Nishihara
Date April 15, 2017, 10:18 a.m.
Message ID <7efffd8f101592f72eb2.1492251515@mimosa>
Download mbox | patch
Permalink /patch/20212/
State Accepted
Delegated to: Kevin Bullock
Headers show

Comments

Yuya Nishihara - April 15, 2017, 10:18 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1492228686 -32400
#      Sat Apr 15 12:58:06 2017 +0900
# Node ID 7efffd8f101592f72eb22ff771b336dd919c6f80
# Parent  83527d9f1f1381ffd7325b7c4297ffbdfed78236
dispatch: mark callcatch() as a private function

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -258,9 +258,9 @@  def _runcatch(req):
             ui.traceback()
             raise
 
-    return callcatch(ui, _runcatchfunc)
+    return _callcatch(ui, _runcatchfunc)
 
-def callcatch(ui, func):
+def _callcatch(ui, func):
     """like scmutil.callcatch but handles more high-level exceptions about
     config parsing and commands. besides, use handlecommandexception to handle
     uncaught exceptions.
diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
--- a/tests/test-devel-warnings.t
+++ b/tests/test-devel-warnings.t
@@ -89,7 +89,7 @@ 
    */mercurial/dispatch.py:* in run (glob)
    */mercurial/dispatch.py:* in dispatch (glob)
    */mercurial/dispatch.py:* in _runcatch (glob)
-   */mercurial/dispatch.py:* in callcatch (glob)
+   */mercurial/dispatch.py:* in _callcatch (glob)
    */mercurial/scmutil.py* in callcatch (glob)
    */mercurial/dispatch.py:* in _runcatchfunc (glob)
    */mercurial/dispatch.py:* in _dispatch (glob)
@@ -120,7 +120,7 @@ 
    */mercurial/dispatch.py:* in run (glob)
    */mercurial/dispatch.py:* in dispatch (glob)
    */mercurial/dispatch.py:* in _runcatch (glob)
-   */mercurial/dispatch.py:* in callcatch (glob)
+   */mercurial/dispatch.py:* in _callcatch (glob)
    */mercurial/scmutil.py* in callcatch (glob)
    */mercurial/dispatch.py:* in _runcatchfunc (glob)
    */mercurial/dispatch.py:* in _dispatch (glob)
@@ -141,7 +141,7 @@ 
    */mercurial/dispatch.py:* in run (glob)
    */mercurial/dispatch.py:* in dispatch (glob)
    */mercurial/dispatch.py:* in _runcatch (glob)
-   */mercurial/dispatch.py:* in callcatch (glob)
+   */mercurial/dispatch.py:* in _callcatch (glob)
    */mercurial/scmutil.py* in callcatch (glob)
    */mercurial/dispatch.py:* in _runcatchfunc (glob)
    */mercurial/dispatch.py:* in _dispatch (glob)