Mercurial > hg-stable
changeset 3082:bed7cb835d8d
Fixed python2.3 incompatibility (rsplit) in qpush/qpop with index.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 12 Sep 2006 17:27:41 +0200 |
parents | 760414dc7ac6 |
children | 82c9d1aac308 d0fcce3728d1 |
files | hgext/mq.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Sep 12 17:26:20 2006 +0200 +++ b/hgext/mq.py Tue Sep 12 17:27:41 2006 +0200 @@ -757,25 +757,25 @@ # return any partial match made above if res: return res - minus = patch.rsplit('-', 1) - if len(minus) > 1: - res = partial_name(minus[0]) + minus = patch.rfind('-') + if minus >= 0: + res = partial_name(patch[:minus]) if res: i = self.series.index(res) try: - off = int(minus[1] or 1) + off = int(patch[minus+1:] or 1) except(ValueError, OverflowError): pass else: if i - off >= 0: return self.series[i - off] - plus = patch.rsplit('+', 1) - if len(plus) > 1: - res = partial_name(plus[0]) + plus = patch.rfind('+') + if plus >= 0: + res = partial_name(patch[:plus]) if res: i = self.series.index(res) try: - off = int(plus[1] or 1) + off = int(patch[plus+1:] or 1) except(ValueError, OverflowError): pass else: