changeset 5742:2bd4d56ff37c

remove unused util.localsub function
author Matt Mackall <mpm@selenic.com>
date Thu, 27 Dec 2007 23:55:40 -0600
parents 8ee0de123989
children df09fad0059e
files mercurial/util.py
diffstat 1 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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',