remove unused util.localsub function
authorMatt Mackall <mpm@selenic.com>
Thu, 27 Dec 2007 23:55:40 -0600
changeset 5742 2bd4d56ff37c
parent 5741 8ee0de123989
child 5743 df09fad0059e
remove unused util.localsub function
mercurial/util.py
--- a/mercurial/util.py	Thu Dec 27 23:55:40 2007 -0600
+++ b/mercurial/util.py	Thu Dec 27 23:55:40 2007 -0600
@@ -81,18 +81,6 @@
     """Find the length in characters of a local string"""
     return len(s.decode(_encoding, "replace"))
 
-def localsub(s, a, b=None):
-    try:
-        u = s.decode(_encoding, _encodingmode)
-        if b is not None:
-            u = u[a:b]
-        else:
-            u = u[:a]
-        return u.encode(_encoding, _encodingmode)
-    except UnicodeDecodeError, inst:
-        sub = s[max(0, inst.start-10), inst.start+10]
-        raise Abort(_("decoding near '%s': %s!") % (sub, inst))
-
 # used by parsedate
 defaultdateformats = (
     '%Y-%m-%d %H:%M:%S',