# HG changeset patch # User Matt Mackall # Date 1198821340 21600 # Node ID 2bd4d56ff37c56c764432bb2d91a01d3d227751c # Parent 8ee0de123989430ada26b47ca41ec3a671493266 remove unused util.localsub function diff -r 8ee0de123989 -r 2bd4d56ff37c 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',