changeset 2740 | 386f04d6ecb3 |
parent 2655 | df5e58c84b01 |
child 2760 | e6bef16b6cec |
--- a/mercurial/util.py Sun Jul 30 22:52:34 2006 -0700 +++ b/mercurial/util.py Mon Jul 31 07:11:12 2006 -0700 @@ -996,3 +996,11 @@ if nbytes >= divisor * multiplier: return format % (nbytes / float(divisor)) return units[-1][2] % nbytes + +def drop_scheme(scheme, path): + sc = scheme + ':' + if path.startswith(sc): + path = path[len(sc):] + if path.startswith('//'): + path = path[2:] + return path