[PATCH 2 of 7] util: mark filtertable as private constant

Yuya Nishihara yuya at tcha.org
Sat Mar 24 23:36:16 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1521869914 -32400
#      Sat Mar 24 14:38:34 2018 +0900
# Node ID 4bd2d19ecff7aa5ce3ce695427a478b9d3be9ff1
# Parent  348e7462944f36f0fbea25bcf407c78d68aeaa1f
util: mark filtertable as private constant

Prepares for porting to utils.*.

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1541,14 +1541,14 @@ def tempfilter(s, cmd):
         except OSError:
             pass
 
-filtertable = {
+_filtertable = {
     'tempfile:': tempfilter,
     'pipe:': pipefilter,
-    }
+}
 
 def filter(s, cmd):
     "filter a string through a command that transforms its input to its output"
-    for name, fn in filtertable.iteritems():
+    for name, fn in _filtertable.iteritems():
         if cmd.startswith(name):
             return fn(s, cmd[len(name):].lstrip())
     return pipefilter(s, cmd)


More information about the Mercurial-devel mailing list