Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 1541:bf4e7ef08741
fixed some stuff pychecker shows, marked unclear/wrong stuff with XXX
author | twaldmann@thinkmo.de |
---|---|
date | Mon, 14 Nov 2005 03:59:35 +0200 |
parents | c9f33196805b |
children | 487e256ad545 |
line wrap: on
line diff
--- a/mercurial/util.py Mon Nov 14 02:30:19 2005 +0200 +++ b/mercurial/util.py Mon Nov 14 03:59:35 2005 +0200 @@ -158,9 +158,11 @@ this returns a path in the form used by the local filesystem, not hg.''' if not n1: return localpath(n2) a, b = n1.split('/'), n2.split('/') - a.reverse(), b.reverse() + a.reverse() + b.reverse() while a and b and a[-1] == b[-1]: - a.pop(), b.pop() + a.pop() + b.pop() b.reverse() return os.sep.join((['..'] * len(a)) + b) @@ -253,7 +255,7 @@ try: pat = '(?:%s)' % regex(k, p, tail) matches.append(re.compile(pat).match) - except re.error, inst: + except re.error: raise Abort("invalid pattern: %s:%s" % (k, p)) def buildfn(text):