Mercurial > hg
comparison hgext/schemes.py @ 10070:9d1195b2f00d stable
schemes: url parts are counted from 1
author | Alexander Solovyov <piranha@piranha.org.ua> |
---|---|
date | Mon, 14 Dec 2009 21:21:34 +0200 |
parents | 0c3eeee91c9a |
children | 25e572394f5c |
comparison
equal
deleted
inserted
replaced
10051:a02d43acbc04 | 10070:9d1195b2f00d |
---|---|
62 if len(parts) > self.parts: | 62 if len(parts) > self.parts: |
63 tail = parts[-1] | 63 tail = parts[-1] |
64 parts = parts[:-1] | 64 parts = parts[:-1] |
65 else: | 65 else: |
66 tail = '' | 66 tail = '' |
67 context = dict((str(i), v) for i, v in enumerate(parts)) | 67 context = dict((str(i+1), v) for i, v in enumerate(parts)) |
68 url = ''.join(self.templater.process(self.url, context)) + tail | 68 url = ''.join(self.templater.process(self.url, context)) + tail |
69 return hg._lookup(url).instance(ui, url, create) | 69 return hg._lookup(url).instance(ui, url, create) |
70 | 70 |
71 schemes = { | 71 schemes = { |
72 'py': 'http://hg.python.org/', | 72 'py': 'http://hg.python.org/', |