store: give name to lowerencode function
authorYuya Nishihara <yuya@tcha.org>
Sun, 03 Sep 2017 17:26:10 +0900
changeset 34213 96808804b68f
parent 34212 dfd009e5f9f2
child 34214 7e3f078b6f31
store: give name to lowerencode function lambda function isn't easy to track in traceback.
mercurial/store.py
--- a/mercurial/store.py	Sun Sep 03 15:32:45 2017 +0900
+++ b/mercurial/store.py	Sun Sep 03 17:26:10 2017 +0900
@@ -162,7 +162,9 @@
         cmap[chr(x)] = "~%02x" % x
     for x in range(ord("A"), ord("Z") + 1):
         cmap[chr(x)] = chr(x).lower()
-    return lambda s: "".join([cmap[c] for c in s])
+    def lowerencode(s):
+        return "".join([cmap[c] for c in s])
+    return lowerencode
 
 lowerencode = getattr(parsers, 'lowerencode', None) or _buildlowerencodefun()