Mercurial > hg-stable
changeset 4927:5e89b0dafce5
convert/subversion.py: str.rsplit is not available in Python 2.3
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 17 Jul 2007 15:47:32 -0700 |
parents | 164daf101a54 |
children | 8535c1770dd3 |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Tue Jul 17 15:26:27 2007 -0700 +++ b/hgext/convert/subversion.py Tue Jul 17 15:47:32 2007 -0700 @@ -62,8 +62,10 @@ try: # Support file://path@rev syntax. Useful e.g. to convert # deleted branches. - url, latest = url.rsplit("@", 1) - latest = int(latest) + at = url.rfind('@') + if at >= 0: + latest = int(url[at+1:]) + url = url[:at] except ValueError, e: pass self.url = url