--- a/hgext/convert/common.py Fri Apr 24 17:32:18 2009 +0200
+++ b/hgext/convert/common.py Fri Apr 24 17:32:18 2009 +0200
@@ -335,7 +335,7 @@
return
for i, line in enumerate(fp):
try:
- key, value = strutil.rsplit(line[:-1], ' ', 1)
+ key, value = line[:-1].rsplit(' ', 1)
except ValueError:
raise util.Abort(_('syntax error in %s(%d): key/value pair expected')
% (self.path, i+1))
--- a/hgext/convert/subversion.py Fri Apr 24 17:32:18 2009 +0200
+++ b/hgext/convert/subversion.py Fri Apr 24 17:32:18 2009 +0200
@@ -501,7 +501,7 @@
return int(rev.split('@')[-1])
def revsplit(self, rev):
- url, revnum = strutil.rsplit(rev.encode(self.encoding), '@', 1)
+ url, revnum = rev.encode(self.encoding).rsplit('@', 1)
revnum = int(revnum)
parts = url.split('/', 1)
uuid = parts.pop(0)[4:]
--- a/mercurial/strutil.py Fri Apr 24 17:32:18 2009 +0200
+++ b/mercurial/strutil.py Fri Apr 24 17:32:18 2009 +0200
@@ -32,10 +32,3 @@
break
yield c
end = c - 1
-
-def rsplit(s, sep=None, maxsplit=-1):
- try:
- return s.rsplit(sep, maxsplit)
- except AttributeError:
- return [chunk[::-1] for chunk in
- s[::-1].split(sep, maxsplit)[::-1]]